mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:07:46 +00:00
PixelPaint: Use GUI::OpacitySlider for layer opacity settings
This commit is contained in:
parent
0b55b0bdb8
commit
47028c56c6
2 changed files with 3 additions and 4 deletions
|
@ -30,7 +30,7 @@
|
||||||
#include <LibGUI/CheckBox.h>
|
#include <LibGUI/CheckBox.h>
|
||||||
#include <LibGUI/GroupBox.h>
|
#include <LibGUI/GroupBox.h>
|
||||||
#include <LibGUI/Label.h>
|
#include <LibGUI/Label.h>
|
||||||
#include <LibGUI/Slider.h>
|
#include <LibGUI/OpacitySlider.h>
|
||||||
#include <LibGUI/TextBox.h>
|
#include <LibGUI/TextBox.h>
|
||||||
#include <LibGfx/Font.h>
|
#include <LibGfx/Font.h>
|
||||||
|
|
||||||
|
@ -68,8 +68,7 @@ LayerPropertiesWidget::LayerPropertiesWidget()
|
||||||
opacity_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
opacity_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
||||||
opacity_label.set_fixed_size(80, 20);
|
opacity_label.set_fixed_size(80, 20);
|
||||||
|
|
||||||
m_opacity_slider = opacity_container.add<GUI::HorizontalSlider>();
|
m_opacity_slider = opacity_container.add<GUI::OpacitySlider>();
|
||||||
m_opacity_slider->set_fixed_height(20);
|
|
||||||
m_opacity_slider->set_range(0, 100);
|
m_opacity_slider->set_range(0, 100);
|
||||||
m_opacity_slider->on_change = [this](int value) {
|
m_opacity_slider->on_change = [this](int value) {
|
||||||
if (m_layer)
|
if (m_layer)
|
||||||
|
|
|
@ -44,7 +44,7 @@ private:
|
||||||
LayerPropertiesWidget();
|
LayerPropertiesWidget();
|
||||||
|
|
||||||
RefPtr<GUI::CheckBox> m_visibility_checkbox;
|
RefPtr<GUI::CheckBox> m_visibility_checkbox;
|
||||||
RefPtr<GUI::HorizontalSlider> m_opacity_slider;
|
RefPtr<GUI::OpacitySlider> m_opacity_slider;
|
||||||
RefPtr<GUI::TextBox> m_name_textbox;
|
RefPtr<GUI::TextBox> m_name_textbox;
|
||||||
|
|
||||||
WeakPtr<Layer> m_layer;
|
WeakPtr<Layer> m_layer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue