[SCRIPT] Updated

This commit is contained in:
t
2025-03-31 20:14:11 +02:00
parent 810f54cb65
commit 314a27eb42
472 changed files with 11721 additions and 921 deletions
+2 -8
View File
@@ -1,6 +1,5 @@
from ignis.widgets import Widget
from .page import SettingsPage
from options import settings_last_page
class SettingsEntry(Widget.ListBoxRow):
@@ -8,15 +7,10 @@ class SettingsEntry(Widget.ListBoxRow):
self,
icon: str,
label: str,
active_page,
page: SettingsPage,
**kwargs,
):
def callback(x):
active_page.page = page
active_page.name = label
if self in self.parent.rows:
settings_last_page.set_value(self.parent.rows.index(self))
from ..active_page import active_page # avoid a circular import
super().__init__(
child=Widget.Box(
@@ -26,6 +20,6 @@ class SettingsEntry(Widget.ListBoxRow):
],
),
css_classes=["settings-sidebar-entry"],
on_activate=callback,
on_activate=lambda x: active_page.set_value(page),
**kwargs,
)
+1 -2
View File
@@ -1,4 +1,3 @@
from typing import List
from ignis.widgets import Widget
from .row import SettingsRow
from ignis.base_widget import BaseWidget
@@ -6,7 +5,7 @@ from ignis.base_widget import BaseWidget
class SettingsGroup(Widget.Box):
def __init__(
self, name: str | None, rows: List[SettingsRow | BaseWidget] = [], **kwargs
self, name: str | None, rows: list[SettingsRow | BaseWidget] = [], **kwargs
):
super().__init__(
vertical=True,
+1 -2
View File
@@ -1,11 +1,10 @@
from ignis.widgets import Widget
from typing import List
from .group import SettingsGroup
from ignis.base_widget import BaseWidget
class SettingsPage(Widget.Scroll):
def __init__(self, name: str, groups: List[SettingsGroup | BaseWidget] = []):
def __init__(self, name: str, groups: list[SettingsGroup | BaseWidget] = []):
super().__init__(
hexpand=True,
vexpand=True,
+6 -1
View File
@@ -2,7 +2,12 @@ from ignis.widgets import Widget
class SettingsRow(Widget.ListBoxRow):
def __init__(self, label: str | None = None, sublabel: str | None = None, **kwargs):
def __init__(
self,
label: str | None = None,
sublabel: str | None = None,
**kwargs,
):
super().__init__(
css_classes=["settings-row"],
child=Widget.Box(