Make attributes window layout nicer

This commit is contained in:
Isaiah Odhner 2023-05-01 18:47:25 -04:00
parent cfc17fafef
commit e9cad1ae80
2 changed files with 11 additions and 6 deletions

View File

@ -280,12 +280,17 @@ DialogWindow .buttons Button {
width: 50;
height: auto;
}
#attributes_dialog Horizontal,
#attributes_dialog Vertical {
#attributes_dialog .window_content Horizontal,
#attributes_dialog .window_content Vertical {
height: auto;
width: auto;
padding: 1 2;
}
#attributes_dialog .window_content Horizontal Static {
width: auto;
height: 3; /* matching Input height; 1fr or auto didn't work */
content-align-vertical: middle;
}
#attributes_dialog Input {
width: 20;
}

View File

@ -2281,14 +2281,14 @@ class PaintApp(App[None]):
)
window.content.mount(
Vertical(
# Horizontal(
Horizontal(
Static(_("Width:")),
Input(id="width_input", value=str(self.image.width)),
# ),
# Horizontal(
),
Horizontal(
Static(_("Height:")),
Input(id="height_input", value=str(self.image.height)),
# ),
),
),
Container(
Button(_("OK"), classes="ok submit", variant="primary"),