Fixed menu styling

This commit is contained in:
Maxim Stewart 2020-05-10 07:27:03 -05:00
parent e6d90bd76e
commit 233111bf38
5 changed files with 49 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 KiB

After

Width:  |  Height:  |  Size: 578 KiB

View File

@ -563,10 +563,35 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="programListBttns">
<object class="GtkGrid" id="programListBttns">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="row_homogeneous">True</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
@ -574,6 +599,9 @@
</child>
</object>
</child>
<style>
<class name="menu_scroller"/>
</style>
</object>
<packing>
<property name="expand">True</property>

View File

@ -1,3 +1,11 @@
/* Menu css properties */
.menu_scroller label {
font-size: 120%;
}
/* Grid css properties */
viewport,
treeview,
treeview > header,

View File

@ -80,6 +80,18 @@ class MainMenuMixin:
button = gtk.Button(label=title)
button.set_image(icon)
button.connect("clicked", self.executeProgram)
children = button.get_children()
alignment1 = children[0]
box = alignment1.get_children()[0]
label = box.get_children()[1]
alignment1.set(0.0, 0.0, 0.0, 0.0)
label.set_halign(1)
label.set_line_wrap(True)
label.set_max_width_chars(38)
label.set_size_request(640, 64)
button.show_all()
glib.idle_add(widget.add, (button))