Merge remote-tracking branches 'origin/sub_laptop_2' and 'origin/sub_laptop_8' into sub_laptop_7
This commit is contained in:
@@ -21,6 +21,11 @@ import "./spreadsheet_toolbar.css";
|
||||
type Side = "위" | "아래" | "왼" | "오른";
|
||||
type BorderPreset = "none" | "all" | "outer" | "top" | "bottom" | "left" | "right";
|
||||
|
||||
/** 앱 기본 글꼴 · 크기 — `spreadsheet_grid.ts`(C) 의 `fontCss` 가 쓰는 기본과 같은 값(거울) ·
|
||||
* 칸 · 행 · 열 · 시트 기본 어디에도 없을 때 이 값을 흐리게(placeholder) 보임. */
|
||||
const APP_DEFAULT_FONT = "굴림";
|
||||
const APP_DEFAULT_SIZE = 10;
|
||||
|
||||
const FONTS = [
|
||||
"굴림",
|
||||
"굴림체",
|
||||
@@ -344,7 +349,10 @@ export function mountToolbar(ctx: SpreadsheetContext): PartHandle {
|
||||
const { r, c } = ctx.selection.활성;
|
||||
const style = styleAt(ctx, r, c);
|
||||
fontInput.value = style.글꼴 ?? "";
|
||||
fontInput.placeholder = style.글꼴 ? "" : (ctx.book.기본?.글꼴 ?? APP_DEFAULT_FONT);
|
||||
sizeInput.value = style.크기 != null ? String(style.크기) : "";
|
||||
sizeInput.placeholder =
|
||||
style.크기 != null ? "" : String(ctx.book.기본?.크기 ?? APP_DEFAULT_SIZE);
|
||||
boldBtn.classList.toggle("is-on", !!style.굵게);
|
||||
italicBtn.classList.toggle("is-on", !!style.기울임);
|
||||
underlineBtn.classList.toggle("is-on", !!style.밑줄);
|
||||
|
||||
Reference in New Issue
Block a user