Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit e80972e1 authored by Nathaniel Graham's avatar Nathaniel Graham

Fix sidebar labels being unreadable when selected or hovered over

Summary:
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:

{F3909142}

{F3909143}

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: https://phabricator.kde.org/D7793
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