Summary: | [usability] white text on light blue background in "Tabs" applet | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Alexander Potashev <aspotashev> |
Component: | Context View | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | lfranchi, rainer.sigle, simon.esneault |
Priority: | NOR | ||
Version: | 2.4-GIT | ||
Target Milestone: | 2.4.0 | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.4 | |
Sentry Crash Report: | |||
Attachments: | screenshot |
Description
Alexander Potashev
2010-11-29 00:32:52 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 I'm using QtCurve ("Plastic"), but the text is also white with Oxygen. Created attachment 53865 [details]
screenshot
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 Confirmed by comment #4 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 ); The text is still white. 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 It's strange, but the problem still exists (the text is still white). 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. 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). "There were no tabs found for this track" is also white. 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? |