Minor improvements
parent
3382eb0579
commit
fef33e7419
|
@ -47,8 +47,7 @@ class ManjaroHello():
|
||||||
self.urls = read_json(self.urls_path)
|
self.urls = read_json(self.urls_path)
|
||||||
|
|
||||||
# Init window
|
# Init window
|
||||||
self.builder = Gtk.Builder()
|
self.builder = Gtk.Builder.new_from_file(self.ui_path + self.app + ".glade")
|
||||||
self.builder.add_from_file(self.ui_path + self.app + ".glade")
|
|
||||||
self.builder.connect_signals(self)
|
self.builder.connect_signals(self)
|
||||||
self.window = self.builder.get_object("window")
|
self.window = self.builder.get_object("window")
|
||||||
subtitle = self.infos["arch"]
|
subtitle = self.infos["arch"]
|
||||||
|
@ -56,9 +55,9 @@ class ManjaroHello():
|
||||||
subtitle = self.infos["codename"] + " " + self.infos["release"] + " " + subtitle
|
subtitle = self.infos["codename"] + " " + self.infos["release"] + " " + subtitle
|
||||||
self.builder.get_object("headerbar").props.subtitle = subtitle
|
self.builder.get_object("headerbar").props.subtitle = subtitle
|
||||||
|
|
||||||
# Load logos
|
# Load logo
|
||||||
logo = GdkPixbuf.Pixbuf.new_from_file(self.logo_path)
|
logo = GdkPixbuf.Pixbuf.new_from_file(self.logo_path)
|
||||||
self.window.set_icon_from_file(self.logo_path)
|
self.window.set_icon(logo)
|
||||||
self.builder.get_object("manjaroicon").set_from_pixbuf(logo)
|
self.builder.get_object("manjaroicon").set_from_pixbuf(logo)
|
||||||
self.builder.get_object("aboutdialog").set_logo(logo)
|
self.builder.get_object("aboutdialog").set_logo(logo)
|
||||||
|
|
||||||
|
@ -66,8 +65,7 @@ class ManjaroHello():
|
||||||
self.pages = ("readme", "release", "involved")
|
self.pages = ("readme", "release", "involved")
|
||||||
for page in self.pages:
|
for page in self.pages:
|
||||||
scrolled_window = Gtk.ScrolledWindow()
|
scrolled_window = Gtk.ScrolledWindow()
|
||||||
viewport = Gtk.Viewport()
|
viewport = Gtk.Viewport(border_width=10)
|
||||||
viewport.set_border_width(10)
|
|
||||||
label = Gtk.Label(wrap=True)
|
label = Gtk.Label(wrap=True)
|
||||||
viewport.add(label)
|
viewport.add(label)
|
||||||
scrolled_window.add(viewport)
|
scrolled_window.add(viewport)
|
||||||
|
@ -90,8 +88,6 @@ class ManjaroHello():
|
||||||
for btn in ("wiki", "forums", "chat", "mailling", "development", "donate"):
|
for btn in ("wiki", "forums", "chat", "mailling", "development", "donate"):
|
||||||
img = Gtk.Image.new_from_file(self.data_path + "img/external-link.png")
|
img = Gtk.Image.new_from_file(self.data_path + "img/external-link.png")
|
||||||
img.set_margin_left(2)
|
img.set_margin_left(2)
|
||||||
self.builder.get_object(btn).set_image_position(Gtk.PositionType.RIGHT)
|
|
||||||
self.builder.get_object(btn).set_always_show_image(True)
|
|
||||||
self.builder.get_object(btn).set_image(img)
|
self.builder.get_object(btn).set_image(img)
|
||||||
|
|
||||||
# Set autostart switcher state
|
# Set autostart switcher state
|
||||||
|
|
|
@ -144,6 +144,8 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image_position">right</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
<signal name="clicked" handler="on_btn_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_btn_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -158,6 +160,8 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image_position">right</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -186,6 +190,8 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image_position">right</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -200,6 +206,8 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image_position">right</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -214,6 +222,8 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image_position">right</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -228,6 +238,8 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image_position">right</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -242,6 +254,8 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image_position">right</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_link_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
|
Loading…
Reference in New Issue