mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 19:07:15 +03:00
PixelPaint: Use GUI::OpacitySlider for layer opacity settings
This commit is contained in:
parent
0b55b0bdb8
commit
47028c56c6
Notes:
sideshowbarker
2024-07-19 00:18:55 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/47028c56c68
@ -30,7 +30,7 @@
|
||||
#include <LibGUI/CheckBox.h>
|
||||
#include <LibGUI/GroupBox.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Slider.h>
|
||||
#include <LibGUI/OpacitySlider.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGfx/Font.h>
|
||||
|
||||
@ -68,8 +68,7 @@ LayerPropertiesWidget::LayerPropertiesWidget()
|
||||
opacity_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
||||
opacity_label.set_fixed_size(80, 20);
|
||||
|
||||
m_opacity_slider = opacity_container.add<GUI::HorizontalSlider>();
|
||||
m_opacity_slider->set_fixed_height(20);
|
||||
m_opacity_slider = opacity_container.add<GUI::OpacitySlider>();
|
||||
m_opacity_slider->set_range(0, 100);
|
||||
m_opacity_slider->on_change = [this](int value) {
|
||||
if (m_layer)
|
||||
|
@ -44,7 +44,7 @@ private:
|
||||
LayerPropertiesWidget();
|
||||
|
||||
RefPtr<GUI::CheckBox> m_visibility_checkbox;
|
||||
RefPtr<GUI::HorizontalSlider> m_opacity_slider;
|
||||
RefPtr<GUI::OpacitySlider> m_opacity_slider;
|
||||
RefPtr<GUI::TextBox> m_name_textbox;
|
||||
|
||||
WeakPtr<Layer> m_layer;
|
||||
|
Loading…
Reference in New Issue
Block a user