
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.
57 lines
1.2 KiB
Text
57 lines
1.2 KiB
Text
@GUI::Widget {
|
|
shrink_to_fit: true
|
|
fill_with_background_color: true
|
|
layout: @GUI::VerticalBoxLayout {}
|
|
|
|
@GUI::Widget {
|
|
fixed_height: 20
|
|
fill_with_background_color: true
|
|
layout: @GUI::HorizontalBoxLayout {}
|
|
|
|
@GUI::ComboBox {
|
|
name: "month_box"
|
|
model_only: true
|
|
}
|
|
|
|
@GUI::SpinBox {
|
|
name: "year_box"
|
|
fixed_size: [55, 20]
|
|
min: 0
|
|
max: 9999
|
|
}
|
|
|
|
@GUI::Layout::Spacer {}
|
|
}
|
|
|
|
@GUI::Widget {
|
|
fixed_width: 200
|
|
fixed_height: 200
|
|
layout: @GUI::VerticalBoxLayout {}
|
|
|
|
@GUI::Calendar {
|
|
name: "calendar_view"
|
|
mode: "Month"
|
|
}
|
|
}
|
|
|
|
@GUI::Widget {
|
|
fixed_height: 20
|
|
fill_with_background_color: true
|
|
layout: @GUI::HorizontalBoxLayout {}
|
|
|
|
@GUI::Layout::Spacer {}
|
|
|
|
@GUI::Button {
|
|
name: "cancel_button"
|
|
text: "Cancel"
|
|
fixed_size: [80, 20]
|
|
}
|
|
|
|
@GUI::Button {
|
|
name: "ok_button"
|
|
text: "OK"
|
|
fixed_size: [80, 20]
|
|
default: true
|
|
}
|
|
}
|
|
}
|