mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
LibGUI: Make GUI::Frame have the 2px sunken container look by default
The overwhelming majority of GUI::Frame users set the same appearance, so let's just make it the default.
This commit is contained in:
parent
3d20da9ee4
commit
bfd86c4631
27 changed files with 7 additions and 91 deletions
|
@ -276,9 +276,6 @@ void PropertiesDialog::make_divider(NonnullRefPtr<GUI::Widget>& parent)
|
|||
auto divider = parent->add<GUI::Frame>();
|
||||
divider->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
||||
divider->set_preferred_size({ 0, 2 });
|
||||
divider->set_frame_shape(Gfx::FrameShape::HorizontalLine);
|
||||
divider->set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
divider->set_frame_thickness(2);
|
||||
|
||||
parent->layout()->add_spacer();
|
||||
}
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
GlyphEditorWidget::GlyphEditorWidget(Gfx::Font& mutable_font)
|
||||
: m_font(mutable_font)
|
||||
{
|
||||
set_frame_thickness(2);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
set_relative_rect({ 0, 0, preferred_width(), preferred_height() });
|
||||
}
|
||||
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
GlyphMapWidget::GlyphMapWidget(Gfx::Font& mutable_font)
|
||||
: m_font(mutable_font)
|
||||
{
|
||||
set_frame_thickness(2);
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_relative_rect({ 0, 0, preferred_width(), preferred_height() });
|
||||
}
|
||||
|
||||
|
|
|
@ -44,9 +44,6 @@
|
|||
HexEditor::HexEditor(GUI::Widget* parent)
|
||||
: ScrollableWidget(parent)
|
||||
{
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_thickness(2);
|
||||
set_scrollbars_enabled(true);
|
||||
set_font(GFontDatabase::the().get_by_name("Csilla Thin"));
|
||||
set_background_role(ColorRole::Base);
|
||||
|
|
|
@ -37,9 +37,6 @@ public:
|
|||
: m_palette_widget(palette_widget)
|
||||
, m_color(color)
|
||||
{
|
||||
set_frame_thickness(2);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
}
|
||||
|
||||
virtual ~ColorWidget() override
|
||||
|
@ -83,17 +80,11 @@ PaletteWidget::PaletteWidget(PaintableWidget& paintable_widget)
|
|||
set_preferred_size(0, 34);
|
||||
|
||||
m_secondary_color_widget = add<GUI::Frame>();
|
||||
m_secondary_color_widget->set_frame_thickness(2);
|
||||
m_secondary_color_widget->set_frame_shape(Gfx::FrameShape::Container);
|
||||
m_secondary_color_widget->set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
m_secondary_color_widget->set_relative_rect({ 2, 2, 60, 31 });
|
||||
m_secondary_color_widget->set_fill_with_background_color(true);
|
||||
set_secondary_color(paintable_widget.secondary_color());
|
||||
|
||||
m_primary_color_widget = add<GUI::Frame>();
|
||||
m_primary_color_widget->set_frame_thickness(2);
|
||||
m_primary_color_widget->set_frame_shape(Gfx::FrameShape::Container);
|
||||
m_primary_color_widget->set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
Gfx::Rect rect { 0, 0, 38, 15 };
|
||||
rect.center_within(m_secondary_color_widget->relative_rect());
|
||||
m_primary_color_widget->set_relative_rect(rect);
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
KeysWidget::KeysWidget(AudioEngine& audio_engine)
|
||||
: m_audio_engine(audio_engine)
|
||||
{
|
||||
set_frame_thickness(2);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
set_fill_with_background_color(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,9 +36,6 @@ KnobsWidget::KnobsWidget(AudioEngine& audio_engine, MainWidget& main_widget)
|
|||
: m_audio_engine(audio_engine)
|
||||
, m_main_widget(main_widget)
|
||||
{
|
||||
set_frame_thickness(2);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
set_layout(make<GUI::VerticalBoxLayout>());
|
||||
set_fill_with_background_color(true);
|
||||
|
||||
|
|
|
@ -36,10 +36,6 @@ constexpr int roll_height = note_count * note_height;
|
|||
RollWidget::RollWidget(AudioEngine& audio_engine)
|
||||
: m_audio_engine(audio_engine)
|
||||
{
|
||||
set_frame_thickness(2);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
|
||||
set_should_hide_unnecessary_scrollbars(true);
|
||||
set_content_size({ 0, roll_height });
|
||||
vertical_scrollbar().set_value(roll_height / 2);
|
||||
|
|
|
@ -36,9 +36,6 @@
|
|||
WaveEditor::WaveEditor(AudioEngine& audio_engine)
|
||||
: m_audio_engine(audio_engine)
|
||||
{
|
||||
set_frame_thickness(2);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
}
|
||||
|
||||
WaveEditor::~WaveEditor()
|
||||
|
@ -94,9 +91,6 @@ void WaveEditor::paint_event(GUI::PaintEvent& event)
|
|||
SamplerWidget::SamplerWidget(AudioEngine& audio_engine)
|
||||
: m_audio_engine(audio_engine)
|
||||
{
|
||||
set_frame_thickness(2);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
set_layout(make<GUI::VerticalBoxLayout>());
|
||||
layout()->set_margins({ 10, 10, 10, 10 });
|
||||
layout()->set_spacing(10);
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
WaveWidget::WaveWidget(AudioEngine& audio_engine)
|
||||
: m_audio_engine(audio_engine)
|
||||
{
|
||||
set_frame_thickness(2);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
}
|
||||
|
||||
WaveWidget::~WaveWidget()
|
||||
|
|
|
@ -35,10 +35,6 @@
|
|||
QSWidget::QSWidget(GUI::Widget* parent)
|
||||
: GUI::Frame(parent)
|
||||
{
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_thickness(2);
|
||||
|
||||
set_fill_with_background_color(true);
|
||||
set_background_color(Color::Black);
|
||||
}
|
||||
|
|
|
@ -31,9 +31,6 @@
|
|||
|
||||
SampleWidget::SampleWidget()
|
||||
{
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
set_frame_thickness(2);
|
||||
}
|
||||
|
||||
SampleWidget::~SampleWidget()
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
|
||||
GraphWidget::GraphWidget()
|
||||
{
|
||||
set_frame_thickness(2);
|
||||
set_frame_shape(Gfx::FrameShape::Container);
|
||||
set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
}
|
||||
|
||||
GraphWidget::~GraphWidget()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue