Skip to content

Commit

Permalink
feat: change aux line color and default cell size
Browse files Browse the repository at this point in the history
  • Loading branch information
wzhudev committed May 24, 2024
1 parent 9a24216 commit ce8b96a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/sheets/sheet-snapshot-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion packages/engine-render/src/components/sheets/spreadsheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ce8b96a

Please sign in to comment.