Skip to content

Commit

Permalink
Fixed|Home|Widgets: Game profile buttons misaligned after changing pa…
Browse files Browse the repository at this point in the history
…ckages
  • Loading branch information
skyjake committed Mar 18, 2017
1 parent f08776f commit 55def4b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doomsday/apps/client/src/ui/widgets/homeitemwidget.cpp
Expand Up @@ -101,6 +101,7 @@ DENG_GUI_PIMPL(HomeItemWidget)
Rule const *buttonsWidth = nullptr;
bool selected = false;
bool keepButtonsVisible = false;
bool buttonsShown = false;
DotPath bgColor { "transparent" };
DotPath selectedBgColor { "background" };
DotPath textColor { "text" };
Expand Down Expand Up @@ -162,10 +163,18 @@ DENG_GUI_PIMPL(HomeItemWidget)
button->rule().setMidAnchorY(label->rule().midY());
}
changeRef(buttonsWidth, layout.width() + rule("gap"));

if (buttonsShown)
{
labelRightMargin->set(*buttonsWidth,
labelRightMargin->animation().done()? TimeDelta(0.4) :
labelRightMargin->animation().remainingTime());
}
}

void showButtons(bool show)
{
buttonsShown = show;
if (!buttonsWidth) return;

if (show)
Expand Down

0 comments on commit 55def4b

Please sign in to comment.