mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Applications+Games+LibGUI: Fix layout problems
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
shrink_to_fit: true
|
||||
preferred_height: "fit"
|
||||
layout: @GUI::HorizontalBoxLayout {
|
||||
spacing: 4
|
||||
margins: [0, 2, 0, 2]
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
shrink_to_fit: true
|
||||
preferred_height: "fit"
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
spacing: 4
|
||||
}
|
||||
@@ -59,16 +59,16 @@
|
||||
@GUI::Label {
|
||||
text: "Preview:"
|
||||
text_alignment: "CenterLeft"
|
||||
preferred_width: 120
|
||||
}
|
||||
|
||||
@GUI::Frame {
|
||||
layout: @GUI::VerticalBoxLayout {}
|
||||
|
||||
@GUI::Label {
|
||||
shape: "Container"
|
||||
thickness: 2
|
||||
shadow: "Sunken"
|
||||
name: "clock_preview"
|
||||
text: "12:34:56"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ EditGuideDialog::EditGuideDialog(GUI::Window* parent_window, String const& offse
|
||||
{
|
||||
set_title("Create new Guide");
|
||||
set_icon(parent_window->icon());
|
||||
resize(200, 120);
|
||||
resize(200, 130);
|
||||
set_resizable(false);
|
||||
|
||||
auto& main_widget = set_main_widget<GUI::Widget>();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
@GUI::GroupBox {
|
||||
title: "Orientation"
|
||||
shrink_to_fit: true
|
||||
preferred_height: "fit"
|
||||
layout: @GUI::HorizontalBoxLayout {
|
||||
margins: [10, 8, 8]
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
layout: @GUI::HorizontalBoxLayout {
|
||||
margins: [4]
|
||||
}
|
||||
shrink_to_fit: true
|
||||
preferred_height: "fit"
|
||||
|
||||
@GUI::Label {
|
||||
text: "Offset"
|
||||
@@ -48,18 +48,16 @@
|
||||
margins: [4]
|
||||
}
|
||||
|
||||
@GUI::Widget {}
|
||||
@GUI::Layout::Spacer {}
|
||||
|
||||
@GUI::Button {
|
||||
@GUI::DialogButton {
|
||||
name: "ok_button"
|
||||
text: "OK"
|
||||
max_width: 75
|
||||
}
|
||||
|
||||
@GUI::Button {
|
||||
@GUI::DialogButton {
|
||||
name: "cancel_button"
|
||||
text: "Cancel"
|
||||
max_width: 75
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,16 +45,14 @@
|
||||
|
||||
@GUI::Widget {}
|
||||
|
||||
@GUI::Button {
|
||||
@GUI::DialogButton {
|
||||
name: "apply_button"
|
||||
text: "Apply"
|
||||
max_width: 75
|
||||
}
|
||||
|
||||
@GUI::Button {
|
||||
@GUI::DialogButton {
|
||||
name: "cancel_button"
|
||||
text: "Cancel"
|
||||
max_width: 75
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ private:
|
||||
for (size_t column = 0; column < columns; ++column) {
|
||||
if (index < columns * rows) {
|
||||
auto& textbox = horizontal_container.template add<GUI::TextBox>();
|
||||
textbox.set_min_width(22);
|
||||
textbox.on_change = [&, row = row, column = column] {
|
||||
auto& element = m_matrix.elements()[row][column];
|
||||
char* endptr = nullptr;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
@GUI::GroupBox {
|
||||
title: "Size (px)"
|
||||
shrink_to_fit: true
|
||||
preferred_height: "fit"
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
margins: [4]
|
||||
}
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
@GUI::GroupBox {
|
||||
title: "Scaling Mode"
|
||||
shrink_to_fit: true
|
||||
preferred_height: "fit"
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
margins: [4]
|
||||
}
|
||||
@@ -97,18 +97,16 @@
|
||||
@GUI::Widget {
|
||||
layout: @GUI::HorizontalBoxLayout {}
|
||||
|
||||
@GUI::Widget {}
|
||||
@GUI::Layout::Spacer {}
|
||||
|
||||
@GUI::Button {
|
||||
@GUI::DialogButton {
|
||||
name: "ok_button"
|
||||
text: "OK"
|
||||
max_width: 75
|
||||
}
|
||||
|
||||
@GUI::Button {
|
||||
@GUI::DialogButton {
|
||||
name: "cancel_button"
|
||||
text: "Cancel"
|
||||
max_width: 75
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,16 +41,14 @@
|
||||
spacing: 6
|
||||
}
|
||||
|
||||
@GUI::Frame {
|
||||
preferred_height: "fit"
|
||||
background_role: "Base"
|
||||
fill_with_background_color: true
|
||||
layout: @GUI::VerticalBoxLayout {}
|
||||
|
||||
@GUI::Label {
|
||||
background_role: "Base"
|
||||
shape: "Container"
|
||||
shadow: "Sunken"
|
||||
thickness: 2
|
||||
fill_with_background_color: true
|
||||
name: "terminal_font_label"
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::Button {
|
||||
text: "..."
|
||||
@@ -62,7 +60,7 @@
|
||||
|
||||
@GUI::GroupBox {
|
||||
title: "Cursor settings"
|
||||
shrink_to_fit: true
|
||||
preferred_height: "fit"
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
margins: [16, 8, 8]
|
||||
}
|
||||
|
||||
@@ -56,18 +56,16 @@
|
||||
max_height: 24
|
||||
layout: @GUI::HorizontalBoxLayout {}
|
||||
|
||||
@GUI::Widget {}
|
||||
@GUI::Layout::Spacer {}
|
||||
|
||||
@GUI::Button {
|
||||
@GUI::DialogButton {
|
||||
name: "ok_button"
|
||||
text: "OK"
|
||||
max_width: 75
|
||||
}
|
||||
|
||||
@GUI::Button {
|
||||
@GUI::DialogButton {
|
||||
name: "cancel_button"
|
||||
text: "Cancel"
|
||||
max_width: 75
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
fixed_height: 32
|
||||
fixed_width: 32
|
||||
}
|
||||
|
||||
@GUI::Layout::Spacer {}
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
|
||||
Reference in New Issue
Block a user