Bug 258234 - [usability] white text on light blue background in "Tabs" applet
Summary: [usability] white text on light blue background in "Tabs" applet
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Context View (show other bugs)
Version: 2.4-GIT
Platform: Gentoo Packages Linux
: NOR normal (vote)
Target Milestone: 2.4.0
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-29 00:32 UTC by Alexander Potashev
Modified: 2010-12-04 12:22 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.4


Attachments
screenshot (104.47 KB, image/png)
2010-11-29 18:21 UTC, Alexander Potashev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potashev 2010-11-29 00:32:52 UTC
Version:           2.4-GIT (using KDE 4.5.80) 
OS:                Linux

The text of tabs in the "Tabs" applet is white, it might be hard to read it on light blue background.

The "Lyrics" applet has black text.

Reproducible: Always




OS: Linux (x86_64) release 2.6.32
Compiler: x86_64-pc-linux-gnu-gcc

Amarok build date: Nov 27 2010
Comment 1 Rainer Sigle 2010-11-29 14:12:43 UTC
Hi Alexander,

sorry, I'm not able to reproduce this. Besides some status messages shown in the information label, the default color for tabs should be black.

Do you use some specific theming on your system? Would you be so kind and post a screenshot of the issue? Thanks.

Regards,
Rainer
Comment 2 Alexander Potashev 2010-11-29 18:20:43 UTC
I'm using QtCurve ("Plastic"), but the text is also white with Oxygen.
Comment 3 Alexander Potashev 2010-11-29 18:21:21 UTC
Created attachment 53865 [details]
screenshot
Comment 4 Mikko C. 2010-11-29 18:55:19 UTC
This bug affected lyrics applet too. It only happens with kde 4.6 and later.
It was fixed in the lyrics applet by this commit: http://gitweb.kde.org/amarok.git/commit/22194423ea7abdbaeb0ced58f4d21e39734d29cd
Comment 5 Myriam Schweingruber 2010-11-29 21:08:56 UTC
Confirmed by comment #4
Comment 6 Rainer Sigle 2010-11-29 22:11:59 UTC
Thanks Mikko. I applied this fix also in tabs applet.

@Alexander: Can you pls. test again with current git master?

From cc49d940829fea67dc3979e983db20f4ca67481e Mon Sep 17 00:00:00 2001
From: Rainer Sigle <rainer.sigle@web.de>
Date: Mon, 29 Nov 2010 21:02:34 +0100
Subject: [PATCH] applied lyrics applet fix for (white) text color using kde 4.6+ also in tabs applet

---
 src/context/applets/tabs/TabsView.cpp |   12 ++++++++++++
 src/context/applets/tabs/TabsView.h   |    2 +-
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/context/applets/tabs/TabsView.cpp b/src/context/applets/tabs/TabsView.cpp
index 76c3e73..d155905 100644
--- a/src/context/applets/tabs/TabsView.cpp
+++ b/src/context/applets/tabs/TabsView.cpp
@@ -107,6 +107,9 @@ TabsView::TabsView( QGraphicsWidget *parent )
     setLayout( layout );
     setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
     updateScrollBarVisibility();
+
+    // update the palette.
+    paletteChanged( The::paletteHandler()->palette() );
 }
 
 TabsView::~TabsView()
@@ -184,6 +187,15 @@ TabsView::showTab( TabsItem *tab )
 }
 
 void
