diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-05 09:44:13 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-05 09:44:13 +0100 |
commit | d0078b6574d7022f207f3af492d2d8ec142b9bd1 (patch) | |
tree | ea197c8f9a4f5d796c840d9e3c031a06df1685dc /Clock/main.cpp | |
parent | 41567c5bb91b86b698337340f77275fdc7b0dce4 (diff) | |
download | serenity-d0078b6574d7022f207f3af492d2d8ec142b9bd1.zip |
Clock: Turns the clock window from guitest2 into a separate program.
We can't not have a desktop clock app. :^)
Diffstat (limited to 'Clock/main.cpp')
-rw-r--r-- | Clock/main.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Clock/main.cpp b/Clock/main.cpp new file mode 100644 index 0000000000..483d5cc88f --- /dev/null +++ b/Clock/main.cpp @@ -0,0 +1,21 @@ +#include <LibGUI/GEventLoop.h> +#include <LibGUI/GWindow.h> +#include "ClockWidget.h" + +int main(int, char**) +{ + GEventLoop loop; + + auto* window = new GWindow; + window->set_title("Clock"); + window->set_rect({ 100, 100, 100, 40 }); + + auto* clock_widget = new ClockWidget; + clock_widget->set_relative_rect({ 0, 0, 100, 40 }); + window->set_main_widget(clock_widget); + + window->show(); + return loop.exec(); +} + + |