summaryrefslogtreecommitdiff
path: root/Demos/WidgetGallery/main.cpp
diff options
context:
space:
mode:
authorLawrence Manning <lawrence@aslak.net>2019-07-11 15:31:43 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-07-11 16:31:43 +0200
commit01998a10e3c06e5a352b055e8854632379ed0a55 (patch)
tree0f85599cf04f8448efbb5cb339a038fdc2c9e0e2 /Demos/WidgetGallery/main.cpp
parenteb64a4ca6039733f0c34390d31300d8970a1e9ea (diff)
downloadserenity-01998a10e3c06e5a352b055e8854632379ed0a55.zip
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.
Diffstat (limited to 'Demos/WidgetGallery/main.cpp')
-rwxr-xr-x[-rw-r--r--]Demos/WidgetGallery/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Demos/WidgetGallery/main.cpp b/Demos/WidgetGallery/main.cpp
index 3eb581eb86..5fb1cd91f1 100644..100755
--- a/Demos/WidgetGallery/main.cpp
+++ b/Demos/WidgetGallery/main.cpp
@@ -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);