Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Presets without 5 colors per palette don't apply the shell theme on GNOME 45 #825

Open
2 tasks done
ThatOneCalculator opened this issue Sep 27, 2023 · 18 comments · Fixed by GradienceTeam/Community#105
Labels
type/bug Something isn't working

Comments

@ThatOneCalculator
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

When applying the shell theme, the success toast appears but the theme doesn't apply to the shell, and an error occurs in the console.

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/gradience/backend/theming/shell.py", line 130, in _apply_theme_thread
    output = self.apply_theme(source_object, theme_variant, preset)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/gradience/backend/theming/shell.py", line 142, in apply_theme
    self._create_theme(parent, preset)
  File "/usr/lib/python3.11/site-packages/gradience/backend/theming/shell.py", line 155, in _create_theme
    self._insert_variables()
  File "/usr/lib/python3.11/site-packages/gradience/backend/theming/shell.py", line 176, in _insert_variables
    line = line.replace("{{" + _key + "}}", self.preset_palette[prefix + '_'][key])
                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
KeyError: '4'

To Reproduce

  1. Apply theme
  2. Apply shell theme

Expected behavior

Shell theme applies

Screenshots

No response

OS

Arch Linux

DE/WM version

GNOME 45.0

Version

main branch (gradience-git from aur)

Installation method

AUR

Enabled system extensions (GNOME specific)

user-theme@gnome-shell-extensions.gcampax.github.com
screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com
dash-to-dock@micxgx.gmail.com
grand-theft-focus@zalckos.github.com
no-overview@fthx
appindicatorsupport@rgcjonas.gmail.com
drive-menu@gnome-shell-extensions.gcampax.github.com
dim-completed-calendar-events@marcinjahn.com
favourites-in-appgrid@harshadgavali.gitlab.org
battery-indicator-icon@Deminder
just-perfection-desktop@just-perfection
auto-move-windows@gnome-shell-extensions.gcampax.github.com
quicksettings-audio-devices-renamer@marcinjahn.com
firefox-pip@bennypowers.com
clipboard-indicator@tudmotu.com
quick-touchpad-toggle@kramo.hu
blur-my-shell@aunetx
caffeine@patapon.info
do-not-disturb-while-screen-sharing-or-recording@marcinjahn.com
app-hider@lynith.dev
logomenu@aryan_k

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ThatOneCalculator ThatOneCalculator added the type/bug Something isn't working label Sep 27, 2023
@github-actions
Copy link
Contributor

Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your issue as soon as possible. You can also join the Matrix room: https://matrix.to/#/#Gradience-space:envs.net or the Discord server: https://discord.com/invite/4njFDtfGEZ

@Ryuuramaru
Copy link

Can confirm this issue happens on Fedora 39 Pre-Release (With GNOME 45), with Gradience installed via Flathub

@0xMRTT
Copy link
Member

0xMRTT commented Sep 28, 2023

Can you tell me which preset are you using ?

@ThatOneCalculator
Copy link
Author

Rose Pine. It actually works fine with Pretty Purple, interestingly

@ThatOneCalculator ThatOneCalculator changed the title bug: Shell theme does not apply on GNOME 45 bug: Certain theme's don't apply shell theme on GNOME 45 Sep 28, 2023
@ThatOneCalculator ThatOneCalculator changed the title bug: Certain theme's don't apply shell theme on GNOME 45 bug: Certain themes don't apply the shell theme on GNOME 45 Sep 28, 2023
@ThatOneCalculator
Copy link
Author

The Catppuchin themes work too

@ThatOneCalculator
Copy link
Author

ThatOneCalculator commented Sep 28, 2023

Actually, it seems that almost all themes besides the Rose Pine ones work. I wonder if it's because it has an accent in its name... Nope, that wasn't the cause. Something in those themes are broken.

@0xMRTT
Copy link
Member

0xMRTT commented Sep 28, 2023

@ThatOneCalculator no the issue is that your palette isn't complete ...

@0xMRTT
Copy link
Member

0xMRTT commented Sep 28, 2023

each color needs to have 5 sub colors, whereas rose pine only has 3 sub colors per color

@0xMRTT
Copy link
Member

0xMRTT commented Sep 28, 2023

This is why it says 4 as an error

@ThatOneCalculator
Copy link
Author

Ref: GradienceTeam/Community#105

@ThatOneCalculator ThatOneCalculator changed the title bug: Certain themes don't apply the shell theme on GNOME 45 bug: Presets without 5 colors per palette don't apply the shell theme on GNOME 45 Sep 28, 2023
@ThatOneCalculator
Copy link
Author

I think this issue should still be open, as the bug itself isn't gone, the theme without 5 colors was fixed. Themes with less than 5 colors per category should probably autofill the remaining missing colors with the color that came before it to prevent confusion.

@Ryuuramaru
Copy link

On my end the issue occurs with any of the included themes. This is a pic after applying Pretty Purple and logging out and back in.

image

This is one of the settings menu.

image

@0xMRTT
Copy link
Member

0xMRTT commented Sep 29, 2023

@Ryuuramaru which version of Gradience are you using ? And can you try to apply from gradience launched from CLI and send me the logs ?

@0xMRTT 0xMRTT reopened this Sep 29, 2023
@0xMRTT
Copy link
Member

0xMRTT commented Sep 29, 2023

I think this issue should still be open, as the bug itself isn't gone, the theme without 5 colors was fixed. Themes with less than 5 colors per category should probably autofill the remaining missing colors with the color that came before it to prevent confusion.

Yeah it should :)

@Ryuuramaru
Copy link

Ryuuramaru commented Sep 29, 2023

@Ryuuramaru which version of Gradience are you using ? And can you try to apply from gradience launched from CLI and send me the logs ?

Version 0.4.1

This is the console output:
(Is this what you wanted? I couldn't find any logs)

ryuu-fedora@fedora:~$ flatpak run --command=gradience-cli com.github.GradienceTeam.Gradience apply -n "Catppuccin Frappé" [Gradience] INFO: Preset Catppuccin Frappé applied successfully for Gtk4 applications. [Gradience] INFO: In order for changes to take full effect, you need to log out.

@0xMRTT
Copy link
Member

0xMRTT commented Sep 29, 2023

@Ryuuramaru which version of Gradience are you using ? And can you try to apply from gradience launched from CLI and send me the logs ?

Version 0.4.1

This is the console output: (Is this what you wanted? I couldn't find any logs)

ryuu-fedora@fedora:~$ flatpak run --command=gradience-cli com.github.GradienceTeam.Gradience apply -n "Catppuccin Frappé" [Gradience] INFO: Preset Catppuccin Frappé applied successfully for Gtk4 applications. [Gradience] INFO: In order for changes to take full effect, you need to log out.

Shell Theming isn't available in 0.4.1 ...

@Ryuuramaru
Copy link

Sorry!

I had assumed that since it is a Flatpak (and thus not subject to not being updated in the Fedora Repos), it would incorporate changes from 10 months ago. Looking closer at it, it is stated for a 0.8 milestone so yeah, should've really saw that before posting.

@rstanuwijaya
Copy link

Do you still have the sidebar not correctly themed after updating to 0.8? I have a similar issue as yours, but partially fixed. The left side top panel does not seem to be themed properly.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

4 participants