Add misc screen
parent
6bc23e9137
commit
66b5725a14
@ -0,0 +1,36 @@
|
|||||||
|
# misc_screen.py
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright 2022 user
|
||||||
|
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from gi.repository import Gtk, Adw
|
||||||
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
@Gtk.Template(resource_path='/al/getcryst/jadegui/pages/misc_screen.ui')
|
||||||
|
class MiscScreen(Adw.Bin):
|
||||||
|
__gtype_name__ = "MiscScreen"
|
||||||
|
|
||||||
|
hostname_entry = Gtk.Template().Child()
|
||||||
|
ipv_switch = Gtk.Template().Child()
|
||||||
|
timeshift_switch = Gtk.Template().Child()
|
||||||
|
theme_switch = Gtk.Template().Child()
|
||||||
|
|
||||||
|
def __init__(self, window, main_carousel, next_page, application, **kwargs):
|
||||||
|
super().__init__(**kwargs)
|
||||||
|
self.window = window
|
||||||
|
self.carousel = main_carousel
|
||||||
|
self.next_page = next_page
|
@ -0,0 +1,63 @@
|
|||||||
|
using Gtk 4.0;
|
||||||
|
using Adw 1;
|
||||||
|
|
||||||
|
template MiscScreen : Adw.Bin {
|
||||||
|
hexpand: true;
|
||||||
|
vexpand: true;
|
||||||
|
|
||||||
|
Gtk.Box {
|
||||||
|
vexpand: true;
|
||||||
|
hexpand: true;
|
||||||
|
Adw.StatusPage {
|
||||||
|
hexpand: true;
|
||||||
|
vexpand: true;
|
||||||
|
title: "Miscellaneous";
|
||||||
|
description: "";
|
||||||
|
Adw.PreferencesPage {
|
||||||
|
Adw.PreferencesGroup {
|
||||||
|
Adw.EntryRow hostname_entry {
|
||||||
|
title: "enter the hostname";
|
||||||
|
}
|
||||||
|
|
||||||
|
Gtk.ListBox {
|
||||||
|
margin-top: 7;
|
||||||
|
styles [ "boxed-list" ]
|
||||||
|
Adw.ActionRow {
|
||||||
|
title: "Enable ipv6";
|
||||||
|
Gtk.Switch ipv_switch {
|
||||||
|
valign: center;
|
||||||
|
state: false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Adw.ActionRow {
|
||||||
|
title: "Enable timeshift";
|
||||||
|
Gtk.Switch timeshift_switch {
|
||||||
|
valign: center;
|
||||||
|
state: true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Adw.ActionRow {
|
||||||
|
title: "Enable crystal theming";
|
||||||
|
Gtk.Switch theme_switch {
|
||||||
|
valign: center;
|
||||||
|
state: false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Gtk.Overlay {
|
||||||
|
[overlay]
|
||||||
|
Gtk.Button next_page_button {
|
||||||
|
margin-end: 20;
|
||||||
|
margin-bottom: 20;
|
||||||
|
label: "Next";
|
||||||
|
halign: end;
|
||||||
|
valign: end;
|
||||||
|
tooltip-text: "Move to next page";
|
||||||
|
styles ["suggested-action"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue