Переглянути джерело

PixelPaint: Use ValueSlider for radial gradient hardness

This makes this input consistent with the hardness properties of other
tools.
MacDue 2 роки тому
батько
коміт
bd0bf8250e

+ 2 - 1
Userland/Applications/PixelPaint/Tools/GradientTool.cpp

@@ -18,6 +18,7 @@
 #include <LibGUI/Label.h>
 #include <LibGUI/Label.h>
 #include <LibGUI/OpacitySlider.h>
 #include <LibGUI/OpacitySlider.h>
 #include <LibGUI/Painter.h>
 #include <LibGUI/Painter.h>
+#include <LibGUI/ValueSlider.h>
 #include <LibGfx/AntiAliasingPainter.h>
 #include <LibGfx/AntiAliasingPainter.h>
 #include <LibGfx/Color.h>
 #include <LibGfx/Color.h>
 #include <LibGfx/Gradients.h>
 #include <LibGfx/Gradients.h>
@@ -274,7 +275,7 @@ ErrorOr<GUI::Widget*> GradientTool::get_properties_widget()
         hardness_label->set_text_alignment(Gfx::TextAlignment::CenterLeft);
         hardness_label->set_text_alignment(Gfx::TextAlignment::CenterLeft);
         hardness_label->set_fixed_size(80, 20);
         hardness_label->set_fixed_size(80, 20);
 
 
-        auto hardness_slider = TRY(hardness_container->try_add<GUI::HorizontalOpacitySlider>());
+        auto hardness_slider = TRY(hardness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "%"_short_string));
         hardness_slider->set_range(1, 99);
         hardness_slider->set_range(1, 99);
         hardness_slider->set_value(m_hardness);
         hardness_slider->set_value(m_hardness);
         hardness_slider->on_change = [this](int value) {
         hardness_slider->on_change = [this](int value) {