mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 05:44:58 +00:00
LibGUI+Applications: Default the SpinBox min/max to the full int range
By default, a SpinBox's value should be unlimited, (or as close as we can get to that,) and then the GML or code can impose a limit if needed. This saves the developer from entering an arbitrary "big" max value when they want the value to have no maximum. I've audited the use of SpinBox and added `min: 0`, and removed a `max`, where appropriate. All existing SpinBoxes constructed in code have a range set explicitly as far as I can tell.
This commit is contained in:
parent
cbd28c9110
commit
e0fd5beb36
4 changed files with 4 additions and 3 deletions
|
@ -120,7 +120,6 @@
|
|||
name: "duration_hour"
|
||||
fixed_size: [50, 20]
|
||||
min: 0
|
||||
max: 999999
|
||||
}
|
||||
|
||||
@GUI::SpinBox {
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
@GUI::SpinBox {
|
||||
name: "glyph_editor_width_spinbox"
|
||||
preferred_width: "fit"
|
||||
min: 0
|
||||
}
|
||||
|
||||
@GUI::CheckBox {
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
|
||||
@GUI::SpinBox {
|
||||
name: "size_spin_box"
|
||||
min: 0
|
||||
}
|
||||
|
||||
@GUI::ListView {
|
||||
|
|
|
@ -42,8 +42,8 @@ private:
|
|||
RefPtr<Button> m_increment_button;
|
||||
RefPtr<Button> m_decrement_button;
|
||||
|
||||
int m_min { 0 };
|
||||
int m_max { 100 };
|
||||
int m_min { NumericLimits<int>::min() };
|
||||
int m_max { NumericLimits<int>::max() };
|
||||
int m_value { 0 };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue