mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
ThemeEditor: Start working on a window theme editor :^)
This commit is contained in:
parent
80a9896e83
commit
dfe8adde3f
5 changed files with 170 additions and 0 deletions
22
Applications/ThemeEditor/main.cpp
Normal file
22
Applications/ThemeEditor/main.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "PreviewWidget.h"
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
auto app = GUI::Application::construct(argc, argv);
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
auto& main_widget = window->set_main_widget<GUI::Widget>();
|
||||
main_widget.set_fill_with_background_color(true);
|
||||
main_widget.set_layout<GUI::VerticalBoxLayout>();
|
||||
|
||||
auto& preview_widget = main_widget.add<ThemeEditor::PreviewWidget>(app->palette());
|
||||
preview_widget.set_preferred_size(480, 360);
|
||||
preview_widget.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
|
||||
|
||||
window->resize(500, 400);
|
||||
window->show();
|
||||
return app->exec();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue