diff options
Diffstat (limited to 'Userland/Applications/PixelPaint/RectangleSelectTool.cpp')
-rw-r--r-- | Userland/Applications/PixelPaint/RectangleSelectTool.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Userland/Applications/PixelPaint/RectangleSelectTool.cpp b/Userland/Applications/PixelPaint/RectangleSelectTool.cpp index 25038e9ed0..b84d4ec8d9 100644 --- a/Userland/Applications/PixelPaint/RectangleSelectTool.cpp +++ b/Userland/Applications/PixelPaint/RectangleSelectTool.cpp @@ -153,13 +153,16 @@ GUI::Widget* RectangleSelectTool::get_properties_widget() feather_label.set_text_alignment(Gfx::TextAlignment::CenterLeft); feather_label.set_fixed_size(80, 20); - int feather_slider_max = 10000; + const int feather_slider_max = 10000; auto& feather_slider = feather_container.add<GUI::HorizontalSlider>(); feather_slider.set_fixed_height(20); feather_slider.set_range(0, feather_slider_max); feather_slider.set_value((int)floorf(m_edge_feathering * (float)feather_slider_max)); - feather_slider.on_change = [this, feather_slider_max](int value) { + feather_slider.set_tooltip(String::formatted("{:.2}", (float)m_edge_feathering / (float)feather_slider_max)); + + feather_slider.on_change = [&](int value) { m_edge_feathering = (float)value / (float)feather_slider_max; + feather_slider.set_tooltip(String::formatted("{:.2}", (float)value / (float)feather_slider_max)); }; auto& mode_container = m_properties_widget->add<GUI::Widget>(); |