mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-10-04 00:47:52 +00:00
Change indentation in .blp files to 2 spaces (#562)
This commit is contained in:
commit
d78546e1c6
13 changed files with 239 additions and 242 deletions
|
@ -15,5 +15,8 @@ indent_size = 4
|
|||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.blp]
|
||||
indent_size = 2
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
|
|
|
@ -2,12 +2,16 @@ using Gtk 4.0;
|
|||
using Adw 1;
|
||||
|
||||
template GradienceBuiltinPresetRow : Adw.ActionRow {
|
||||
subtitle: _("Made by @GradienceTeam");
|
||||
subtitle: _("Made by @GradienceTeam");
|
||||
|
||||
[suffix]
|
||||
Button apply_button {
|
||||
valign: center;
|
||||
icon-name: "checkmark-large-symbolic";
|
||||
tooltip-text: _("Apply Preset");
|
||||
clicked => on_apply_button_clicked();
|
||||
valign: center;
|
||||
icon-name: "checkmark-large-symbolic";
|
||||
tooltip-text: _("Apply Preset");
|
||||
clicked => on_apply_button_clicked();
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,20 +8,24 @@ template GradienceError : ListBoxRow {
|
|||
margin-bottom: 6;
|
||||
margin-start: 12;
|
||||
margin-end: 12;
|
||||
|
||||
Box {
|
||||
orientation: horizontal;
|
||||
spacing: 6;
|
||||
|
||||
Label error-label {
|
||||
halign: start;
|
||||
justify: left;
|
||||
styles ["heading", "error"]
|
||||
halign: start;
|
||||
justify: left;
|
||||
}
|
||||
|
||||
Label element-label {
|
||||
styles ["dim-label", "error"]
|
||||
halign: start;
|
||||
justify: left;
|
||||
styles ["dim-label", "error"]
|
||||
}
|
||||
}
|
||||
|
||||
Label line-label {
|
||||
halign: start;
|
||||
wrap: true;
|
||||
|
|
|
@ -2,41 +2,39 @@ using Gtk 4.0;
|
|||
using Adw 1;
|
||||
|
||||
template GradienceExplorePresetRow : Adw.ActionRow {
|
||||
Box {
|
||||
spacing: 6;
|
||||
|
||||
Box {
|
||||
spacing: 6;
|
||||
//Label badge {
|
||||
// valign: center;
|
||||
// label: _("Unknown");
|
||||
|
||||
//Label badge {
|
||||
// valign: center;
|
||||
// label: _("Unknown");
|
||||
// styles [
|
||||
// "tag",
|
||||
// "caption",
|
||||
// ]
|
||||
//}
|
||||
|
||||
// styles [
|
||||
// "tag",
|
||||
// "caption",
|
||||
// ]
|
||||
//}
|
||||
Button apply_button {
|
||||
valign: center;
|
||||
icon-name: "checkmark-large-symbolic";
|
||||
tooltip-text: _("Download and Apply");
|
||||
clicked => on_apply_button_clicked();
|
||||
|
||||
Button apply_button {
|
||||
valign: center;
|
||||
icon-name: "checkmark-large-symbolic";
|
||||
tooltip-text: _("Download and Apply");
|
||||
clicked => on_apply_button_clicked();
|
||||
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
Button download_button {
|
||||
valign: center;
|
||||
icon-name: "download-symbolic";
|
||||
tooltip-text: _("Download Only");
|
||||
clicked => on_download_button_clicked();
|
||||
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
|
||||
Button download_button {
|
||||
valign: center;
|
||||
icon-name: "download-symbolic";
|
||||
tooltip-text: _("Download Only");
|
||||
clicked => on_download_button_clicked();
|
||||
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,34 +2,30 @@ using Gtk 4.0;
|
|||
using Adw 1;
|
||||
|
||||
template GradienceNoPluginPrefWindow: Adw.Window {
|
||||
title: _("Plugin Preferences");
|
||||
modal: true;
|
||||
default-width: 400;
|
||||
default-height: 400;
|
||||
resizable: true;
|
||||
deletable: true;
|
||||
title: _("Plugin Preferences");
|
||||
modal: true;
|
||||
default-width: 400;
|
||||
default-height: 400;
|
||||
resizable: true;
|
||||
deletable: true;
|
||||
|
||||
|
||||
Adw.Leaflet leaflet {
|
||||
can-unfold: false;
|
||||
Adw.Leaflet leaflet {
|
||||
can-unfold: false;
|
||||
|
||||
Gtk.Box main_view {
|
||||
orientation: vertical;
|
||||
Gtk.Box main_view {
|
||||
orientation: vertical;
|
||||
|
||||
Adw.HeaderBar titlebar {
|
||||
styles ["flat"]
|
||||
}
|
||||
|
||||
|
||||
Adw.StatusPage {
|
||||
name: "empty";
|
||||
title: _("No Preferences");
|
||||
icon-name: "action-unavailable-symbolic";
|
||||
|
||||
description: _("This plugin doesn't have any preferences.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Adw.HeaderBar titlebar {
|
||||
styles ["flat"]
|
||||
}
|
||||
|
||||
Adw.StatusPage {
|
||||
name: "empty";
|
||||
icon-name: "action-unavailable-symbolic";
|
||||
title: _("No Preferences");
|
||||
description: _("This plugin doesn't have any preferences.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,4 @@ template GradiencePluginRow : Adw.ActionRow {
|
|||
tooltip-text: _("Remove Plugin");
|
||||
clicked => on_remove_plugin_clicked();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,72 +2,80 @@ using Gtk 4.0;
|
|||
using Adw 1;
|
||||
|
||||
template GradiencePreferencesWindow : Adw.PreferencesWindow {
|
||||
title: _("Preferences");
|
||||
default-height: 400;
|
||||
default-width: 600;
|
||||
modal: true;
|
||||
title: _("Preferences");
|
||||
default-height: 400;
|
||||
default-width: 600;
|
||||
modal: true;
|
||||
|
||||
Adw.PreferencesPage {
|
||||
Adw.PreferencesGroup flatpak_group {
|
||||
title: _("GTK4 Flatpak Applications");
|
||||
Adw.ActionRow {
|
||||
title: _("Allow GTK4 Flatpak Applications Theming");
|
||||
subtitle: _("Override Flatpak permissions for current user to allow GTK4 Flatpak applications to access custom themes.");
|
||||
activatable-widget: allow_gtk4_flatpak_theming_user;
|
||||
Gtk.Switch allow_gtk4_flatpak_theming_user {
|
||||
valign: center;
|
||||
}
|
||||
}
|
||||
Adw.ActionRow {
|
||||
visible: false;
|
||||
title: _("Allow GTK4 Flatpak Applications Theming (System)");
|
||||
subtitle: _("Override Flatpak permissions for all users to allow GTK4 Flatpak applications to access custom themes. (Requires root access)");
|
||||
activatable-widget: allow_gtk4_flatpak_theming_global;
|
||||
Gtk.Switch allow_gtk4_flatpak_theming_global {
|
||||
valign: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
Adw.PreferencesGroup gtk3_flatpak_group {
|
||||
title: _("GTK3 Flatpak Applications");
|
||||
description: _("Remember to install adw-gtk3 theme (as a Flatpak package) in order to get custom presets working in GTK3 Flatpak applications.");
|
||||
Adw.ActionRow {
|
||||
title: _("Allow GTK3 Flatpak theming");
|
||||
subtitle: _("Override Flatpak permissions for current user to allow GTK3 Flatpak applications to access adw-gtk3 theme.");
|
||||
activatable-widget: allow_gtk3_flatpak_theming_user;
|
||||
Gtk.Switch allow_gtk3_flatpak_theming_user {
|
||||
valign: center;
|
||||
}
|
||||
}
|
||||
Adw.ActionRow {
|
||||
visible: false;
|
||||
title: _("GTK3 Flatpak Applications (System)");
|
||||
subtitle: _("Override Flatpak permissions for all users to allow GTK3 Flatpak applications to access adw-gtk3 theme. (Requires root access)");
|
||||
activatable-widget: allow_gtk3_flatpak_theming_global;
|
||||
Gtk.Switch allow_gtk3_flatpak_theming_global {
|
||||
valign: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
Adw.PreferencesGroup custom_repository_group {
|
||||
visible: false;
|
||||
title: _("Custom Preset Repositories");
|
||||
Adw.ActionRow {
|
||||
title: _("Custom repository URL address");
|
||||
Gtk.Box {
|
||||
styles ["linked"]
|
||||
orientation: horizontal;
|
||||
Adw.PreferencesPage {
|
||||
Adw.PreferencesGroup flatpak_group {
|
||||
title: _("GTK4 Flatpak Applications");
|
||||
|
||||
Gtk.Entry custom_repository_entry {
|
||||
valign: center;
|
||||
}
|
||||
|
||||
Gtk.Button custom_repository_apply {
|
||||
valign: center;
|
||||
icon-name: "checkmark-large-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
Adw.ActionRow {
|
||||
title: _("Allow GTK4 Flatpak Applications Theming");
|
||||
subtitle: _("Override Flatpak permissions for current user to allow GTK4 Flatpak applications to access custom themes.");
|
||||
activatable-widget: allow_gtk4_flatpak_theming_user;
|
||||
Gtk.Switch allow_gtk4_flatpak_theming_user {
|
||||
valign: center;
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
visible: false;
|
||||
title: _("Allow GTK4 Flatpak Applications Theming (System)");
|
||||
subtitle: _("Override Flatpak permissions for all users to allow GTK4 Flatpak applications to access custom themes. (Requires root access)");
|
||||
activatable-widget: allow_gtk4_flatpak_theming_global;
|
||||
Gtk.Switch allow_gtk4_flatpak_theming_global {
|
||||
valign: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.PreferencesGroup gtk3_flatpak_group {
|
||||
title: _("GTK3 Flatpak Applications");
|
||||
description: _("Remember to install adw-gtk3 theme (as a Flatpak package) in order to get custom presets working in GTK3 Flatpak applications.");
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Allow GTK3 Flatpak theming");
|
||||
subtitle: _("Override Flatpak permissions for current user to allow GTK3 Flatpak applications to access adw-gtk3 theme.");
|
||||
activatable-widget: allow_gtk3_flatpak_theming_user;
|
||||
Gtk.Switch allow_gtk3_flatpak_theming_user {
|
||||
valign: center;
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
visible: false;
|
||||
title: _("GTK3 Flatpak Applications (System)");
|
||||
subtitle: _("Override Flatpak permissions for all users to allow GTK3 Flatpak applications to access adw-gtk3 theme. (Requires root access)");
|
||||
activatable-widget: allow_gtk3_flatpak_theming_global;
|
||||
Gtk.Switch allow_gtk3_flatpak_theming_global {
|
||||
valign: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.PreferencesGroup custom_repository_group {
|
||||
visible: false;
|
||||
title: _("Custom Preset Repositories");
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Custom repository URL address");
|
||||
|
||||
Gtk.Box {
|
||||
styles ["linked"]
|
||||
orientation: horizontal;
|
||||
|
||||
Gtk.Entry custom_repository_entry {
|
||||
valign: center;
|
||||
}
|
||||
|
||||
Gtk.Button custom_repository_apply {
|
||||
valign: center;
|
||||
icon-name: "checkmark-large-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,10 +14,10 @@ Popover pop_actions {
|
|||
margin-end: 6;
|
||||
|
||||
Button btn_share {
|
||||
valign: center;
|
||||
label: _("Share preset");
|
||||
tooltip-text: _("Share Preset");
|
||||
styles ["flat"]
|
||||
valign: center;
|
||||
label: _("Share preset");
|
||||
tooltip-text: _("Share Preset");
|
||||
styles ["flat"]
|
||||
}
|
||||
|
||||
Separator {
|
||||
|
@ -30,98 +30,90 @@ Popover pop_actions {
|
|||
}
|
||||
|
||||
template GradiencePresetRow : Adw.ExpanderRow {
|
||||
[action]
|
||||
Button star_button {
|
||||
[action]
|
||||
Button star_button {
|
||||
valign: center;
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
|
||||
[action]
|
||||
Stack value_stack {
|
||||
valign: center;
|
||||
hhomogeneous: false;
|
||||
interpolate-size: true;
|
||||
transition-type: crossfade;
|
||||
|
||||
Button apply_button {
|
||||
valign: center;
|
||||
tooltip-text: _("Add as a Favourite");
|
||||
icon-name: "checkmark-large-symbolic";
|
||||
tooltip-text: _("Apply Preset");
|
||||
clicked => on_apply_button_clicked();
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
|
||||
Entry name_entry {
|
||||
text: "Name";
|
||||
changed => on_name_entry_changed();
|
||||
}
|
||||
}
|
||||
|
||||
[action]
|
||||
Stack value_stack {
|
||||
[action]
|
||||
ToggleButton name_entry_toggle {
|
||||
valign: center;
|
||||
icon-name: "document-edit-symbolic";
|
||||
tooltip-text: _("Rename Preset");
|
||||
toggled => on_name_entry_toggled();
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
|
||||
[action]
|
||||
MenuButton {
|
||||
valign: center;
|
||||
popover: pop_actions;
|
||||
icon-name: "view-more-symbolic";
|
||||
tooltip-text: _("More Options");
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
|
||||
Adw.ActionRow description {
|
||||
title: _("Description");
|
||||
subtitle: _("Sorry, but this preset don't have a description.");
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
[prefix]
|
||||
Gtk.Box badge_list {
|
||||
spacing: 6;
|
||||
margin-start: 6;
|
||||
margin-end: 6;
|
||||
|
||||
Label no_badges {
|
||||
valign: center;
|
||||
hhomogeneous: false;
|
||||
interpolate-size: true;
|
||||
transition-type: crossfade;
|
||||
|
||||
Button apply_button {
|
||||
valign: center;
|
||||
icon-name: "checkmark-large-symbolic";
|
||||
tooltip-text: _("Apply Preset");
|
||||
clicked => on_apply_button_clicked();
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
Entry name_entry {
|
||||
text: "Name";
|
||||
changed => on_name_entry_changed();
|
||||
}
|
||||
label: _("No Badges");
|
||||
styles [
|
||||
"tag",
|
||||
"caption",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[action]
|
||||
ToggleButton name_entry_toggle {
|
||||
valign: center;
|
||||
icon-name: "document-edit-symbolic";
|
||||
tooltip-text: _("Rename Preset");
|
||||
|
||||
toggled => on_name_entry_toggled();
|
||||
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
|
||||
[action]
|
||||
MenuButton {
|
||||
[suffix]
|
||||
Button remove_button {
|
||||
valign: center;
|
||||
popover: pop_actions;
|
||||
icon-name: "view-more-symbolic";
|
||||
tooltip-text: _("More Options");
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
label: _("Remove preset");
|
||||
tooltip-text: _("Remove Preset");
|
||||
clicked => on_remove_button_clicked();
|
||||
styles ["destructive-action"]
|
||||
}
|
||||
|
||||
|
||||
Adw.ActionRow description {
|
||||
title: _("Description");
|
||||
subtitle: _("Sorry, but this preset don't have a description.");
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
|
||||
[prefix]
|
||||
Gtk.Box badge_list {
|
||||
spacing: 6;
|
||||
margin-start: 6;
|
||||
margin-end: 6;
|
||||
|
||||
Label no_badges {
|
||||
valign: center;
|
||||
label: _("No Badges");
|
||||
styles [
|
||||
"tag",
|
||||
"caption",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
[suffix]
|
||||
Button remove_button {
|
||||
valign: center;
|
||||
label: _("Remove preset");
|
||||
tooltip-text: _("Remove Preset");
|
||||
clicked => on_remove_button_clicked();
|
||||
styles ["destructive-action"]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//Gtk.ListBoxRow {
|
||||
// activatable: false;
|
||||
|
@ -210,8 +202,4 @@ template GradiencePresetRow : Adw.ExpanderRow {
|
|||
//
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -81,20 +81,19 @@ template GradiencePresetWindow : Adw.Window {
|
|||
orientation: vertical;
|
||||
|
||||
Gtk.Box {
|
||||
styles ["linked"]
|
||||
styles ["linked"]
|
||||
|
||||
Gtk.SearchEntry search_entry {
|
||||
hexpand: true;
|
||||
placeholder-text: _("e.g. \"Pretty Purple\"");
|
||||
}
|
||||
|
||||
Gtk.DropDown search_dropdown {
|
||||
model: StringList search_string_list {
|
||||
strings [_("All")]
|
||||
};
|
||||
}
|
||||
}
|
||||
Gtk.SearchEntry search_entry {
|
||||
hexpand: true;
|
||||
placeholder-text: _("e.g. \"Pretty Purple\"");
|
||||
}
|
||||
|
||||
Gtk.DropDown search_dropdown {
|
||||
model: StringList search_string_list {
|
||||
strings [_("All")]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.Stack search_stack {
|
||||
Gtk.StackPage {
|
||||
|
@ -118,16 +117,16 @@ template GradiencePresetWindow : Adw.Window {
|
|||
Gtk.StackPage {
|
||||
name: "page_empty";
|
||||
child: Adw.StatusPage {
|
||||
icon-name: "system-search-symbolic";
|
||||
title: _("No Results Found");
|
||||
icon-name: "system-search-symbolic";
|
||||
title: _("No Results Found");
|
||||
};
|
||||
}
|
||||
|
||||
Gtk.StackPage {
|
||||
name: "page_offline";
|
||||
child: Adw.StatusPage {
|
||||
icon-name: "network-wireless-offline-symbolic";
|
||||
title: _("Offline");
|
||||
icon-name: "network-wireless-offline-symbolic";
|
||||
title: _("Offline");
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,5 +9,4 @@ template GradienceRepoRow : Adw.ActionRow {
|
|||
tooltip-text: _("Remove Preset");
|
||||
clicked => on_remove_button_clicked();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -189,6 +189,7 @@ menu presets-menu {
|
|||
Popover errors-popover {
|
||||
ListBox errors-list {
|
||||
selection-mode: none;
|
||||
|
||||
[placeholder]
|
||||
Label {
|
||||
margin-top: 6;
|
||||
|
|
|
@ -84,8 +84,10 @@ class GradiencePresetRow(Adw.ExpanderRow):
|
|||
|
||||
if name in self.win.app.favourite:
|
||||
self.star_button.set_icon_name("starred-symbolic")
|
||||
self.star_button.set_tooltip_text(_("Remove from Favourites"))
|
||||
else:
|
||||
self.star_button.set_icon_name("non-starred-symbolic")
|
||||
self.star_button.set_tooltip_text(_("Add to Favourites"))
|
||||
|
||||
def on_share_btn_clicked(self, *_args):
|
||||
buglog("share")
|
||||
|
@ -97,9 +99,11 @@ class GradiencePresetRow(Adw.ExpanderRow):
|
|||
if self.name in self.win.app.favourite:
|
||||
self.win.app.favourite.remove(self.name)
|
||||
self.star_button.set_icon_name("non-starred-symbolic")
|
||||
self.star_button.set_tooltip_text(_("Add to Favourites"))
|
||||
else:
|
||||
self.win.app.favourite.add(self.name)
|
||||
self.star_button.set_icon_name("starred-symbolic")
|
||||
self.star_button.set_tooltip_text(_("Remove from Favourites"))
|
||||
self.win.app.save_favourite()
|
||||
self.win.reload_pref_group()
|
||||
|
||||
|
|
|
@ -236,14 +236,9 @@ class GradiencePresetWindow(Adw.Window):
|
|||
self.search_stack.set_visible_child_name("page_results")
|
||||
for widget in self.search_results_list:
|
||||
widget.props.visible = False
|
||||
if not (
|
||||
self.search_dropdown.props.selected_item.get_string().lower()
|
||||
in "all"
|
||||
):
|
||||
if (
|
||||
self.search_dropdown.props.selected_item.get_string().lower()
|
||||
in widget.prefix.lower()
|
||||
):
|
||||
selected_item_name = self.search_dropdown.props.selected_item.get_string().lower()
|
||||
if not selected_item_name in "all":
|
||||
if selected_item_name in widget.prefix.lower():
|
||||
if search_text.lower() in widget.props.title.lower():
|
||||
widget.props.visible = True
|
||||
items_count += 1
|
||||
|
|
Loading…
Reference in a new issue