mirror of
https://github.com/jtgans/g13gui.git
synced 2025-06-20 00:14:09 -04:00
Fix the layout to be less insane.
This commit is contained in:
parent
88af73ade3
commit
f026b0d815
@ -38,17 +38,14 @@ class MainWindow(Gtk.ApplicationWindow, GtkObserver):
|
|||||||
|
|
||||||
self._box = Gtk.Box(spacing=6, orientation=Gtk.Orientation.VERTICAL)
|
self._box = Gtk.Box(spacing=6, orientation=Gtk.Orientation.VERTICAL)
|
||||||
self._box.set_border_width(6)
|
self._box.set_border_width(6)
|
||||||
|
self._box.set_margin_left(6)
|
||||||
|
self._box.set_margin_right(6)
|
||||||
self.add(self._box)
|
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.setupG13ButtonGrid()
|
||||||
|
|
||||||
|
self.set_resizable(False)
|
||||||
|
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
||||||
def _updateProfileRegistration(self):
|
def _updateProfileRegistration(self):
|
||||||
@ -96,26 +93,37 @@ class MainWindow(Gtk.ApplicationWindow, GtkObserver):
|
|||||||
|
|
||||||
def setupG13ButtonGrid(self):
|
def setupG13ButtonGrid(self):
|
||||||
self._mButtons = Gtk.ButtonBox(
|
self._mButtons = Gtk.ButtonBox(
|
||||||
spacing=3,
|
spacing=6,
|
||||||
orientation=Gtk.Orientation.HORIZONTAL,
|
orientation=Gtk.Orientation.HORIZONTAL,
|
||||||
baseline_position=Gtk.BaselinePosition.CENTER)
|
baseline_position=Gtk.BaselinePosition.CENTER)
|
||||||
self._mButtons.set_layout(Gtk.ButtonBoxStyle.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 = Gtk.Grid()
|
||||||
self._keyGrid.set_hexpand(False)
|
self._keyGrid.set_hexpand(False)
|
||||||
self._keyGrid.set_vexpand(False)
|
self._keyGrid.set_vexpand(False)
|
||||||
self._keyGrid.set_row_spacing(3)
|
self._keyGrid.set_row_spacing(6)
|
||||||
self._keyGrid.set_column_spacing(3)
|
self._keyGrid.set_column_spacing(6)
|
||||||
self._box.pack_start(self._keyGrid, False, False, 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 = Gtk.Grid()
|
||||||
self._stickGrid.set_row_spacing(3)
|
self._stickGrid.set_hexpand(False)
|
||||||
self._stickGrid.set_column_spacing(3)
|
self._stickGrid.set_vexpand(False)
|
||||||
self._box.pack_start(self._stickGrid, False, False, 6)
|
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 = {}
|
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('M1'), False, False, 6)
|
||||||
self._mButtons.pack_start(self.newG13Button('M2'), False, False, 6)
|
self._mButtons.pack_start(self.newG13Button('M2'), False, False, 6)
|
||||||
self._mButtons.pack_start(self.newG13Button('M3'), False, False, 6)
|
self._mButtons.pack_start(self.newG13Button('M3'), False, False, 6)
|
||||||
|
Loading…
Reference in New Issue
Block a user