Files
installer/iridium_installer/ui/pages/welcome.py

56 lines
1.5 KiB
Python

import os
import gi
gi.require_version("Gtk", "4.0")
gi.require_version("Adw", "1")
from gi.repository import Adw, Gdk, Gtk
class WelcomePage(Adw.Bin):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
page = Adw.StatusPage()
page.set_title("Welcome to Iridium OS")
page.set_description("The installation will begin shortly")
# 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)
lbl = Gtk.Label(label="Select your language:")
lbl.add_css_class("heading")
box.append(lbl)
# Language Dropdown
languages = [
"English",
]
dropdown = Gtk.DropDown.new_from_strings(languages)
box.append(dropdown)
page.set_child(box)
self.set_child(page)