Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(sheet): selection and freeze style (#317)

Univer129b1ccb712f
diff --git a/packages/base-render/src/Basics/Selection.ts b/packages/base-render/src/Basics/Selection.ts
index fc55225637..a09d82d836 100644
--- a/packages/base-render/src/Basics/Selection.ts
+++ b/packages/base-render/src/Basics/Selection.ts
@@ -57,7 +57,7 @@ export interface ISelectionWithStyle extends ISelection {
export const NORMAL_SELECTION_PLUGIN_STYLE: ISelectionStyle = {
strokeWidth: 2,
- stroke: 'rgb(1,136,251)',
+ stroke: '#409f11',
fill: 'rgba(0, 0, 0, 0.1)',
// widgets: { tl: true, tc: true, tr: true, ml: true, mr: true, bl: true, bc: true, br: true },
widgets: {},
@@ -72,12 +72,12 @@ export const NORMAL_SELECTION_PLUGIN_STYLE: ISelectionStyle = {
hasRowHeader: true,
rowHeaderFill: 'rgba(0, 0, 0, 0.1)',
- rowHeaderStroke: 'rgb(1,136,251)',
+ rowHeaderStroke: '#409f11',
rowHeaderStrokeWidth: 1,
hasColumnHeader: true,
columnHeaderFill: 'rgba(0, 0, 0, 0.1)',
- columnHeaderStroke: 'rgb(1,136,251)',
+ columnHeaderStroke: '#409f11',
columnHeaderStrokeWidth: 1,
};
diff --git a/packages/base-render/src/Component/Sheets/Selection/selection-transformer-shape.ts b/packages/base-render/src/Component/Sheets/Selection/selection-transformer-shape.ts
index 23118e6f04..c31133e27e 100644
--- a/packages/base-render/src/Component/Sheets/Selection/selection-transformer-shape.ts
+++ b/packages/base-render/src/Component/Sheets/Selection/selection-transformer-shape.ts
@@ -704,7 +704,7 @@ export class SelectionTransformerShape {
this._columnHeaderBorder.transformByState({
width: endX - startX,
height: columnHeaderStrokeWidth,
- top: columnHeaderHeight - columnHeaderStrokeWidth,
+ top: columnHeaderHeight - columnHeaderStrokeWidth + 1,
});
this._columnHeaderGroup.show();
@@ -731,7 +731,7 @@ export class SelectionTransformerShape {
this._rowHeaderBorder.transformByState({
width: rowHeaderStrokeWidth,
height: endY - startY,
- left: rowHeaderWidth - rowHeaderStrokeWidth,
+ left: rowHeaderWidth - rowHeaderStrokeWidth + 1,
});
this._rowHeaderGroup.show();
diff --git a/packages/base-render/src/Shape/ScrollBar.ts b/packages/base-render/src/Shape/ScrollBar.ts
index ff591c3888..9eeb6a2a8b 100644
--- a/packages/base-render/src/Shape/ScrollBar.ts
+++ b/packages/base-render/src/Shape/ScrollBar.ts
@@ -1,8 +1,7 @@
import { EventState, IKeyValue, Nullable, Observer } from '@univerjs/core';
-import { COLORS, EVENT_TYPE } from '../Basics/Const';
+import { EVENT_TYPE } from '../Basics/Const';
import { IMouseEvent, IPointerEvent } from '../Basics/IEvents';
-import { getColor } from '../Basics/Tools';
import { Transform } from '../Basics/Transform';
import { Vector2 } from '../Basics/Vector2';
import { ThinScene } from '../ThinScene';
@@ -41,15 +40,15 @@ export class ScrollBar extends BaseScrollBar {
thumbLengthRatio = 1;
- thumbBackgroundColor = getColor(COLORS.black, 0.2);
+ thumbBackgroundColor = '#cccccc';
- thumbHoverBackgroundColor = getColor(COLORS.black, 0.35);
+ thumbHoverBackgroundColor = '#b2b2b2';
- thumbActiveBackgroundColor = getColor(COLORS.black, 0.4);
+ thumbActiveBackgroundColor = '#999999';
- barBackgroundColor = getColor(COLORS.white);
+ barBackgroundColor = '#fff';
- barBorderColor = getColor(COLORS.white);
+ barBorderColor = '#fff';
constructor(view: Viewport, props?: IScrollBarProps) {
super();
diff --git a/packages/base-sheets/src/Controller/freeze.controller.ts b/packages/base-sheets/src/Controller/freeze.controller.ts
index 1b7ecfe8e5..14b12573ff 100644
--- a/packages/base-sheets/src/Controller/freeze.controller.ts
+++ b/packages/base-sheets/src/Controller/freeze.controller.ts
@@ -47,7 +47,7 @@ const FREEZE_NORMAL_HEADER_COLOR = 'rgb(199, 199, 199)';
const FREEZE_NORMAL_MAIN_COLOR = 'rgba(199, 199, 199, 0.01)';
-const FREEZE_ACTIVE_COLOR = 'rgb(11, 87, 208)';
+const FREEZE_ACTIVE_COLOR = '#409f11';
const FREEZE_HOVER_COLOR = 'rgb(116, 119, 117)';