1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:18:11 +00:00

Minesweeper: Set time label to a fixed width

This ensures the label width doesn't sporadically change as time elapses
This commit is contained in:
Musab Kılıç 2021-10-29 17:09:47 +03:00 committed by Idan Horowitz
parent 7eaac7d2c1
commit 39afbceb53

View file

@ -88,7 +88,7 @@ int main(int argc, char** argv)
time_image.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/minesweeper/timer.png"));
auto& time_label = container.add<GUI::Label>();
time_label.set_autosize(true);
time_label.set_fixed_width(50);
time_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
container.layout()->add_spacer();