Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:nuklly
lightly
0001-fix-highlight-bugs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-fix-highlight-bugs.patch of Package lightly
diff --git a/kstyle/lightlyhelper.cpp b/kstyle/lightlyhelper.cpp index 89cc2b42..5c9077a1 100644 --- a/kstyle/lightlyhelper.cpp +++ b/kstyle/lightlyhelper.cpp @@ -176,8 +176,8 @@ namespace Lightly else outline = KColorUtils::mix( outline, hover, opacity ); } else if( mouseOver ) { - - outline = hoverColor( palette ); + // fix skanlite arrow color bug (mouseOver shows dark color (focusColor), not light color (hoverColor)) + outline = focusColor( palette ); } else if( mode == AnimationFocus ) { @@ -750,7 +750,9 @@ namespace Lightly // pressed button background when animation is done else if(sunken && mouseOver) { - painter->setBrush(alphaColor( color.darker(200), 0.5 ) ); + // fix kcharselect combobox sunken: use the same background color when combobox is sunken + const auto fc = focusColor(palette); + painter->setBrush(alphaColor( fc.darker(200), 0.5 ) ); painter->drawRoundedRect( frameRect, radius, radius ); } diff --git a/kstyle/lightlystyle.cpp b/kstyle/lightlystyle.cpp index 355d9fae..e3acd497 100644 --- a/kstyle/lightlystyle.cpp +++ b/kstyle/lightlystyle.cpp @@ -3747,8 +3747,8 @@ namespace Lightly color = _helper->arrowColor( palette, mouseOver, hasFocus, opacity, mode ); } else if( mouseOver && !inToolButton ) { - - color = _helper->hoverColor( palette ); + // fixes dolphin arrow bug, use focusColor(dark color) instead of hoverColor(light color) + color = _helper->focusColor( palette ); } else if( inToolButton ) { @@ -4589,6 +4589,9 @@ namespace Lightly else textRole = QPalette::WindowText; } else if( hasFocus || (hasFocus && mouseOver) ) textRole = QPalette::HighlightedText; + // Fixes kinfocentor energy tab "Charge Percentage" button color error + // when the button is checked, the text label should be a light color (HighlightedText) + else if (state & State_On) textRole = QPalette::HighlightedText; else textRole = QPalette::ButtonText; // menu arrow @@ -4781,7 +4784,7 @@ namespace Lightly const QIcon::State iconState( sunken ? QIcon::On : QIcon::Off ); QIcon::Mode iconMode; if( !enabled ) iconMode = QIcon::Disabled; - else if( (!flat && hasFocus) || (flat && (state & State_Sunken) && !mouseOver) ) iconMode = QIcon::Selected; + else if( (!flat && (hasFocus || sunken)) || (flat && (state & State_Sunken) && !mouseOver) ) iconMode = QIcon::Selected; else if( mouseOver && flat ) iconMode = QIcon::Active; else iconMode = QIcon::Normal; @@ -4796,7 +4799,7 @@ namespace Lightly QPalette::ColorRole textRole( QPalette::ButtonText ); if( flat ) textRole = ( ((hasFocus&&sunken) || (state & State_Sunken))&&!mouseOver) ? QPalette::HighlightedText: QPalette::WindowText; - else if( hasFocus&&!mouseOver ) textRole = QPalette::HighlightedText; + else if( hasFocus||sunken ) textRole = QPalette::HighlightedText; painter->setFont(toolButtonOption->font); drawItemText( painter, textRect, textFlags, palette, enabled, toolButtonOption->text, textRole ); @@ -4893,7 +4896,7 @@ namespace Lightly if( hasFocus && sunken ) textRole = QPalette::HighlightedText; else textRole = QPalette::WindowText; - } else if( hasFocus ) textRole = QPalette::HighlightedText; + } else if( option->state & State_HasFocus || sunken) textRole = QPalette::HighlightedText; else textRole = QPalette::ButtonText; // change pen color directly @@ -7114,7 +7117,8 @@ namespace Lightly // color const auto normal( _helper->arrowColor( palette, QPalette::WindowText ) ); - const auto hover( _helper->hoverColor( palette ) ); + // fix kcharselect font name combo box: should use a dark color (focusColor) + const auto hover( _helper->focusColor( palette ) ); if( animated ) { @@ -7135,7 +7139,10 @@ namespace Lightly else arrowColor = _helper->arrowColor( palette, QPalette::WindowText ); } else if( empty || !enabled ) arrowColor = _helper->arrowColor( palette, QPalette::Disabled, QPalette::ButtonText ); - else if( hasFocus && !mouseOver ) arrowColor = palette.color( QPalette::HighlightedText ); + // fixes kinfocenter dropdown menu mouseover bug: arrow shoud show light color (highlightedtext) upon mouseover + else if( hasFocus ) arrowColor = palette.color( QPalette::HighlightedText ); + // fixes kcharselect combo menu click bug: arrow should show light color upon On state (checked) + else if ( state & State_On ) arrowColor = palette.color( QPalette::HighlightedText ); else arrowColor = _helper->arrowColor( palette, QPalette::ButtonText ); // arrow rect @@ -7646,8 +7653,8 @@ namespace Lightly color = KColorUtils::mix( color, highlight, opacity ); } else if( subControlHover ) { - - color = _helper->hoverColor( palette ); + // fixes kcharselect font size spinbox mouseover color (should use a dark color) + color = _helper->focusColor( palette ); } else if( atLimit ) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor