Skip to content

Commit

Permalink
LibGUI: Remove unused Widget backcolor/forecolor properties
Browse files Browse the repository at this point in the history
These were some leftovers from the VisualBuilder times.
  • Loading branch information
awesomekling committed Dec 30, 2020
1 parent 96cd04f commit e07a66d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion Applications/DisplaySettings/DisplaySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ void DisplaySettingsWidget::create_frame()

auto& settings_content = m_root_widget->add<GUI::Widget>();
settings_content.set_layout<GUI::VerticalBoxLayout>();
settings_content.set_backcolor("red");
settings_content.set_background_color(Color::Blue);
settings_content.set_background_role(Gfx::ColorRole::Window);
settings_content.layout()->set_margins({ 4, 4, 4, 4 });
Expand Down
16 changes: 0 additions & 16 deletions Libraries/LibGUI/Widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,22 +838,6 @@ void Widget::focus_next_widget(FocusSource source)
}
}

void Widget::set_backcolor(const StringView& color_string)
{
auto color = Color::from_string(color_string);
if (!color.has_value())
return;
set_background_color(color.value());
}

void Widget::set_forecolor(const StringView& color_string)
{
auto color = Color::from_string(color_string);
if (!color.has_value())
return;
set_foreground_color(color.value());
}

Vector<Widget*> Widget::child_widgets() const
{
Vector<Widget*> widgets;
Expand Down
3 changes: 0 additions & 3 deletions Libraries/LibGUI/Widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@ class Widget : public Core::Object {
void set_background_color(Color color) { m_background_color = color; }
void set_foreground_color(Color color) { m_foreground_color = color; }

void set_backcolor(const StringView&);
void set_forecolor(const StringView&);

void set_autofill(bool b) { set_fill_with_background_color(b); }

Window* window()
Expand Down

0 comments on commit e07a66d

Please sign in to comment.