Skip to content

Commit

Permalink
Fix WzMessageView title z-order
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Mar 1, 2024
1 parent 28e0adc commit 032b719
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/intelmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,14 @@ void WzMessageView::geometryChanged()

bool WzMessageView::initialize(MESSAGE *psMessage)
{
auto title = std::make_shared<W_LABEL>();
title->setGeometry(0, 0, INTMAP_RESEARCHWIDTH, INTMAP_TITLEHEIGHT);
title->setFontColour(WZCOL_YELLOW);
title->setTextAlignment(WLAB_ALIGNCENTRE);
title->setFont(font_regular, WZCOL_YELLOW);
title->setString(getMessageTitle(*psMessage));
attach(title);

/* Add the close box */
W_BUTINIT sButInit;
sButInit.id = IDINTMAP_CLOSE;
Expand Down Expand Up @@ -259,14 +267,6 @@ bool WzMessageView::initialize(MESSAGE *psMessage)
});
});

auto title = std::make_shared<W_LABEL>();
title->setGeometry(0, 0, INTMAP_RESEARCHWIDTH, INTMAP_TITLEHEIGHT);
title->setFontColour(WZCOL_YELLOW);
title->setTextAlignment(WLAB_ALIGNCENTRE);
title->setFont(font_regular, WZCOL_YELLOW);
title->setString(getMessageTitle(*psMessage));
attach(title);

auto grid = std::make_shared<GridLayout>();
attach(grid);
grid->setGeometry(1, INTMAP_TITLEHEIGHT, INTMAP_RESEARCHWIDTH - 2, INTMAP_RESEARCHHEIGHT - 1 - INTMAP_TITLEHEIGHT);
Expand Down

0 comments on commit 032b719

Please sign in to comment.