mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
DatePicker: calendar
This commit is contained in:
parent
fe6dba9779
commit
f75cedb893
10 changed files with 374 additions and 7 deletions
|
@ -14,6 +14,9 @@ export component DatePicker {
|
|||
in property <string> ok-text: "Ok";
|
||||
in property <Date> date <=> base.date;
|
||||
|
||||
property <brush> state: Palette.color-scheme == ColorScheme.dark ? #ffffff : #000000;
|
||||
property <brush> state-secondary: Palette.color-scheme == ColorScheme.dark ? #000000 : #ffffff;
|
||||
|
||||
callback canceled();
|
||||
callback accepted(/* current-date */ Date);
|
||||
|
||||
|
@ -35,7 +38,24 @@ export component DatePicker {
|
|||
color: Palette.foreground;
|
||||
}
|
||||
|
||||
base := DatePickerBase {}
|
||||
base := DatePickerBase {
|
||||
style: {
|
||||
calendar-style: {
|
||||
delegate-style: {
|
||||
font-size: 14px,
|
||||
font-weight: 500,
|
||||
foreground: Palette.foreground,
|
||||
state-brush: root.state,
|
||||
background-selected: Palette.accent-background,
|
||||
foreground-selected: Palette.accent-foreground,
|
||||
state-brush-selected: root.state-secondary,
|
||||
border-color-today: Palette.accent-background,
|
||||
foreground-today: Palette.accent-background,
|
||||
state-brush-today: root.state,
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
HorizontalLayout {
|
||||
spacing: 8px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue