diff options
-rw-r--r-- | Demos/DynamicObject/main.cpp | 1 | ||||
-rw-r--r-- | Demos/HelloWorld/main.cpp | 1 | ||||
-rw-r--r-- | DevTools/HackStudio/FormEditorWidget.cpp | 1 | ||||
-rw-r--r-- | DevTools/Profiler/ProfileTimelineWidget.cpp | 1 | ||||
-rw-r--r-- | Games/Minesweeper/Field.cpp | 6 | ||||
-rw-r--r-- | Libraries/LibGUI/Widget.h | 8 | ||||
-rw-r--r-- | Services/Taskbar/TaskbarWindow.cpp | 6 |
7 files changed, 5 insertions, 19 deletions
diff --git a/Demos/DynamicObject/main.cpp b/Demos/DynamicObject/main.cpp index dac2bb9617..541aa6ea0d 100644 --- a/Demos/DynamicObject/main.cpp +++ b/Demos/DynamicObject/main.cpp @@ -59,7 +59,6 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv, [[maybe_unused auto& main_widget = window->set_main_widget<GUI::Widget>(); main_widget.set_fill_with_background_color(true); - main_widget.set_background_color(Color::White); auto& layout = main_widget.set_layout<GUI::VerticalBoxLayout>(); layout.set_margins({ 4, 4, 4, 4 }); diff --git a/Demos/HelloWorld/main.cpp b/Demos/HelloWorld/main.cpp index 0413c0bedd..4c39b30b66 100644 --- a/Demos/HelloWorld/main.cpp +++ b/Demos/HelloWorld/main.cpp @@ -59,7 +59,6 @@ int main(int argc, char** argv) auto& main_widget = window->set_main_widget<GUI::Widget>(); main_widget.set_fill_with_background_color(true); - main_widget.set_background_color(Color::White); auto& layout = main_widget.set_layout<GUI::VerticalBoxLayout>(); layout.set_margins({ 4, 4, 4, 4 }); diff --git a/DevTools/HackStudio/FormEditorWidget.cpp b/DevTools/HackStudio/FormEditorWidget.cpp index efc0d494ec..9e9773d2c7 100644 --- a/DevTools/HackStudio/FormEditorWidget.cpp +++ b/DevTools/HackStudio/FormEditorWidget.cpp @@ -36,7 +36,6 @@ FormEditorWidget::FormEditorWidget() : m_tool(make<CursorTool>(*this)) { set_fill_with_background_color(true); - set_background_color(Color::MidGray); m_form_widget = add<FormWidget>(); m_widget_tree_model = WidgetTreeModel::create(*m_form_widget); diff --git a/DevTools/Profiler/ProfileTimelineWidget.cpp b/DevTools/Profiler/ProfileTimelineWidget.cpp index bbaf38973f..7d4552d300 100644 --- a/DevTools/Profiler/ProfileTimelineWidget.cpp +++ b/DevTools/Profiler/ProfileTimelineWidget.cpp @@ -31,7 +31,6 @@ ProfileTimelineWidget::ProfileTimelineWidget(Profile& profile) : m_profile(profile) { - set_background_color(Color::White); set_fill_with_background_color(true); set_fixed_height(80); } diff --git a/Games/Minesweeper/Field.cpp b/Games/Minesweeper/Field.cpp index bfe1bddd4a..75183d1963 100644 --- a/Games/Minesweeper/Field.cpp +++ b/Games/Minesweeper/Field.cpp @@ -252,7 +252,11 @@ void Field::reset() square.is_swept = false; if (!square.label) { square.label = add<SquareLabel>(square); - square.label->set_background_color(Color::from_rgb(0xff4040)); + // Square with mine will be filled with background color later, i.e. red + auto palette = square.label->palette(); + palette.set_color(Gfx::ColorRole::Base, Color::from_rgb(0xff4040)); + square.label->set_palette(palette); + square.label->set_background_role(Gfx::ColorRole::Base); } square.label->set_fill_with_background_color(false); square.label->set_relative_rect(rect); diff --git a/Libraries/LibGUI/Widget.h b/Libraries/LibGUI/Widget.h index 5735d7326f..cde61ef20e 100644 --- a/Libraries/LibGUI/Widget.h +++ b/Libraries/LibGUI/Widget.h @@ -214,12 +214,6 @@ public: Gfx::ColorRole foreground_role() const { return m_foreground_role; } void set_foreground_role(Gfx::ColorRole); - Color background_color() const { return m_background_color; } - Color foreground_color() const { return m_foreground_color; } - - void set_background_color(Color color) { m_background_color = color; } - void set_foreground_color(Color color) { m_foreground_color = color; } - void set_autofill(bool b) { set_fill_with_background_color(b); } Window* window() @@ -359,8 +353,6 @@ private: Gfx::IntRect m_relative_rect; Gfx::ColorRole m_background_role; Gfx::ColorRole m_foreground_role; - Color m_background_color; - Color m_foreground_color; NonnullRefPtr<Gfx::Font> m_font; String m_tooltip; diff --git a/Services/Taskbar/TaskbarWindow.cpp b/Services/Taskbar/TaskbarWindow.cpp index 9ad590c495..a68dedc4c9 100644 --- a/Services/Taskbar/TaskbarWindow.cpp +++ b/Services/Taskbar/TaskbarWindow.cpp @@ -206,12 +206,6 @@ void TaskbarWindow::update_window_button(::Window& window, bool show_as_active) auto* button = window.button(); if (!button) return; - - if (window.is_minimized()) { - button->set_foreground_color(Color::DarkGray); - } else { - button->set_foreground_color(Color::Black); - } button->set_text(window.title()); button->set_checked(show_as_active); } |