+TabsView::paletteChanged( const QPalette &palette )
+{
+    // Use the text-color from KDE's colorscheme as we're already using it's background color.
+    // Not using it might cause "conflicts" (where the text could become unreadable).
+    // (code taken from lyrics applet)
+    m_tabTextBrowser->nativeWidget()->setTextColor( palette.text().color() );
+}
+
+void
 TabsView::itemClicked( const QModelIndex &index )
 {
     const QStandardItemModel *itemModel = static_cast<QStandardItemModel*>( m_treeView->model() );
diff --git a/src/context/applets/tabs/TabsView.h b/src/context/applets/tabs/TabsView.h
index f7b737b..9bd46fa 100644
--- a/src/context/applets/tabs/TabsView.h
+++ b/src/context/applets/tabs/TabsView.h
@@ -51,12 +51,12 @@ protected:
 private slots:
     void itemClicked( const QModelIndex &index );
     void slotScrollBarRangeChanged( int min, int max );
+    void paletteChanged( const QPalette &palette );
Comment 7 Alexander Potashev 2010-11-29 22:58:09 UTC
The text is still white.
Comment 8 Rainer Sigle 2010-12-02 22:35:53 UTC
From ab5e6b9f2cb2ff88ea8a38dfa0c072f75742e428 Mon Sep 17 00:00:00 2001
From: Rainer Sigle <rainer.sigle@web.de>
Date: Thu, 2 Dec 2010 22:21:19 +0100
Subject: [PATCH] Excplicitely define text-color on tabs according to kdes color scheme. Fix for BR258234.

---
 src/context/applets/tabs/TabsView.cpp |   16 +++-------------
 src/context/applets/tabs/TabsView.h   |    1 -
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/context/applets/tabs/TabsView.cpp b/src/context/applets/tabs/TabsView.cpp
index d155905..433ae9f 100644
--- a/src/context/applets/tabs/TabsView.cpp
+++ b/src/context/applets/tabs/TabsView.cpp
@@ -107,9 +107,6 @@ TabsView::TabsView( QGraphicsWidget *parent )
     setLayout( layout );
     setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
     updateScrollBarVisibility();
-
-    // update the palette.
-    paletteChanged( The::paletteHandler()->palette() );
 }
 
 TabsView::~TabsView()
@@ -161,12 +158,14 @@ TabsView::showTab( TabsItem *tab )
             headingFont.setStyleStrategy( QFont::PreferAntialias );
             headingFont.setWeight( QFont::Black );
             QString linkColor = The::paletteHandler()->palette().link().color().name();
+            QString textColor = The::paletteHandler()->palette().text().color().name();
             int headingWeight = 600;
 
             QString htmlData = "<html>";
                     htmlData += "<body style=\"font-family:'" + tabFont.family() + "';";
                     htmlData += "font-size:" + QString::number( tabFont.pointSize() ) + "pt;";
-                    htmlData += "font-weight:" + QString::number( tabFont.weight() ) + ";\">";
+                    htmlData += "font-weight:" + QString::number( tabFont.weight() ) + ";";
+                    htmlData += "color:" + textColor + ";\">";
 
                     // tab heading + tab source
                     htmlData += "<p><span style=\"font-family:'" + headingFont.family() + "';";
@@ -187,15 +186,6 @@ TabsView::showTab( TabsItem *tab )
 }
 
 void
-TabsView::paletteChanged( const QPalette &palette )
-{
-    // Use the text-color from KDE's colorscheme as we're already using it's background color.
-    // Not using it might cause "conflicts" (where the text could become unreadable).
-    // (code taken from lyrics applet)
-    m_tabTextBrowser->nativeWidget()->setTextColor( palette.text().color() );
-}
-
-void
 TabsView::itemClicked( const QModelIndex &index )
 {
     const QStandardItemModel *itemModel = static_cast<QStandardItemModel*>( m_treeView->model() );
diff --git a/src/context/applets/tabs/TabsView.h b/src/context/applets/tabs/TabsView.h
index 9bd46fa..758fcf4 100644
--- a/src/context/applets/tabs/TabsView.h
+++ b/src/context/applets/tabs/TabsView.h
@@ -51,7 +51,6 @@ protected:
 private slots:
     void itemClicked( const QModelIndex &index );
     void slotScrollBarRangeChanged( int min, int max );
-    void paletteChanged( const QPalette &palette );
 
 private:
     Plasma::TextBrowser *m_tabTextBrowser;
-- 
1.7.1
Comment 9 Alexander Potashev 2010-12-03 00:17:29 UTC
It's strange, but the problem still exists (the text is still white).
Comment 10 Rainer Sigle 2010-12-03 07:53:22 UTC
I installed KDE 4.6 Beta, was able to reproduce it and the above patch fixes it for me. No clue currently why it's still happening on your side. Will further investigate.
Comment 11 Alexander Potashev 2010-12-03 19:19:15 UTC
I'm sorry, I was half-wrong. The text of the tabs is now black. But the message "Tabs are being fetched" is white (I looked at it when I was writing my last comment).
Comment 12 Alexander Potashev 2010-12-03 20:41:17 UTC
"There were no tabs found for this track" is also white.
Comment 13 Rainer Sigle 2010-12-04 10:37:22 UTC
Okay, that's fine then. 

The white text on info label issue is also solved now, as I've removed it :-) It did not provide any further information as already displayed in the header label.

Can we close this one?