Use the icon
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import os
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "4.0")
|
||||
gi.require_version("Adw", "1")
|
||||
from gi.repository import Adw, Gtk
|
||||
from gi.repository import Adw, Gdk, Gtk
|
||||
|
||||
|
||||
class WelcomePage(Adw.Bin):
|
||||
@@ -12,13 +14,30 @@ class WelcomePage(Adw.Bin):
|
||||
page = Adw.StatusPage()
|
||||
page.set_title("Welcome to Iridium OS")
|
||||
page.set_description("The installation will begin shortly")
|
||||
page.set_icon_name("system-software-install-symbolic")
|
||||
|
||||
# Load custom icon
|
||||
icon_path = os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
"..",
|
||||
"..",
|
||||
"..",
|
||||
"data",
|
||||
"icons",
|
||||
"org.iridium.Installer.svg",
|
||||
)
|
||||
if os.path.exists(icon_path):
|
||||
try:
|
||||
paintable = Gdk.Texture.new_from_filename(icon_path)
|
||||
page.set_paintable(paintable)
|
||||
except Exception:
|
||||
page.set_icon_name("system-software-install-symbolic")
|
||||
else:
|
||||
page.set_icon_name("system-software-install-symbolic")
|
||||
|
||||
# Content Box
|
||||
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||
box.set_spacing(12)
|
||||
box.set_halign(Gtk.Align.CENTER)
|
||||
box.set_valign(Gtk.Align.CENTER)
|
||||
|
||||
lbl = Gtk.Label(label="Select your language:")
|
||||
lbl.add_css_class("heading")
|
||||
@@ -29,7 +48,6 @@ class WelcomePage(Adw.Bin):
|
||||
"English",
|
||||
]
|
||||
dropdown = Gtk.DropDown.new_from_strings(languages)
|
||||
dropdown.set_margin_bottom(20)
|
||||
box.append(dropdown)
|
||||
|
||||
page.set_child(box)
|
||||
|
||||
@@ -21,6 +21,7 @@ class InstallerWindow(Adw.ApplicationWindow):
|
||||
|
||||
self.set_default_size(900, 650)
|
||||
self.set_title("Iridium Installer" + (" (MOCK MODE)" if mock_mode else ""))
|
||||
self.set_icon_name("org.iridium.Installer")
|
||||
|
||||
self.toolbar_view = Adw.ToolbarView()
|
||||
self.set_content(self.toolbar_view)
|
||||
|
||||
Reference in New Issue
Block a user