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

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)

[email protected]
screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com
[email protected]
[email protected]
no-overview@fthx
[email protected]
[email protected]
[email protected]
[email protected]
battery-indicator-icon@Deminder
just-perfection-desktop@just-perfection
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
blur-my-shell@aunetx
[email protected]
[email protected]
[email protected]
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
@github-project-automation github-project-automation bot moved this from Todo to Done in Gradience 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
@github-project-automation github-project-automation bot moved this from Done to In Progress in Gradience 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/bug Something isn't working
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

4 participants