mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
LibGUI: Don't fill widgets with background color by defualt.
This commit is contained in:
parent
6836e21d1c
commit
5d69bf06d2
14 changed files with 12 additions and 16 deletions
|
@ -9,6 +9,8 @@ FontEditorWidget::FontEditorWidget(const String& path, RetainPtr<Font>&& edited_
|
|||
: GWidget(parent)
|
||||
, m_edited_font(move(edited_font))
|
||||
{
|
||||
set_fill_with_background_color(true);
|
||||
|
||||
if (path.is_empty())
|
||||
m_path = "/tmp/saved.font";
|
||||
else
|
||||
|
|
|
@ -64,6 +64,7 @@ GWindow* make_launcher_window()
|
|||
window->set_rect(50, 50, 300, 60);
|
||||
|
||||
auto* widget = new GWidget;
|
||||
widget->set_fill_with_background_color(true);
|
||||
widget->set_layout(make<GBoxLayout>(Orientation::Horizontal));
|
||||
widget->layout()->set_margins({ 5, 5, 5, 5 });
|
||||
window->set_main_widget(widget);
|
||||
|
|
|
@ -18,17 +18,14 @@ MemoryStatsWidget::MemoryStatsWidget(GWidget* parent)
|
|||
|
||||
auto build_widgets_for_label = [this] (const String& description) -> GLabel* {
|
||||
auto* container = new GWidget(this);
|
||||
container->set_fill_with_background_color(false);
|
||||
container->set_layout(make<GBoxLayout>(Orientation::Horizontal));
|
||||
container->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
|
||||
container->set_preferred_size({ 250, 12 });
|
||||
auto* description_label = new GLabel(container);
|
||||
auto* description_label = new GLabel(description, container);
|
||||
description_label->set_font(Font::default_bold_font());
|
||||
description_label->set_text_alignment(TextAlignment::CenterLeft);
|
||||
description_label->set_text(description);
|
||||
auto* label = new GLabel(container);
|
||||
label->set_text_alignment(TextAlignment::CenterRight);
|
||||
label->set_fill_with_background_color(false);
|
||||
return label;
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ int main(int argc, char** argv)
|
|||
GApplication app(argc, argv);
|
||||
|
||||
auto* widget = new GWidget;
|
||||
widget->set_fill_with_background_color(false);
|
||||
widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
|
||||
|
||||
auto* toolbar = new GToolBar(widget);
|
||||
|
|
|
@ -41,8 +41,6 @@ Terminal::Terminal(int ptm_fd)
|
|||
flush_dirty_lines();
|
||||
};
|
||||
|
||||
set_fill_with_background_color(false);
|
||||
|
||||
m_line_height = font().glyph_height() + m_line_spacing;
|
||||
|
||||
set_size(80, 25);
|
||||
|
|
|
@ -19,7 +19,6 @@ int main(int argc, char** argv)
|
|||
GApplication app(argc, argv);
|
||||
|
||||
auto* widget = new GWidget;
|
||||
widget->set_fill_with_background_color(false);
|
||||
widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
|
||||
|
||||
auto* toolbar = new GToolBar(widget);
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
GButton::GButton(GWidget* parent)
|
||||
: GWidget(parent)
|
||||
{
|
||||
set_fill_with_background_color(false);
|
||||
}
|
||||
|
||||
GButton::~GButton()
|
||||
|
|
|
@ -7,6 +7,12 @@ GLabel::GLabel(GWidget* parent)
|
|||
{
|
||||
}
|
||||
|
||||
GLabel::GLabel(const String& text, GWidget* parent)
|
||||
: GWidget(parent)
|
||||
, m_text(text)
|
||||
{
|
||||
}
|
||||
|
||||
GLabel::~GLabel()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 });
|
||||
|
|
|
@ -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 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue