mod: adjust layout and style of widgets and header links
This commit is contained in:
17
src/main.zig
17
src/main.zig
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user