mod: adjust layout and style of widgets and header links

This commit is contained in:
2024-10-19 16:11:08 +02:00
parent 49caf89287
commit 03a4b571d3
2 changed files with 21 additions and 4 deletions

View File

@@ -110,16 +110,25 @@ pub fn main() !void {
.border = .{ .where = .all },
}));
// should be 120 characters wide and centered horizontally
var view_port_x_off: usize = undefined;
var limit: usize = 120;
if (root_window.width / 2 -| 60 > 0) {
view_port_x_off = root_window.width / 2 -| 60;
} else {
view_port_x_off = 1;
limit = root_window.width - 1;
}
view_port.draw(root_window.child(.{
.x_off = root_window.width / 8,
.x_off = view_port_x_off,
.y_off = 3,
.width = .{ .limit = root_window.width / 2 + (root_window.width / 4) },
.width = .{ .limit = limit },
}));
if (active_menu) {
menu.draw(root_window.child(.{
.x_off = root_window.width / 2 - 25,
.y_off = root_window.height / 2 - 10,
.x_off = root_window.width / 2 -| 25,
.y_off = root_window.height / 2 -| 10,
.width = .{ .limit = 50 },
.height = .{ .limit = 20 },
.border = .{ .where = .all },