Add summary screen

pull/6/head
axtloss 2 years ago
parent 046387da1c
commit ae91a5d789

@ -9,5 +9,6 @@ jade_gui_sources = [
'desktop_screen.py',
'misc_screen.py',
'partition_screen.py',
'summary_screen.py',
]
install_data(jade_gui_sources, install_dir: functionsdir)

@ -0,0 +1,28 @@
# summary_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/summary_screen.ui')
class SummaryScreen(Adw.Bin):
__gtype_name__ = "SummaryScreen"
def __init__(self, window, main_carousel, next_page, application, **kwargs):
super().__init__(**kwargs)

@ -13,6 +13,7 @@
<file>pages/desktop_screen.ui</file>
<file>pages/misc_screen.ui</file>
<file>pages/partition_screen.ui</file>
<file>pages/summary_screen.ui</file>
<file>gtk/help-overlay.ui</file>
<file>crystal-logo-minimal.png</file>
</gresource>

@ -17,6 +17,7 @@ blueprints = custom_target('blueprints',
'pages/desktop_screen.blp',
'pages/misc_screen.blp',
'pages/partition_screen.blp',
'pages/summary_screen.blp',
),
output: '.',
command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],

@ -0,0 +1,155 @@
using Gtk 4.0;
using Adw 1;
template SummaryScreen : Adw.Bin {
hexpand: true;
vexpand: true;
Gtk.Box {
hexpand: true;
vexpand: true;
Adw.StatusPage {
hexpand: true;
vexpand: true;
title: "Summary";
description: "Last chance to verify everything";
Adw.PreferencesPage {
Adw.PreferencesGroup {
title: "Timezone and Locale";
Gtk.ListBox timezone_listbox {
Adw.ActionRow timezone_label {
title: "region/location";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
Adw.ActionRow locale_label {
title: "locale";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
styles ["boxed-list"]
}
}
Adw.PreferencesGroup {
title: "Keyboard Layout";
Gtk.ListBox keyboard_listbox {
Adw.ActionRow keyboard_label {
title: "layout";
subtitle: "keymap";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
styles ["boxed-list"]
}
}
Adw.PreferencesGroup {
title: "User Settings";
Gtk.ListBox user_listbox {
Adw.ActionRow username_label {
title: "username";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
Adw.ActionRow sudo_label {
title: "sudo enabled/disabled";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
Adw.ActionRow root_label {
title: "root enabled/disabled";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
styles ["boxed-list"]
}
}
Adw.PreferencesGroup {
title: "Partition Settings";
Gtk.ListBox partition_listbox {
Adw.ActionRow partition_label {
title: "selected install partition";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
Adw.ActionRow disksize_label {
title: "size of disk";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
Adw.ActionRow uefi_label {
title: "legacy bios/uefi";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
styles ["boxed-list"]
}
}
Adw.PreferencesGroup {
title: "Miscellaneous Settings";
Gtk.ListBox misc_listbox {
Adw.ActionRow ipv_label {
title: "ipv6 enabled/disabled";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
Adw.ActionRow timeshift_label {
title: "timeshift enabled/disabled";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
Adw.ActionRow theme_label {
title: "crystal theming enaled/disabled";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
Adw.ActionRow unakite_label {
title: "unakite enaled/disabled";
Gtk.Button {
valign: center;
halign: center;
icon-name: "document-edit-symbolic";
}
}
styles ["boxed-list"]
}
}
}
}
}
}

@ -10,27 +10,24 @@ template JadeGuiWindow : Gtk.ApplicationWindow {
[titlebar]
Adw.HeaderBar header_bar {
title-widget: Gtk.Box {
Gtk.Image {
resource: "/al/getcryst/jadegui/crystal-logo-minimal.png";
}
Gtk.Label {
margin-start: 2;
label: "<span font_weight='bold'>Jade</span>";
use-markup: true;
}
Adw.CarouselIndicatorDots {
carousel: carousel;
orientation: horizontal;
}
};
[start]
Gtk.Button {
label: "Back";
//icon-name: ;
}
styles ["flat"]
}
Gtk.Box {
orientation: horizontal;
vexpand: true;
hexpand: true;
Adw.CarouselIndicatorDots {
carousel: carousel;
orientation: vertical;
}
Adw.Carousel carousel {
orientation: horizontal;
vexpand: true;

@ -30,6 +30,7 @@ from .functions.user_screen import UserScreen
from .functions.desktop_screen import DesktopScreen
from .functions.misc_screen import MiscScreen
from .functions.partition_screen import PartitionScreen
from .functions.summary_screen import SummaryScreen
@Gtk.Template(resource_path='/al/getcryst/jadegui/window.ui')
class JadeGuiWindow(Gtk.ApplicationWindow):
@ -47,7 +48,8 @@ class JadeGuiWindow(Gtk.ApplicationWindow):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.partition_screen = PartitionScreen(window=self, main_carousel=self.carousel, next_page=None, **kwargs)
self.summary_screen = SummaryScreen(window=self, main_carousel=self.carousel, next_page=None, **kwargs)
self.partition_screen = PartitionScreen(window=self, main_carousel=self.carousel, next_page=self.summary_screen, **kwargs)
self.misc_screen = MiscScreen(window=self, main_carousel=self.carousel, next_page=self.partition_screen, **kwargs)
self.desktop_screen = DesktopScreen(window=self, main_carousel=self.carousel, next_page=self.misc_screen, **kwargs)
self.user_screen = UserScreen(window=self, main_carousel=self.carousel, next_page=self.desktop_screen, **kwargs)
@ -59,6 +61,7 @@ class JadeGuiWindow(Gtk.ApplicationWindow):
self.carousel.append(self.desktop_screen)
self.carousel.append(self.misc_screen)
self.carousel.append(self.partition_screen)
self.carousel.append(self.summary_screen)
### Widgets for first page (welcome screen)
#self.quit_button.connect("clicked", self.confirmQuit)
self.next_button.connect("clicked", self.nextPage)

Loading…
Cancel
Save