mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +00:00
LibGUI: Add a date picker dialog
This adds a simple date picker dialog using the existing GUI::Calendar.
This commit is contained in:
parent
039114b728
commit
8e77c72a5c
4 changed files with 147 additions and 0 deletions
56
Userland/Libraries/LibGUI/DatePickerDialog.gml
Normal file
56
Userland/Libraries/LibGUI/DatePickerDialog.gml
Normal file
|
@ -0,0 +1,56 @@
|
|||
@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"
|
||||
}
|
||||
}
|
||||
|
||||
@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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue