summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-24 22:01:32 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-24 22:01:32 +0100
commitaae54bdbde5fb8c0100eaaaeaa00194f3a0fcdd6 (patch)
tree1a3ba4fdb7d551e683110de8beffc654fb5c6044 /Libraries
parenta79bac428b7857b9db2d0641daf3b7f2e3deb91f (diff)
downloadserenity-aae54bdbde5fb8c0100eaaaeaa00194f3a0fcdd6.zip
LibDraw: Add ColorRole::BaseText (to be painted on ColorRole::Base)
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibDraw/Palette.h1
-rw-r--r--Libraries/LibDraw/SystemTheme.cpp1
-rw-r--r--Libraries/LibDraw/SystemTheme.h1
-rw-r--r--Libraries/LibGUI/GItemView.cpp2
-rw-r--r--Libraries/LibGUI/GListView.cpp1
-rw-r--r--Libraries/LibGUI/GTableView.cpp1
-rw-r--r--Libraries/LibGUI/GTextEditor.cpp2
-rw-r--r--Libraries/LibGUI/GTreeView.cpp1
8 files changed, 10 insertions, 0 deletions
diff --git a/Libraries/LibDraw/Palette.h b/Libraries/LibDraw/Palette.h
index e7cbd22211..2d5acf784f 100644
--- a/Libraries/LibDraw/Palette.h
+++ b/Libraries/LibDraw/Palette.h
@@ -31,6 +31,7 @@ public:
Color menu_base() const { return color(ColorRole::MenuBase); }
Color menu_selection() const { return color(ColorRole::MenuSelection); }
Color base() const { return color(ColorRole::Base); }
+ Color base_text() const { return color(ColorRole::BaseText); }
Color button() const { return color(ColorRole::Button); }
Color button_text() const { return color(ColorRole::ButtonText); }
Color threed_highlight() const { return color(ColorRole::ThreedHighlight); }
diff --git a/Libraries/LibDraw/SystemTheme.cpp b/Libraries/LibDraw/SystemTheme.cpp
index 1ca8ede2eb..38178f9be4 100644
--- a/Libraries/LibDraw/SystemTheme.cpp
+++ b/Libraries/LibDraw/SystemTheme.cpp
@@ -54,6 +54,7 @@ RefPtr<SharedBuffer> load_system_theme(const String& path)
DO_COLOR(Window);
DO_COLOR(WindowText);
DO_COLOR(Base);
+ DO_COLOR(BaseText);
DO_COLOR(Button);
DO_COLOR(ButtonText);
DO_COLOR(DesktopBackground);
diff --git a/Libraries/LibDraw/SystemTheme.h b/Libraries/LibDraw/SystemTheme.h
index 4150dbef41..b7b153546e 100644
--- a/Libraries/LibDraw/SystemTheme.h
+++ b/Libraries/LibDraw/SystemTheme.h
@@ -27,6 +27,7 @@ enum class ColorRole {
Button,
ButtonText,
Base,
+ BaseText,
ThreedHighlight,
ThreedShadow1,
ThreedShadow2,
diff --git a/Libraries/LibGUI/GItemView.cpp b/Libraries/LibGUI/GItemView.cpp
index 15581486b7..31c69d3299 100644
--- a/Libraries/LibGUI/GItemView.cpp
+++ b/Libraries/LibGUI/GItemView.cpp
@@ -10,6 +10,8 @@
GItemView::GItemView(GWidget* parent)
: GAbstractView(parent)
{
+ set_background_role(ColorRole::Base);
+ set_foreground_role(ColorRole::BaseText);
set_frame_shape(FrameShape::Container);
set_frame_shadow(FrameShadow::Sunken);
set_frame_thickness(2);
diff --git a/Libraries/LibGUI/GListView.cpp b/Libraries/LibGUI/GListView.cpp
index d9971469ca..c41f68e151 100644
--- a/Libraries/LibGUI/GListView.cpp
+++ b/Libraries/LibGUI/GListView.cpp
@@ -8,6 +8,7 @@ GListView::GListView(GWidget* parent)
: GAbstractView(parent)
{
set_background_role(ColorRole::Base);
+ set_foreground_role(ColorRole::BaseText);
set_frame_shape(FrameShape::Container);
set_frame_shadow(FrameShadow::Sunken);
set_frame_thickness(2);
diff --git a/Libraries/LibGUI/GTableView.cpp b/Libraries/LibGUI/GTableView.cpp
index e4a90e7d91..5b88dd96a9 100644
--- a/Libraries/LibGUI/GTableView.cpp
+++ b/Libraries/LibGUI/GTableView.cpp
@@ -14,6 +14,7 @@ GTableView::GTableView(GWidget* parent)
: GAbstractColumnView(parent)
{
set_background_role(ColorRole::Base);
+ set_foreground_role(ColorRole::BaseText);
}
GTableView::~GTableView()
diff --git a/Libraries/LibGUI/GTextEditor.cpp b/Libraries/LibGUI/GTextEditor.cpp
index accd3890d6..8416950cb4 100644
--- a/Libraries/LibGUI/GTextEditor.cpp
+++ b/Libraries/LibGUI/GTextEditor.cpp
@@ -26,6 +26,8 @@ GTextEditor::GTextEditor(Type type, GWidget* parent)
: GScrollableWidget(parent)
, m_type(type)
{
+ set_background_role(ColorRole::Base);
+ set_foreground_role(ColorRole::BaseText);
set_document(GTextDocument::create());
set_frame_shape(FrameShape::Container);
set_frame_shadow(FrameShadow::Sunken);
diff --git a/Libraries/LibGUI/GTreeView.cpp b/Libraries/LibGUI/GTreeView.cpp
index a74b36768b..0310509dc5 100644
--- a/Libraries/LibGUI/GTreeView.cpp
+++ b/Libraries/LibGUI/GTreeView.cpp
@@ -25,6 +25,7 @@ GTreeView::GTreeView(GWidget* parent)
: GAbstractColumnView(parent)
{
set_background_role(ColorRole::Base);
+ set_foreground_role(ColorRole::BaseText);
set_size_columns_to_fit_content(true);
set_headers_visible(false);
m_expand_bitmap = GraphicsBitmap::load_from_file("/res/icons/treeview-expand.png");