mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
GSlider: Make the knob width proportional to the range, if in that mode (#288)
Regardless of mode, made the knob container clickable so the knob position can be moved without dragging the knob itself. Added a 3rd GSlider to the WidgetGallery showing the proportional mode in action.
This commit is contained in:
parent
eb64a4ca60
commit
01998a10e3
Notes:
sideshowbarker
2024-07-19 13:19:20 +09:00
Author: https://github.com/aslak3
Commit: 01998a10e3
Pull-request: https://github.com/SerenityOS/serenity/pull/288
Reviewed-by: https://github.com/awesomekling ✅
3 changed files with 39 additions and 10 deletions
3
Demos/WidgetGallery/main.cpp
Normal file → Executable file
3
Demos/WidgetGallery/main.cpp
Normal file → Executable file
|
@ -70,6 +70,9 @@ int main(int argc, char** argv)
|
|||
(void)slider1;
|
||||
auto* slider2 = new GSlider(main_widget);
|
||||
slider2->set_enabled(false);
|
||||
auto* slider3 = new GSlider(main_widget);
|
||||
slider3->set_max(5);
|
||||
slider3->set_knob_size_mode(GSlider::KnobSizeMode::Proportional);
|
||||
|
||||
auto* scrollbar1 = new GScrollBar(Orientation::Horizontal, main_widget);
|
||||
scrollbar1->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue