Commit e80972e1 authored by Nathaniel Graham's avatar Nathaniel Graham

Fix sidebar labels being unreadable when selected or hovered over

BUG: 382139

Previously these labels were white-on-light-blue with light themes; now they use the correct theme color property, and become black appropriately.

Test Plan:
Tested on KDE Neon (dev unstable). Verified that with the default Breeze color scheme, tab text is more readable when hovered over and then active but not in focus. See before and after:



Also tested these changes with all standard color schemes as well as the Oxygen theme to make sure that there were no visual regressions.

Reviewers: aacid, #okular, #kde_applications, broulik, sander, rkflx

Reviewed By: aacid, #okular, #kde_applications, rkflx

Subscribers: rkflx

Tags: #okular

Differential Revision:
parent cc4be7ad
......@@ -138,15 +138,20 @@ void SidebarDelegate::paint( QPainter *painter, const QStyleOptionViewItem &opti
foreColor = m_windowForeground->brush(QPalette::Disabled).color();
disabled = true;
else if ( option.state & ( QStyle::State_HasFocus | QStyle::State_Selected ) )
else if ( option.state & QStyle::State_HasFocus )
backBrush = m_selectionBackground->brush(option.palette);
foreColor = m_selectionForeground->brush(option.palette).color();
else if ( option.state & QStyle::State_Selected )
backBrush = m_selectionBackground->brush(option.palette);
foreColor = m_windowForeground->brush(option.palette).color();
else if ( option.state & QStyle::State_MouseOver )
backBrush = m_selectionBackground->brush(option.palette).color().light( 115 );
foreColor = m_selectionForeground->brush(option.palette).color();
foreColor = m_windowForeground->brush(option.palette).color();
hover = true;
else /*if ( option.state & QStyle::State_Enabled )*/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment