summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/EllipseTool.cpp
diff options
context:
space:
mode:
authorMarcus Nilsson <brainbomb@gmail.com>2021-08-03 12:46:10 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-03 18:53:54 +0200
commitb6200a3ed83a19bfc5da411eb41abdab8032f8b2 (patch)
tree12065fa9df119a2cb61315778702ed8cb8f0bbb1 /Userland/Applications/PixelPaint/EllipseTool.cpp
parent4df16578980ef3d2b11bb364626ba4f9e16cfcc0 (diff)
downloadserenity-b6200a3ed83a19bfc5da411eb41abdab8032f8b2.zip
PixelPaint: Add tooltips for sliders in ToolPropertiesWidget
This adds a tooltip to all the slider properties showing their current value. Previously there was no indication of what value they had. Also rename the SprayTool property 'thickness' to 'size' like BrushTool calls it.
Diffstat (limited to 'Userland/Applications/PixelPaint/EllipseTool.cpp')
-rw-r--r--Userland/Applications/PixelPaint/EllipseTool.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/EllipseTool.cpp b/Userland/Applications/PixelPaint/EllipseTool.cpp
index d70d3f3c23..b996d497d4 100644
--- a/Userland/Applications/PixelPaint/EllipseTool.cpp
+++ b/Userland/Applications/PixelPaint/EllipseTool.cpp
@@ -113,8 +113,11 @@ GUI::Widget* EllipseTool::get_properties_widget()
thickness_slider.set_fixed_height(20);
thickness_slider.set_range(1, 10);
thickness_slider.set_value(m_thickness);
+ thickness_slider.set_tooltip(String::formatted("{}px", m_thickness));
+
thickness_slider.on_change = [&](int value) {
m_thickness = value;
+ thickness_slider.set_tooltip(String::formatted("{}px", value));
};
auto& mode_container = m_properties_widget->add<GUI::Widget>();