1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +00:00

LibGUI+PixelPaint: Port GUI::ValueSlider's suffix to the new String

This commit is contained in:
Karol Kosek 2023-02-12 18:06:01 +01:00 committed by Linus Groh
parent c4507bb56e
commit 67ffc687d8
18 changed files with 30 additions and 29 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/String.h>
#include <LibGUI/AbstractSlider.h>
namespace GUI {
@ -22,7 +23,7 @@ public:
virtual ~ValueSlider() override = default;
void set_suffix(DeprecatedString suffix) { m_suffix = move(suffix); }
void set_suffix(String suffix) { m_suffix = move(suffix); }
void set_knob_style(KnobStyle knobstyle) { m_knob_style = knobstyle; }
virtual void set_value(int value, AllowCallback = AllowCallback::Yes, DoClamp = DoClamp::Yes) override;
@ -36,14 +37,14 @@ protected:
virtual void leave_event(Core::Event&) override;
private:
explicit ValueSlider(Gfx::Orientation = Gfx::Orientation::Horizontal, DeprecatedString suffix = "");
explicit ValueSlider(Gfx::Orientation = Gfx::Orientation::Horizontal, String suffix = {});
DeprecatedString formatted_value() const;
int value_at(Gfx::IntPoint position) const;
Gfx::IntRect bar_rect() const;
Gfx::IntRect knob_rect() const;
DeprecatedString m_suffix {};
String m_suffix {};
Orientation m_orientation { Orientation::Horizontal };
KnobStyle m_knob_style { KnobStyle::Thin };
RefPtr<GUI::TextBox> m_textbox;