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.

feat: change aux line color and default cell size

Wenzhao Huce8b96a7aa1d
diff --git a/packages/core/src/sheets/sheet-snapshot-utils.ts b/packages/core/src/sheets/sheet-snapshot-utils.ts
index 8d99ef1081..58954c42ce 100644
--- a/packages/core/src/sheets/sheet-snapshot-utils.ts
+++ b/packages/core/src/sheets/sheet-snapshot-utils.ts
@@ -26,10 +26,10 @@ export const DEFAULT_WORKSHEET_COLUMN_COUNT_KEY = 'DEFAULT_WORKSHEET_COLUMN_COUN
export const DEFAULT_WORKSHEET_COLUMN_COUNT = 20;
export const DEFAULT_WORKSHEET_ROW_HEIGHT_KEY = 'DEFAULT_WORKSHEET_ROW_HEIGHT';
-export const DEFAULT_WORKSHEET_ROW_HEIGHT = 19;
+export const DEFAULT_WORKSHEET_ROW_HEIGHT = 24;
export const DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY = 'DEFAULT_WORKSHEET_COLUMN_WIDTH';
-export const DEFAULT_WORKSHEET_COLUMN_WIDTH = 73;
+export const DEFAULT_WORKSHEET_COLUMN_WIDTH = 88;
export const DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY = 'DEFAULT_WORKSHEET_ROW_TITLE_WIDTH';
export const DEFAULT_WORKSHEET_ROW_TITLE_WIDTH = 46;
@@ -46,7 +46,7 @@ export const DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT = 20;
*/
export function mergeWorksheetSnapshotWithDefault(snapshot: Partial<IWorksheetData>): IWorksheetData {
const defaultSnapshot: IWorksheetData = {
- name: 'Sheet1',
+ name: 'Sheet1', // TODO: name should have i18n
id: 'sheet-01',
tabColor: '',
hidden: BooleanNumber.FALSE,
diff --git a/packages/engine-render/src/components/sheets/spreadsheet.ts b/packages/engine-render/src/components/sheets/spreadsheet.ts
index 8051481a4f..f4b94ebfbd 100644
--- a/packages/engine-render/src/components/sheets/spreadsheet.ts
+++ b/packages/engine-render/src/components/sheets/spreadsheet.ts
@@ -496,7 +496,8 @@ export class Spreadsheet extends SheetComponent {
ctx.setLineWidthByPrecision(1);
- ctx.strokeStyle = getColor([212, 212, 212]);
+ // TODO@jikkai: these should be configurable
+ ctx.strokeStyle = getColor([235, 236, 239]);
const columnWidthAccumulationLength = columnWidthAccumulation.length;
const rowHeightAccumulationLength = rowHeightAccumulation.length;