mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
Clock: Turns the clock window from guitest2 into a separate program.
We can't not have a desktop clock app. :^)
This commit is contained in:
parent
41567c5bb9
commit
d0078b6574
10 changed files with 123 additions and 65 deletions
21
Clock/main.cpp
Normal file
21
Clock/main.cpp
Normal file
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue