Skip to content

Commit

Permalink
Fixed|libappfw|PopupMenuWidget: Inverted popup menu items colors
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Aug 25, 2015
1 parent f3e5d06 commit f3d27f9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions doomsday/sdk/libappfw/src/widgets/popupmenuwidget.cpp
Expand Up @@ -205,8 +205,9 @@ DENG_GUI_PIMPL(PopupMenuWidget)

void setButtonColors(ButtonWidget &button)
{
button.setTextColor(!infoStyle? "text" : "inverted.text");
button.setHoverTextColor(!infoStyle? "inverted.text" : "text",
bool const hovering = (hover == &button);
button.setTextColor(!hovering ^ infoStyle? "text" : "inverted.text");
button.setHoverTextColor(!hovering ^ infoStyle? "inverted.text" : "text",
ButtonWidget::ReplaceColor);
}

Expand Down Expand Up @@ -463,9 +464,10 @@ void PopupMenuWidget::panelClosing()

if(d->hover)
{
d->hover->setTextModulationColorf(style().colors().colorf(!d->infoStyle? "text" : "inverted.text"));
d->hover->setImageColor(style().colors().colorf(!d->infoStyle? "text" : "inverted.text"));
auto &btn = *d->hover;
d->hover = 0;
d->setButtonColors(btn);
btn.setImageColor(style().colors().colorf(!d->infoStyle? "text" : "inverted.text"));
requestGeometry();
}

Expand Down

0 comments on commit f3d27f9

Please sign in to comment.