From f026b0d8159c18b65f81e3b839ff6741d6a6c700 Mon Sep 17 00:00:00 2001 From: June Tate-Gans Date: Sat, 28 Oct 2023 13:06:15 -0500 Subject: [PATCH] Fix the layout to be less insane. --- g13gui/ui/mainwindow.py | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/g13gui/ui/mainwindow.py b/g13gui/ui/mainwindow.py index a6edd87..e702ab7 100644 --- a/g13gui/ui/mainwindow.py +++ b/g13gui/ui/mainwindow.py @@ -38,17 +38,14 @@ class MainWindow(Gtk.ApplicationWindow, GtkObserver): self._box = Gtk.Box(spacing=6, orientation=Gtk.Orientation.VERTICAL) self._box.set_border_width(6) + self._box.set_margin_left(6) + self._box.set_margin_right(6) self.add(self._box) - self._infoBar = Gtk.InfoBar() - self._infoBar.set_no_show_all(True) - self._infoBarLabel = Gtk.Label() - self._infoBar.get_content_area().add(self._infoBarLabel) - self._infoBarLabel.show() - self._box.add(self._infoBar) - self.setupG13ButtonGrid() + self.set_resizable(False) + self.show_all() def _updateProfileRegistration(self): @@ -96,26 +93,37 @@ class MainWindow(Gtk.ApplicationWindow, GtkObserver): def setupG13ButtonGrid(self): self._mButtons = Gtk.ButtonBox( - spacing=3, + spacing=6, orientation=Gtk.Orientation.HORIZONTAL, baseline_position=Gtk.BaselinePosition.CENTER) self._mButtons.set_layout(Gtk.ButtonBoxStyle.CENTER) - self._box.pack_start(self._mButtons, False, False, 6) + self._mButtons.set_hexpand(False) + self._mButtons.set_vexpand(False) + self._box.pack_start(self._mButtons, True, False, 6) self._keyGrid = Gtk.Grid() self._keyGrid.set_hexpand(False) self._keyGrid.set_vexpand(False) - self._keyGrid.set_row_spacing(3) - self._keyGrid.set_column_spacing(3) - self._box.pack_start(self._keyGrid, False, False, 6) + self._keyGrid.set_row_spacing(6) + self._keyGrid.set_column_spacing(6) + self._keyGrid.set_row_homogeneous(True) + self._keyGrid.set_column_homogeneous(True) + self._box.pack_start(self._keyGrid, True, False, 6) self._stickGrid = Gtk.Grid() - self._stickGrid.set_row_spacing(3) - self._stickGrid.set_column_spacing(3) - self._box.pack_start(self._stickGrid, False, False, 6) + self._stickGrid.set_hexpand(False) + self._stickGrid.set_vexpand(False) + self._stickGrid.set_row_spacing(6) + self._stickGrid.set_column_spacing(6) + self._stickGrid.set_row_homogeneous(True) + self._stickGrid.set_column_homogeneous(True) + self._box.pack_start(self._stickGrid, True, False, 6) self._g13Buttons = {} + mrButton = self.newG13Button('MR') + mrButton.set_sensitive(False) + self._mButtons.pack_start(mrButton, False, False, 6) self._mButtons.pack_start(self.newG13Button('M1'), False, False, 6) self._mButtons.pack_start(self.newG13Button('M2'), False, False, 6) self._mButtons.pack_start(self.newG13Button('M3'), False, False, 6)