diff options
author | Linus Groh <mail@linusgroh.de> | 2021-05-16 21:37:27 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-16 23:00:21 +0200 |
commit | d859bde3373824d87b13c389cec7fc4216301bd0 (patch) | |
tree | 531c307710ea5ffb7b86cf01db46b633c3102b10 | |
parent | e7dc0bdba345c786e50f16b28e29e2d5054fe7a2 (diff) | |
download | serenity-d859bde3373824d87b13c389cec7fc4216301bd0.zip |
GameOfLife: Move "ms" interval label to GML
There's no reason not to!
-rw-r--r-- | Userland/Games/GameOfLife/GameOfLife.gml | 5 | ||||
-rw-r--r-- | 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 <LibGUI/BoxLayout.h> #include <LibGUI/Button.h> #include <LibGUI/Icon.h> -#include <LibGUI/Label.h> #include <LibGUI/Menu.h> #include <LibGUI/Menubar.h> #include <LibGUI/SpinBox.h> @@ -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"); |