1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:07:44 +00:00

MouseSettings: Give this application a GUI facelift :^)

Note that the double-click "icon" adapts to the double-click speed
and also reacts to double-clicks. :^)
This commit is contained in:
Andreas Kling 2021-07-20 21:35:00 +02:00
parent 3652ab8b2a
commit 81e6560009
10 changed files with 257 additions and 96 deletions

View file

@ -1,105 +1,147 @@
@GUI::Widget {
@GUI::Frame {
fill_with_background_color: true
layout: @GUI::VerticalBoxLayout {
margins: [4, 4, 4, 4]
margins: [10, 10, 10, 10]
spacing: 5
}
@GUI::GroupBox {
title: "Mouse speed"
fixed_height: 60
title: "Cursor speed"
fixed_height: 110
layout: @GUI::HorizontalBoxLayout {
margins: [6, 16, 8, 6]
layout: @GUI::VerticalBoxLayout {
margins: [8, 16, 8, 8]
}
@GUI::HorizontalSlider {
name: "speed_slider"
max: 3500
min: 500
value: 100
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
margins: [8, 8, 8, 8]
spacing: 16
}
@GUI::Label {
fixed_width: 32
fixed_height: 32
name: "cursor_speed_image_label"
}
@GUI::Label {
text: "The relative speed of the mouse cursor."
text_alignment: "CenterLeft"
}
}
@GUI::Label {
name: "speed_label"
text: "100.0 %"
fixed_width: 50
text_alignment: "CenterRight"
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::HorizontalSlider {
name: "speed_slider"
min: 0
max: 100
value: 50
}
@GUI::Label {
fixed_width: 40
name: "speed_label"
}
}
}
@GUI::GroupBox {
title: "Scroll length"
fixed_height: 60
title: "Scroll wheel step size"
fixed_height: 110
layout: @GUI::HorizontalBoxLayout {
margins: [16, 16, 8, 6]
layout: @GUI::VerticalBoxLayout {
margins: [8, 16, 8, 8]
}
@GUI::Label {
text: "Scroll by "
autosize: true
text_alignment: "CenterLeft"
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
margins: [8, 8, 8, 8]
spacing: 16
}
@GUI::Label {
fixed_width: 32
fixed_height: 32
name: "scroll_step_size_image_label"
}
@GUI::Label {
text: "The number of steps taken when the scroll wheel is\nmoved a single notch."
text_alignment: "CenterLeft"
}
}
@GUI::SpinBox {
name: "scroll_length_spinbox"
max: 32
min: 1
value: 4
text_alignment: "CenterRight"
fixed_width: 80
}
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
spacing: 8
}
@GUI::Label {
text: " lines at a time"
text_alignent: "CenterLeft"
autosize: true
@GUI::Widget {
}
@GUI::Label {
autosize: true
text: "Step size:"
}
@GUI::SpinBox {
name: "scroll_length_spinbox"
min: 0
max: 100
value: 50
fixed_width: 100
}
@GUI::Widget {
}
}
}
@GUI::GroupBox {
title: "Double-click speed"
fixed_height: 60
fixed_height: 110
layout: @GUI::HorizontalBoxLayout {
margins: [6, 16, 8, 6]
layout: @GUI::VerticalBoxLayout {
margins: [8, 16, 8, 8]
}
@GUI::HorizontalSlider {
name: "double_click_speed_slider"
max: 900
min: 100
value: 250
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
margins: [8, 8, 8, 8]
spacing: 16
}
@MouseSettings::DoubleClickArrowWidget {
fixed_width: 32
fixed_height: 32
name: "double_click_arrow_widget"
}
@GUI::Label {
text: "The maximum time that may pass between two clicks\nin order for them to become a double-click."
text_alignment: "CenterLeft"
}
}
@GUI::Label {
name: "double_click_speed_label"
text: "250 ms"
fixed_width: 50
text_alignment: "CenterRight"
}
}
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Widget {
fixed_height: 22
@GUI::HorizontalSlider {
name: "double_click_speed_slider"
min: 0
max: 100
value: 50
}
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Button {
name: "ok_button"
text: "OK"
}
@GUI::Button {
name: "apply_button"
text: "Apply"
}
@GUI::Button {
name: "reset_button"
text: "Reset"
@GUI::Label {
fixed_width: 40
name: "double_click_speed_label"
}
}
}
}