From fc0f700c9d513a90b1d8c5807f5c836656f02e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Wed, 6 Jun 2012 12:18:57 +0200 Subject: [PATCH] Fix text colors on TabButton and ToolButton When the widgets use the button background frame, use buttonTextColor. When they do not use any background frame, use textColor. Avoids unreadable text with Oxygen REVIEW: 105163 --- .../plasmacomponents/platformcomponents/touch/ToolButton.qml | 2 +- declarativeimports/plasmacomponents/qml/TabButton.qml | 2 ++ declarativeimports/plasmacomponents/qml/ToolButton.qml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml b/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml index 71629fce8..157b15851 100644 --- a/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml +++ b/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml @@ -213,7 +213,7 @@ Item { font.underline: theme.defaultFont.underline font.weight: theme.defaultFont.weight font.wordSpacing: theme.defaultFont.wordSpacing - color: theme.buttonTextColor + color: surface.opacity == 1 ? theme.buttonTextColor : theme.textColor horizontalAlignment: icon.valid ? Text.AlignLeft : Text.AlignHCenter verticalAlignment: Text.AlignVCenter } diff --git a/declarativeimports/plasmacomponents/qml/TabButton.qml b/declarativeimports/plasmacomponents/qml/TabButton.qml index 0131b1293..5e635621b 100644 --- a/declarativeimports/plasmacomponents/qml/TabButton.qml +++ b/declarativeimports/plasmacomponents/qml/TabButton.qml @@ -140,6 +140,8 @@ Item { elide: Text.ElideRight horizontalAlignment: !internal.portrait && iconSource != null ? Text.AlignLeft : Text.AlignHCenter verticalAlignment: Text.AlignVCenter + + color: root.checked ? theme.buttonTextColor : theme.textColor } Private.IconLoader { diff --git a/declarativeimports/plasmacomponents/qml/ToolButton.qml b/declarativeimports/plasmacomponents/qml/ToolButton.qml index a5e9c834d..546e60b83 100644 --- a/declarativeimports/plasmacomponents/qml/ToolButton.qml +++ b/declarativeimports/plasmacomponents/qml/ToolButton.qml @@ -215,7 +215,7 @@ Item { font.underline: theme.defaultFont.underline font.weight: theme.defaultFont.weight font.wordSpacing: theme.defaultFont.wordSpacing - color: theme.buttonTextColor + color: surface.opacity == 1 ? theme.buttonTextColor : theme.textColor horizontalAlignment: icon.valid ? Text.AlignLeft : Text.AlignHCenter verticalAlignment: Text.AlignVCenter }