mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +00:00
Applications+Games+LibGUI: Fix layout problems
This commit is contained in:
parent
c2d344bd8c
commit
f59c167bb0
10 changed files with 34 additions and 41 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue