Skip to content

Icon (symbolics) theming#411

Merged
corecoding merged 15 commits intocorecoding:developfrom
gweebg:icon-theming
Mar 8, 2024
Merged

Icon (symbolics) theming#411
corecoding merged 15 commits intocorecoding:developfrom
gweebg:icon-theming

Conversation

@gweebg
Copy link
Copy Markdown
Contributor

@gweebg gweebg commented Mar 5, 2024

Description

This pull request continues the idea of #295 and aims to implement the feature exposed on #295 (comment) by @corecoding by adding an icon theme switcher in the preference's menu.

Changes to the UI

The icon theme switcher is made out of a combo box on the general section of the preference's menu, and, as it is, includes two themes to choose from, original and gnome. The icons from original are the current theme and the icons from gnome are the icons proposed by @daudix in #295.

Interface updates

Some changes to the layout had to be made, in specific, the section "About", with the addition of the new combo box would lose alignment with the section "Sensors", so I took the freedom to move it to the bottom. Another improvement to the UI is the definition of margin-end to all switch components, so that they wouldn't be touching the GtkBox right limit.

Note: Currently, the gnome theme includes the same gpu symbolic icon as the original theme. If this PR gets merged, I would ask @daudix for an updated version since he is the one responsible for the theme (🥺).

Changes to /icons

In order to have multiple themes, each theme is now represented as a new folder on the Vitals/icons directory and the name of the icons SVG included on a theme must match the names of the original theme. In this pull request we have the /original and /gnome folders, each representing a theme.

Adding a new theme

To add a new icon theme:

  1. Create the folder at /icons with the new symbolics;
  2. Update the combo box items in prefs.ui;
  3. Append the new theme path to the _sensorsIconPathPrefix variable in extension.js;

Note that on step 3., the index of each theme's prefix on the _sensorsIconPathPrefix variable must match the index of the combo box item defined at prefs.ui. For example, if on the combo box the original theme is the first item (index 0) then it must be the first on the list of prefixes.

README Updates

Updated the README.md file to include the credits for the newly added theme.

@daudix
Copy link
Copy Markdown
Contributor

daudix commented Mar 5, 2024

I would suggest naming the new theme "Adwaita" or "GNOME", since later on other icon themes could be added

@gweebg
Copy link
Copy Markdown
Contributor Author

gweebg commented Mar 5, 2024

I would suggest naming the new theme "Adwaita" or "GNOME", since later on other icon themes could be added

Done! Changed the new theme name from updated to gnome, and updated the README.

Comment thread README.md Outdated
@corecoding
Copy link
Copy Markdown
Owner

Thank you, this is great!

@corecoding corecoding merged commit 4296a06 into corecoding:develop Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants