From d859bde3373824d87b13c389cec7fc4216301bd0 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 16 May 2021 21:37:27 +0100 Subject: GameOfLife: Move "ms" interval label to GML There's no reason not to! --- Userland/Games/GameOfLife/GameOfLife.gml | 5 +++++ Userland/Games/GameOfLife/main.cpp | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Userland/Games/GameOfLife/GameOfLife.gml b/Userland/Games/GameOfLife/GameOfLife.gml index 1942e60ba6..71fb0f4727 100644 --- a/Userland/Games/GameOfLife/GameOfLife.gml +++ b/Userland/Games/GameOfLife/GameOfLife.gml @@ -48,6 +48,11 @@ max: 5000 fixed_width: 60 } + + @GUI::Label { + text: " ms" + autosize: true + } } } diff --git a/Userland/Games/GameOfLife/main.cpp b/Userland/Games/GameOfLife/main.cpp index caffe9f381..505607c502 100644 --- a/Userland/Games/GameOfLife/main.cpp +++ b/Userland/Games/GameOfLife/main.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -74,12 +73,6 @@ int main(int argc, char** argv) interval_spinbox.set_value(150); - auto interval_label = GUI::Label::construct(); - interval_label->set_fixed_width(15); - interval_label->set_text("ms"); - - main_toolbar.add_child(interval_label); - auto paused_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/pause.png"); auto play_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/play.png"); -- cgit v1.2.3