Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into shell-theming
Browse files Browse the repository at this point in the history
Signed-off-by: tfuxu <73042332+tfuxu@users.noreply.github.com>
  • Loading branch information
tfuxu committed Jan 4, 2023
2 parents 969a1f3 + 1de0a01 commit fb9e1a5
Show file tree
Hide file tree
Showing 53 changed files with 6,382 additions and 6,888 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.


name: CI
name: Build

on:
push:
Expand Down
5 changes: 3 additions & 2 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

Fork this repository, then create a push request when you're done adding features or fixing bugs.

### Localization
### Localization

You can help Gradience translate into your native language. If you found any typos
or think you can improve a translation, you can use the [Weblate](https://hosted.weblate.org/engage/GradienceTeam) platform.

[![Translations](https://hosted.weblate.org/widgets/GradienceTeam/-/gradience/287x66-white.png)](https://hosted.weblate.org/engage/GradienceTeam)


## 🏗️ Building from source

### GNOME Builder
Expand Down Expand Up @@ -99,4 +100,4 @@ ninja -C builddir run
```

> **Note**
> During testing and development, as a convenience, you can use the `local.sh` script to quickly rebuild local builds.
> During testing and development, as a convenience, you can use the `local.sh` script to quickly rebuild local builds.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<a href="https://hosted.weblate.org/engage/GradienceTeam">
<img alt="Translation status" src="https://hosted.weblate.org/widgets/GradienceTeam/-/svg-badge.svg"/>
</a>
<a href="https://github.com/GradienceTeam/Gradience/actions/workflows/ci.yml">
<img alt="CI status" src="https://github.com/GradienceTeam/Gradience/actions/workflows/ci.yml/badge.svg"/>
<a href="https://github.com/GradienceTeam/Gradience/actions/workflows/build.yml">
<img alt="Build status" src="https://github.com/GradienceTeam/Gradience/actions/workflows/build.yml/badge.svg"/>
</a>
<a href="https://flathub.org/apps/details/com.github.GradienceTeam.Gradience">
<img alt="Flathub downloads" src="https://img.shields.io/badge/dynamic/json?color=informational&label=downloads&logo=flathub&logoColor=white&query=%24.installs_total&url=https%3A%2F%2Fflathub.org%2Fapi%2Fv2%2Fstats%2Fcom.github.GradienceTeam.Gradience"/>
Expand Down Expand Up @@ -60,16 +60,16 @@ The main features of Gradience include the following:

<details>
<summary>📷️ More screenshots</summary>

![Monet Tab](https://github.com/GradienceTeam/Design/raw/main/Screenshots/monet_purple.png)

![Proof of Work](https://github.com/GradienceTeam/Design/raw/main/Screenshots/proof_purple.png)
</details>


## 🎨️ Theming setup

> **Note**
> **Note**
> You can go to `Preferences` and apply overrides for Flatpak
<details>
Expand Down Expand Up @@ -97,9 +97,10 @@ Use [this guide](https://github.com/lassekongo83/adw-gtk3/blob/main/gtk4.md) to

</details>


## 🔄 Revert Theming

> **Note**
> **Note**
> You can press on the menu button in the headerbar and press `Reset Applied Color Scheme`
> ![Main Gradience menu](https://github.com/GradienceTeam/Design/main/Screenshots/hamburger_menu.png)
Expand Down Expand Up @@ -130,9 +131,9 @@ Use [this guide](https://github.com/lassekongo83/adw-gtk3/blob/main/gtk4.md) to
> **Warning**
> The main installation method is Flatpak from Flathub
### COPR
### Fedora (COPR)

Gradience is available on COPR. You can install it using the following command:
Gradience is available for Fedora via COPR:

```shell
dnf copr enable lyessaadi/gradience
Expand All @@ -144,12 +145,12 @@ dnf install gradience
> **Warning**
> Not available yet.
### AUR
### Arch Linux (AUR)

Gradience is available on AUR:
Gradience is available for Arch Linux via AUR:

Using [Paru](https://github.com/morganamilo/paru):

```shell
paru -S gradience
```
Expand Down Expand Up @@ -219,7 +220,7 @@ gsettings reset com.github.GradienceTeam.Gradience first-run
_To be done_


## 🙌 Contribute to Gradience
## 🙌 Contribute to Gradience

See [HACKING.md](HACKING.md)

Expand Down
10 changes: 5 additions & 5 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Roadmap
## 🛣️ Roadmap

This tool is fully usable, if you want a new feature, open an issue or submit a PR
Gradience is completely usable, if you like to see a new feature, open an issue or submit a PR

# Base features
### Base features

- [x] Customize named colors, either with a color picker or with text
- [x] Explanations for some named colors
Expand All @@ -19,12 +19,12 @@ This tool is fully usable, if you want a new feature, open an issue or submit a
- [x] Make the code more secure
- [x] Add preset manager with option to download other users presets
- [x] Release on Flathub
- [x] Add autoload theme from CSS
- [x] Add autoload theme from CSS
- [ ] Add ability to create light/dark presets **(High priority)**
- [ ] Add a full theme preview instead of GTK 4 Demo
- [ ] Add ability to generate preset from one color

# Plugins
### Plugins

- [x] Add plugin support. Will help integration with others tools.
- [x] Customize Firefox GNOME theme
Expand Down
13 changes: 6 additions & 7 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# Security Policy
## 🔒️ Security Policy

## Supported Versions
### Supported Versions

We only officially support two latest versions but we provide some help for older versions.
Only two latest versions are officially supported, but older versions get some help too.

| Version | Supported |
| ------- | ------------------ |
| 0.3.x | :white_check_mark: |
| 0.2.x | :white_check_mark: |
| < 0.1 | :x: |

## Reporting a Vulnerability
### Reporting a Vulnerability

Normally Gradience can't have security issues because it's only generating CSS and JSON.
Normally Gradience can't have security issues, but if you have found a vulnerability, please don't submit a public issue.

BUT If you found a vulnerability please don't submit a public issue.
Report this vulnerability to AdwCustomizerTeam@proton.me and include as much details as possible.
Instead, report this vulnerability to [AdwCustomizerTeam@proton.me](mailto:AdwCustomizerTeam@proton.me) and include as much details as possible.
14 changes: 7 additions & 7 deletions build-aux/flatpak/pypi-dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"name": "python3-anyascii",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"anyascii~=0.3\" --no-build-isolation"
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"anyascii\" --no-build-isolation"
],
"sources": [
{
Expand All @@ -26,8 +26,8 @@
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/16/11/da8d395299ca166aa56d9436e26fe8440e5443471de16ccd9a1d06f5993a/Pillow-9.3.0.tar.gz",
"sha256": "c935a22a557a560108d780f9a0fc426dd7459940dc54faa49d83249c8d3e760f"
"url": "https://files.pythonhosted.org/packages/bc/07/830784e061fb94d67649f3e438ff63cfb902dec6d48ac75aeaaac7c7c30e/Pillow-9.4.0.tar.gz",
"sha256": "a1c2d7780448eb93fbcc3789bf3916aa5720d942e37945f4056680317f1cd23e"
},
{
"type": "file",
Expand All @@ -50,8 +50,8 @@
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/16/11/da8d395299ca166aa56d9436e26fe8440e5443471de16ccd9a1d06f5993a/Pillow-9.3.0.tar.gz",
"sha256": "c935a22a557a560108d780f9a0fc426dd7459940dc54faa49d83249c8d3e760f"
"url": "https://files.pythonhosted.org/packages/bc/07/830784e061fb94d67649f3e438ff63cfb902dec6d48ac75aeaaac7c7c30e/Pillow-9.4.0.tar.gz",
"sha256": "a1c2d7780448eb93fbcc3789bf3916aa5720d942e37945f4056680317f1cd23e"
},
{
"type": "file",
Expand All @@ -60,8 +60,8 @@
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/70/bb/7a2c7b4f8f434aa1ee801704bf08f1e53d7b5feba3d5313ab17003477808/lxml-4.9.1.tar.gz",
"sha256": "fe749b052bb7233fe5d072fcb549221a8cb1a16725c47c37e42b0b9cb3ff2c3f"
"url": "https://files.pythonhosted.org/packages/06/5a/e11cad7b79f2cf3dd2ff8f81fa8ca667e7591d3d8451768589996b65dec1/lxml-4.9.2.tar.gz",
"sha256": "2455cfaeb7ac70338b3257f41e21f0724f4b5b0c0e7702da67ee6c3640835b67"
},
{
"type": "file",
Expand Down
4 changes: 3 additions & 1 deletion data/gradience.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<file preprocess="xml-stripblanks">ui/custom_css_group.ui</file>
<file preprocess="xml-stripblanks">ui/error_list_row.ui</file>
<file preprocess="xml-stripblanks">ui/explore_preset_row.ui</file>
<file preprocess="xml-stripblanks">ui/log_out_dialog.ui</file>
<file preprocess="xml-stripblanks">ui/no_plugin_window.ui</file>
<file preprocess="xml-stripblanks">ui/option_row.ui</file>
<file preprocess="xml-stripblanks">ui/palette_shades.ui</file>
Expand All @@ -17,6 +18,7 @@
<file preprocess="xml-stripblanks">ui/preset_row.ui</file>
<file preprocess="xml-stripblanks">ui/presets_manager_window.ui</file>
<file preprocess="xml-stripblanks">ui/repo_row.ui</file>
<file preprocess="xml-stripblanks">ui/save_dialog.ui</file>
<file preprocess="xml-stripblanks">ui/share_window.ui</file>
<file preprocess="xml-stripblanks">ui/welcome_window.ui</file>
<file preprocess="xml-stripblanks">ui/window.ui</file>
Expand All @@ -35,4 +37,4 @@
<file preprocess="xml-stripblanks" alias="palette-symbolic.svg">icons/scalable/actions/palette-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="settings-symbolic.svg">icons/scalable/actions/settings-symbolic.svg</file>
</gresource>
</gresources>
</gresources>
7 changes: 7 additions & 0 deletions data/ui/log_out_dialog.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using Gtk 4.0;
using Adw 1;

template GradienceLogOutDialog : Adw.MessageDialog {
heading: _("Log out");
body: _("For the changes to take full effect, you need to log out.");
}
2 changes: 2 additions & 0 deletions data/ui/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ blueprints = custom_target('blueprints',
'palette_shades.blp',
'option_row.blp',
'window.blp',
'log_out_dialog.blp',
'app_type_dialog.blp',
'custom_css_group.blp',
'presets_manager_window.blp',
Expand All @@ -13,6 +14,7 @@ blueprints = custom_target('blueprints',
'preset_row.blp',
'builtin_preset_row.blp',
'explore_preset_row.blp',
'save_dialog.blp',
'repo_row.blp',
'no_plugin_window.blp',
'share_window.blp',
Expand Down
1 change: 1 addition & 0 deletions data/ui/presets_manager_window.blp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ template GradiencePresetWindow : Adw.Window {
title: _("Presets");
default-width: 700;
default-height: 550;
modal: true;

ShortcutController {
Shortcut {
Expand Down
12 changes: 12 additions & 0 deletions data/ui/save_dialog.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Gtk 4.0;
using Adw 1;

template GradienceSaveDialog : Adw.MessageDialog {
heading: _("Save preset as…");
body-use-markup: true;

[extra-child]
Entry preset-entry {
placeholder-text: _("Preset Name");
}
}
15 changes: 14 additions & 1 deletion gradience/backend/globals.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# globals.py
#
# Change the look of Adwaita, with ease
# Copyright (C) 2022 Gradience Team
# Copyright (C) 2022-2023, Gradience Team
#
# 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
Expand All @@ -20,6 +20,8 @@

from gi.repository import Xdp

from gradience.backend import constants


presets_dir = os.path.join(
os.environ.get("XDG_CONFIG_HOME", os.environ["HOME"] + "/.config"),
Expand All @@ -31,6 +33,17 @@
"Curated": "https://github.com/GradienceTeam/Community/raw/next/curated.json"
}

user_plugin_dir = os.path.join(
os.environ.get("XDG_DATA_HOME", os.environ["HOME"] + "/.local/share"),
"gradience",
"plugins"
)

system_plugin_dir = os.path.join(
constants.pkgdatadir,
"plugins"
)

def get_gtk_theme_dir(app_type):
if app_type == "gtk4":
theme_dir = os.path.join(
Expand Down
2 changes: 1 addition & 1 deletion gradience/backend/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ configure_file(
'LOCALE_DIR': conf.get('LOCALE_DIR'),
}),
install: true,
install_dir: PY_INSTALLDIR.get_install_dir() / backenddir,
install_dir: PY_INSTALLDIR.get_install_dir() / backenddir
)

subdir('models')
Expand Down
21 changes: 14 additions & 7 deletions gradience/frontend/dialogs/app_type_dialog.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# app_type_dialog.py
#
# Change the look of Adwaita, with ease
# Copyright (C) 2022 Gradience Team
# Copyright (C) 2022-2023, Gradience Team
#
# 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
Expand Down Expand Up @@ -31,20 +31,27 @@ class GradienceAppTypeDialog(Adw.MessageDialog):

def __init__(
self,
parent,
heading,
body,
ok_response_name,
ok_response_label,
ok_response_appearance,
**kwargs,
ok_res_name,
ok_res_label,
ok_res_appearance,
**kwargs
):
super().__init__(**kwargs)

self.parent = parent
self.app = self.parent.get_application()

self.set_transient_for(self.app.get_active_window())

self.set_heading(heading)
self.set_body(body)

self.add_response("cancel", _("_Cancel"))
self.add_response(ok_response_name, ok_response_label)
self.set_response_appearance(ok_response_name, ok_response_appearance)
self.add_response(ok_res_name, ok_res_label)
self.set_response_appearance(ok_res_name, ok_res_appearance)
self.set_default_response("cancel")
self.set_close_response("cancel")

Expand Down
Loading

0 comments on commit fb9e1a5

Please sign in to comment.