mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:07:45 +00:00
LibGUI: Add Calendar property for mode
If a user selects Year as the default view mode for Calendar app, then all apps using Calendar widget will default to this view if not manually overridden with a Calendar::toggle_mode call. This commit introduces a "mode" property that allows the selection of the default mode for the calendar widget in GML files. In this way there is no need to manually call toggle_mode when constructing UIs with Calendar widget.
This commit is contained in:
parent
1153068407
commit
71a784741f
3 changed files with 13 additions and 0 deletions
|
@ -66,6 +66,7 @@ public:
|
|||
ErrorOr<String> formatted_date(Format format = LongMonthYear);
|
||||
|
||||
Mode mode() const { return m_mode; }
|
||||
void set_mode(Mode);
|
||||
void toggle_mode();
|
||||
|
||||
void update_tiles(unsigned year, unsigned month);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue