mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
517c03f920
Converts Minesweeper's main widget to GML, polishes the custom game window, formats the clock as human readable digital time, and defers invoking Field's callback until the main widget has finished relayout. Fixes inability to downsize the main window when shrinking field size.
74 lines
1.3 KiB
Plaintext
74 lines
1.3 KiB
Plaintext
@GUI::Widget {
|
|
fill_with_background_color: true
|
|
layout: @GUI::VerticalBoxLayout {
|
|
margins: [4]
|
|
spacing: 6
|
|
}
|
|
|
|
@GUI::GroupBox {
|
|
title: "Field"
|
|
autosize: true
|
|
layout: @GUI::HorizontalBoxLayout {
|
|
margins: [6]
|
|
}
|
|
|
|
@GUI::Label {
|
|
text: "Columns: "
|
|
autosize: true
|
|
}
|
|
|
|
@GUI::SpinBox {
|
|
name: "columns_spinbox"
|
|
min: 9
|
|
max: 50
|
|
fixed_width: 40
|
|
}
|
|
|
|
@GUI::Layout::Spacer {}
|
|
|
|
@GUI::Label {
|
|
text: "Rows: "
|
|
autosize: true
|
|
}
|
|
|
|
@GUI::SpinBox {
|
|
name: "rows_spinbox"
|
|
min: 9
|
|
max: 50
|
|
fixed_width: 40
|
|
}
|
|
|
|
@GUI::Layout::Spacer {}
|
|
|
|
@GUI::Label {
|
|
text: "Mines: "
|
|
autosize: true
|
|
}
|
|
|
|
@GUI::SpinBox {
|
|
name: "mines_spinbox"
|
|
min: 1
|
|
max: 2500
|
|
fixed_width: 50
|
|
}
|
|
}
|
|
|
|
@GUI::Widget {
|
|
layout: @GUI::HorizontalBoxLayout {
|
|
spacing: 10
|
|
}
|
|
|
|
@GUI::Layout::Spacer {}
|
|
|
|
@GUI::DialogButton {
|
|
name: "ok_button"
|
|
text: "OK"
|
|
}
|
|
|
|
@GUI::DialogButton {
|
|
name: "cancel_button"
|
|
text: "Cancel"
|
|
}
|
|
}
|
|
}
|