Skip to content

Commit

Permalink
move text to be inline with menu
Browse files Browse the repository at this point in the history
  • Loading branch information
shadeyg56 committed Feb 21, 2023
1 parent e1dae9d commit e2eaffc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
17 changes: 9 additions & 8 deletions auto_cpufreq/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,26 @@ def __init__(self):
self.set_resizable(False)
self.load_css()
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filename="/usr/local/share/auto-cpufreq/images/icon.png", width=500, height=500, preserve_aspect_ratio=True)
#self.set_icon(pixbuf)
self.set_icon(pixbuf)
self.build()

def main(self):
# main VBOX
self.vbox_top = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.vbox_top.set_valign(Gtk.Align.CENTER)
self.vbox_top.set_halign(Gtk.Align.CENTER)
self.add(self.vbox_top)
# self.vbox_top = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
# self.vbox_top.set_valign(Gtk.Align.CENTER)
# self.vbox_top.set_halign(Gtk.Align.CENTER)
#self.add(self.vbox_top)

# Main HBOX
self.hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=HBOX_PADDING)

self.systemstats = SystemStatsLabel()
self.hbox.pack_start(self.systemstats, False, False, 0)
self.add(self.hbox)

self.vbox_right = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=20)

self.menu = DropDownMenu(self)
self.vbox_top.pack_start(self.menu, False, False, 0)
self.hbox.pack_end(self.menu, False, False, 0)

self.currentgovernor = CurrentGovernorBox()
self.vbox_right.pack_start(self.currentgovernor, False, False, 0)
Expand All @@ -50,7 +51,7 @@ def main(self):
self.cpufreqstats = CPUFreqStatsLabel()
self.vbox_right.pack_start(self.cpufreqstats, False, False, 0)

self.hbox.pack_start(self.vbox_right, True, True, 0)
self.hbox.pack_start(self.vbox_right, False, False, 0)

self.vbox_top.pack_start(self.hbox, False, False, 0)

Expand Down
1 change: 1 addition & 0 deletions auto_cpufreq/gui/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ class DropDownMenu(Gtk.MenuButton):
def __init__(self, parent):
super().__init__()
self.set_halign(Gtk.Align.END)
self.set_valign(Gtk.Align.START)
self.image = Gtk.Image.new_from_icon_name("open-menu-symbolic", Gtk.IconSize.LARGE_TOOLBAR)
self.add(self.image)
self.menu = self.build_menu(parent)
Expand Down

0 comments on commit e2eaffc

Please sign in to comment.