mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-10-05 17:17:53 +00:00
fix: remove preview
This commit is contained in:
parent
557255b7e9
commit
03dfa5b726
5 changed files with 8 additions and 100 deletions
|
@ -13,7 +13,6 @@
|
|||
<file>ui/presets_manager_window.ui</file>
|
||||
<file>ui/plugin_row.ui</file>
|
||||
<file>ui/welcome.ui</file>
|
||||
<file>ui/preview.ui</file>
|
||||
<file alias="images/welcome.svg">../data/images/welcome.svg</file>
|
||||
<file alias="images/welcome-night.svg">../data/images/welcome-night.svg</file>
|
||||
</gresource>
|
||||
|
|
19
src/main.py
19
src/main.py
|
@ -36,7 +36,6 @@ from .app_type_dialog import GradienceAppTypeDialog
|
|||
from .custom_css_group import GradienceCustomCSSGroup
|
||||
from .constants import rootdir, app_id, version, bugtracker_url, help_url, project_url
|
||||
from .welcome import GradienceWelcomeWindow
|
||||
from .preview import GradiencePreviewWindow
|
||||
|
||||
|
||||
def to_slug_case(non_slug):
|
||||
|
@ -114,8 +113,6 @@ class GradienceApplication(Adw.Application):
|
|||
"show_gtk4_demo",
|
||||
self.show_gtk4_demo)
|
||||
|
||||
|
||||
|
||||
self.create_action(
|
||||
"reset_color_scheme",
|
||||
self.show_reset_color_scheme_dialog)
|
||||
|
@ -500,7 +497,8 @@ class GradienceApplication(Adw.Application):
|
|||
"Saving preset to <tt>{0}</tt>. If that preset already exists, it will be overwritten!"
|
||||
).format(
|
||||
os.path.join(
|
||||
os.environ.get("XDG_CONFIG_HOME", os.environ["HOME"] + "/.config"),
|
||||
os.environ.get("XDG_CONFIG_HOME",
|
||||
os.environ["HOME"] + "/.config"),
|
||||
"presets",
|
||||
to_slug_case(self.preset_name) + ".json",
|
||||
)
|
||||
|
@ -526,7 +524,8 @@ class GradienceApplication(Adw.Application):
|
|||
).format(
|
||||
os.path.join(
|
||||
os.environ.get(
|
||||
"XDG_CONFIG_HOME", os.environ["HOME"] + "/.config"
|
||||
"XDG_CONFIG_HOME", os.environ["HOME"] +
|
||||
"/.config"
|
||||
),
|
||||
"presets",
|
||||
)
|
||||
|
@ -540,7 +539,8 @@ class GradienceApplication(Adw.Application):
|
|||
).format(
|
||||
os.path.join(
|
||||
os.environ.get(
|
||||
"XDG_CONFIG_HOME", os.environ["HOME"] + "/.config"
|
||||
"XDG_CONFIG_HOME", os.environ["HOME"] +
|
||||
"/.config"
|
||||
),
|
||||
"presets",
|
||||
to_slug_case(preset_entry.get_text()) + ".json",
|
||||
|
@ -560,7 +560,8 @@ class GradienceApplication(Adw.Application):
|
|||
if response == "save":
|
||||
with open(
|
||||
os.path.join(
|
||||
os.environ.get("XDG_CONFIG_HOME", os.environ["HOME"] + "/.config"),
|
||||
os.environ.get("XDG_CONFIG_HOME",
|
||||
os.environ["HOME"] + "/.config"),
|
||||
"presets",
|
||||
to_slug_case(entry.get_text()) + ".json",
|
||||
),
|
||||
|
@ -775,10 +776,6 @@ This app is written in Python and uses GTK 4 and libadwaita.
|
|||
print("reload plugins")
|
||||
self.win.plugins_group = self.win.plugins_list.to_group()
|
||||
|
||||
def show_theme_preview(self, *_args):
|
||||
window = GradiencePreviewWindow(self.win)
|
||||
window.present()
|
||||
|
||||
def show_adwaita_demo(self, *_args):
|
||||
GLib.spawn_command_line_async(
|
||||
'sh -c "/bin/adwaita-1-demo > /dev/null 2>&1"')
|
||||
|
|
|
@ -11,7 +11,6 @@ blueprints = custom_target('blueprints',
|
|||
'ui/presets_manager_window.blp',
|
||||
'ui/plugin_row.blp',
|
||||
'ui/welcome.blp',
|
||||
'ui/preview.blp',
|
||||
),
|
||||
output: '.',
|
||||
command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
|
||||
|
@ -65,7 +64,6 @@ gradience_sources = [
|
|||
'presets_manager_window.py',
|
||||
'plugin_row.py',
|
||||
'welcome.py',
|
||||
'preview.py',
|
||||
]
|
||||
|
||||
PY_INSTALLDIR.install_sources(gradience_sources, subdir: 'gradience')
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
from gi.repository import Gtk, Adw, Gio, Gdk
|
||||
from .constants import rootdir
|
||||
|
||||
|
||||
@Gtk.Template(resource_path=f"{rootdir}/ui/preview.ui")
|
||||
class GradiencePreviewWindow(Adw.Window):
|
||||
__gtype_name__ = "GradiencePreviewWindow"
|
||||
|
||||
def __init__(self, window, **kwargs) -> None:
|
||||
super().__init__(**kwargs)
|
||||
|
||||
self.window = window
|
|
@ -1,74 +0,0 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template GradiencePreviewWindow: Adw.Window {
|
||||
title: _("Theme Preview");
|
||||
default-width: 1280;
|
||||
default-height: 720;
|
||||
|
||||
Adw.ToastOverlay toast_overlay {
|
||||
Adw.Leaflet leaflet {
|
||||
can-navigate-back: true;
|
||||
can-unfold: false;
|
||||
|
||||
Gtk.Box main_view {
|
||||
orientation: vertical;
|
||||
|
||||
Adw.HeaderBar titlebar {
|
||||
centering-policy: strict;
|
||||
|
||||
[start]
|
||||
Button apply-button {
|
||||
styles ["suggested-action"]
|
||||
label: _("@primary");
|
||||
}
|
||||
|
||||
[title]
|
||||
Adw.ViewSwitcherTitle title {
|
||||
stack: view_stack;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Gtk.Box {
|
||||
orientation: vertical;
|
||||
|
||||
Adw.ViewStack view_stack {
|
||||
vexpand: true;
|
||||
hexpand: true;
|
||||
|
||||
Adw.ViewStackPage {
|
||||
name: "page_1";
|
||||
title: _("Page 1");
|
||||
|
||||
child: Adw.PreferencesPage content_1 { };
|
||||
|
||||
}
|
||||
|
||||
Adw.ViewStackPage {
|
||||
name: "page_2";
|
||||
title: _("Page 2");
|
||||
|
||||
child: Adw.PreferencesPage content_2 { };
|
||||
}
|
||||
|
||||
Adw.ViewStackPage {
|
||||
name: "page_3";
|
||||
title: _("Page 3");
|
||||
|
||||
|
||||
child: Adw.PreferencesPage content_3 { };
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ViewSwitcherBar {
|
||||
stack: view_stack;
|
||||
reveal: bind title.title-visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue