From 605f867f8ac9291adcbdb6c97b4ce5672bfb01e4 Mon Sep 17 00:00:00 2001 From: mkpaz Date: Sat, 11 Feb 2023 08:52:24 +0400 Subject: [PATCH] Fix date picker cell size --- CHANGELOG.md | 1 + styles/src/components/_date-picker.scss | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30ce069..6377a95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ This is a bugfix/maintenance release that also contains a few style improvements - (CSS) Fix text inputs borders color (#21). - (CSS) Fix `Tooltip` text not showing for circular buttons. - (CSS) Prevent context menu from inheriting text input font properties. +- (CSS) Fix invalid `DatePicker` cell size. - (Base) Fix `PasswordTextFormatter` garbled input. ## [1.1.0] - 2022-10-10 diff --git a/styles/src/components/_date-picker.scss b/styles/src/components/_date-picker.scss index d95c5a1..d4468fa 100755 --- a/styles/src/components/_date-picker.scss +++ b/styles/src/components/_date-picker.scss @@ -27,6 +27,10 @@ $month-year-font-size: 1.1em !default; $cell-padding-x: 4px !default; $cell-padding-y: 8px !default; +// default cell size is 24px (36px if second chronology), see DateCellSkin +$cell-size: 2.5em !default; +$cell-hgap: 5px !default; +$cell-vgap: 0 !default; $day-name-font-size: 0.9em !default; // secondary chronology @@ -122,6 +126,8 @@ $chrono-cell-padding: 0.083333em $cell-padding-x 0.083333em 0.333333em !default; >.calendar-grid { -fx-background-color: -color-date-bg; -fx-padding: $content-padding-x; + -fx-hgap: $cell-hgap; + -fx-vgap: $cell-vgap; >.date-cell { -fx-background-color: transparent; @@ -129,13 +135,13 @@ $chrono-cell-padding: 0.083333em $cell-padding-x 0.083333em 0.333333em !default; -fx-alignment: BASELINE_CENTER; -fx-opacity: 1.0; -fx-text-fill: -color-date-day-fg; + -fx-cell-size: $cell-size; } >.week-number-cell { -fx-padding: $cell-padding-y $cell-padding-x $cell-padding-y $cell-padding-x; -fx-background-color: -color-date-week-bg; -fx-text-fill: -color-date-week-fg; - -fx-font-size: $day-name-font-size; } >.day-cell {