diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-10 13:16:36 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-10 13:16:36 +0100 |
commit | 5d69bf06d231cb3fee25f79065461198dbb8cb53 (patch) | |
tree | 7a4490c16dfbe95f217b8b908c507130c515777a /LibGUI | |
parent | 6836e21d1c9e1e9b00b5f87ac988d2f2a7639796 (diff) | |
download | serenity-5d69bf06d231cb3fee25f79065461198dbb8cb53.zip |
LibGUI: Don't fill widgets with background color by defualt.
Diffstat (limited to 'LibGUI')
-rw-r--r-- | LibGUI/GButton.cpp | 1 | ||||
-rw-r--r-- | LibGUI/GLabel.cpp | 6 | ||||
-rw-r--r-- | LibGUI/GLabel.h | 1 | ||||
-rw-r--r-- | LibGUI/GStatusBar.cpp | 1 | ||||
-rw-r--r-- | LibGUI/GTableView.cpp | 2 | ||||
-rw-r--r-- | LibGUI/GTextEditor.cpp | 2 | ||||
-rw-r--r-- | LibGUI/GToolBar.cpp | 1 | ||||
-rw-r--r-- | LibGUI/GWidget.h | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/LibGUI/GButton.cpp b/LibGUI/GButton.cpp index f612cac7c2..4b1a35b988 100644 --- a/LibGUI/GButton.cpp +++ b/LibGUI/GButton.cpp @@ -7,7 +7,6 @@ GButton::GButton(GWidget* parent) : GWidget(parent) { - set_fill_with_background_color(false); } GButton::~GButton() diff --git a/LibGUI/GLabel.cpp b/LibGUI/GLabel.cpp index 2962d04051..c674a674a6 100644 --- a/LibGUI/GLabel.cpp +++ b/LibGUI/GLabel.cpp @@ -7,6 +7,12 @@ GLabel::GLabel(GWidget* parent) { } +GLabel::GLabel(const String& text, GWidget* parent) + : GWidget(parent) + , m_text(text) +{ +} + GLabel::~GLabel() { } diff --git a/LibGUI/GLabel.h b/LibGUI/GLabel.h index 29d42eb465..6f1e9fc700 100644 --- a/LibGUI/GLabel.h +++ b/LibGUI/GLabel.h @@ -9,6 +9,7 @@ class GraphicsBitmap; class GLabel final : public GWidget { public: explicit GLabel(GWidget* parent); + GLabel(const String& text, GWidget* parent); virtual ~GLabel() override; String text() const { return m_text; } diff --git a/LibGUI/GStatusBar.cpp b/LibGUI/GStatusBar.cpp index a4b54f46ae..982e2d565b 100644 --- a/LibGUI/GStatusBar.cpp +++ b/LibGUI/GStatusBar.cpp @@ -13,7 +13,6 @@ GStatusBar::GStatusBar(GWidget* parent) layout()->set_margins({ 4, 2, 4, 2 }); m_label = new GLabel(this); m_label->set_text_alignment(TextAlignment::CenterLeft); - m_label->set_fill_with_background_color(false); } GStatusBar::~GStatusBar() diff --git a/LibGUI/GTableView.cpp b/LibGUI/GTableView.cpp index 61f64df896..f7918d4949 100644 --- a/LibGUI/GTableView.cpp +++ b/LibGUI/GTableView.cpp @@ -7,8 +7,6 @@ GTableView::GTableView(GWidget* parent) : GWidget(parent) { - set_fill_with_background_color(false); - m_vertical_scrollbar = new GScrollBar(Orientation::Vertical, this); m_vertical_scrollbar->set_step(4); m_vertical_scrollbar->on_change = [this] (int) { diff --git a/LibGUI/GTextEditor.cpp b/LibGUI/GTextEditor.cpp index bbaaface65..98b1f5a7d4 100644 --- a/LibGUI/GTextEditor.cpp +++ b/LibGUI/GTextEditor.cpp @@ -14,8 +14,6 @@ GTextEditor::GTextEditor(GWidget* parent) { set_font(GFontDatabase::the().get_by_name("Csilla Thin")); - set_fill_with_background_color(false); - m_vertical_scrollbar = new GScrollBar(Orientation::Vertical, this); m_vertical_scrollbar->set_step(4); m_vertical_scrollbar->on_change = [this] (int) { diff --git a/LibGUI/GToolBar.cpp b/LibGUI/GToolBar.cpp index e052e5fd1c..3024e218f8 100644 --- a/LibGUI/GToolBar.cpp +++ b/LibGUI/GToolBar.cpp @@ -46,7 +46,6 @@ public: SeparatorWidget(GWidget* parent) : GWidget(parent) { - set_fill_with_background_color(false); set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed); set_background_color(Color::White); set_preferred_size({ 8, 20 }); diff --git a/LibGUI/GWidget.h b/LibGUI/GWidget.h index 0a287e5988..a7fa50c8b7 100644 --- a/LibGUI/GWidget.h +++ b/LibGUI/GWidget.h @@ -140,5 +140,5 @@ private: SizePolicy m_vertical_size_policy { SizePolicy::Fill }; Size m_preferred_size; - bool m_fill_with_background_color { true }; + bool m_fill_with_background_color { false }; }; |