Skip to content

Commit

Permalink
Shell: Margins for the map outline
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 7, 2019
1 parent 897a8bb commit 3e29ce2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doomsday/tools/shell/src/statuswidget.cpp
Expand Up @@ -46,7 +46,10 @@ DE_GUI_PIMPL(StatusWidget)

mapOutline = &i.addNew<MapOutlineWidget>("map");
mapOutline->setColors("accent", "inverted.accent");
mapOutline->rule().setRect(rect);
mapOutline->rule()
.setInput(Rule::Left, rect.left() + i.margins().left())
.setInput(Rule::Right, rect.right() - i.margins().right())
.setInput(Rule::Bottom, rect.bottom() - i.margins().bottom());

stateLabel = &i.addNew<LabelWidget>("gamestate");
stateLabel->setSizePolicy(ui::Expand, ui::Expand);
Expand All @@ -61,6 +64,8 @@ DE_GUI_PIMPL(StatusWidget)
titleLabel->rule()
.setMidAnchorX(rect.midX())
.setInput(Rule::Top, stateLabel->rule().bottom());

mapOutline->rule().setInput(Rule::Top, titleLabel->rule().bottom());
}

void clear()
Expand Down

0 comments on commit 3e29ce2

Please sign in to comment.