LibDraw: Add ColorRole::BaseText (to be painted on ColorRole::Base)

This commit is contained in:
Andreas Kling 2019-12-24 22:01:32 +01:00
parent a79bac428b
commit aae54bdbde
Notes: sideshowbarker 2024-07-19 10:42:26 +09:00
11 changed files with 13 additions and 0 deletions

View file

@ -26,6 +26,7 @@ WindowText=white
Button=#555555
ButtonText=white
Base=#424242
BaseText=white
ThreedHighlight=#6f6f6f
ThreedShadow1=#3d3e40

View file

@ -27,6 +27,7 @@ Button=#d4d0c8
ButtonText=black
Base=white
BaseText=black
ThreedHighlight=white
ThreedShadow1=#808080

View file

@ -27,6 +27,7 @@ Button=#d46c64
ButtonText=black
Base=#d3d7c4
BaseText=black
ThreedHighlight=#e69e99
ThreedShadow1=#a24841

View file

@ -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); }

View file

@ -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);

View file

@ -27,6 +27,7 @@ enum class ColorRole {
Button,
ButtonText,
Base,
BaseText,
ThreedHighlight,
ThreedShadow1,
ThreedShadow2,

View file

@ -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);

View file

@ -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);

View file

@ -14,6 +14,7 @@ GTableView::GTableView(GWidget* parent)
: GAbstractColumnView(parent)
{
set_background_role(ColorRole::Base);
set_foreground_role(ColorRole::BaseText);
}
GTableView::~GTableView()

View file

@ -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);

View file

@ -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");