1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:07:45 +00:00

Run: Improve UI consistency

This commit is contained in:
FrHun 2021-07-27 21:03:06 +02:00 committed by Andreas Kling
parent 033c14e574
commit 411622148a
3 changed files with 12 additions and 8 deletions

View file

@ -2,12 +2,13 @@
fill_with_background_color: true fill_with_background_color: true
layout: @GUI::VerticalBoxLayout { layout: @GUI::VerticalBoxLayout {
margins: [10, 10, 10, 10] margins: [4, 4, 4, 4]
} }
@GUI::Widget { @GUI::Widget {
max_height: 32
layout: @GUI::HorizontalBoxLayout { layout: @GUI::HorizontalBoxLayout {
spacing: 10 spacing: 16
} }
@GUI::ImageWidget { @GUI::ImageWidget {
@ -22,7 +23,9 @@
} }
@GUI::Widget { @GUI::Widget {
layout: @GUI::HorizontalBoxLayout layout: @GUI::HorizontalBoxLayout {
margins: [4, 4, 4, 4]
}
@GUI::Label { @GUI::Label {
text: "Open:" text: "Open:"
@ -37,6 +40,7 @@
@GUI::Widget { @GUI::Widget {
layout: @GUI::HorizontalBoxLayout layout: @GUI::HorizontalBoxLayout
fixed_height: 22
// HACK: using an empty widget as a spacer // HACK: using an empty widget as a spacer
@GUI::Widget @GUI::Widget
@ -44,19 +48,19 @@
@GUI::Button { @GUI::Button {
name: "ok_button" name: "ok_button"
text: "OK" text: "OK"
fixed_width: 75 fixed_width: 80
} }
@GUI::Button { @GUI::Button {
name: "cancel_button" name: "cancel_button"
text: "Cancel" text: "Cancel"
fixed_width: 75 fixed_width: 80
} }
@GUI::Button { @GUI::Button {
name: "browse_button" name: "browse_button"
text: "Browse..." text: "Browse..."
fixed_width: 75 fixed_width: 80
} }
} }
} }

View file

@ -33,7 +33,7 @@ RunWindow::RunWindow()
set_title("Run"); set_title("Run");
set_icon(app_icon.bitmap_for_size(16)); set_icon(app_icon.bitmap_for_size(16));
resize(345, 140); resize(345, 100);
set_resizable(false); set_resizable(false);
set_minimizable(false); set_minimizable(false);

View file

@ -20,7 +20,7 @@ int main(int argc, char** argv)
auto app = GUI::Application::construct(argc, argv); auto app = GUI::Application::construct(argc, argv);
auto window = RunWindow::construct(); auto window = RunWindow::construct();
window->move_to(12, GUI::Desktop::the().rect().bottom() - GUI::Desktop::the().taskbar_height() - 12 - window->height()); window->move_to(16, GUI::Desktop::the().rect().bottom() - GUI::Desktop::the().taskbar_height() - 16 - window->height());
window->show(); window->show();
return app->exec(); return app->exec();