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

[BasicUI] Icons (OH source) in buttongrid mappings aren't updated based on color theme #2249

Closed
1 of 4 tasks
mueller-ma opened this issue Dec 31, 2023 · 2 comments · Fixed by #2257
Closed
1 of 4 tasks
Labels
basic ui Basic UI bug Something isn't working

Comments

@mueller-ma
Copy link
Member

Which UI are you reporting an issue for?

  • Basic UI
  • HABPanel
  • HABot
  • CometVisu

The problem

I have a set BasicUI to dynamic theme and a Firefox to dark theme. Some icons are updated to be white, so the contrast ratio to the background is higher. This doesn't work for icons in buttongrid mappings:

  1. Icon is oh:mdi:chevron_up
  2. Icon is oh:mdi:chevron_up
  3. Icon is f7:arrowtriangle_left

grafik

Expected behavior

All icons should be updated.

Your environment

openHAB 4.2.0
Build #3814
@mueller-ma mueller-ma added the bug Something isn't working label Dec 31, 2023
@lolodomo
Copy link
Contributor

For icons provided by the openHAB server, you need to enable the Baisc UI setting named "inline SVG".
Not necessary for other icon sources (f7, material, iconify).

@lolodomo lolodomo reopened this Dec 31, 2023
@lolodomo
Copy link
Contributor

lolodomo commented Dec 31, 2023

Ok, I understand, the specific treatment applied to the icon of a sitemap element (download and embed the SVG icon in the page) is not applied for icons in buttons (neither switch nor buttongrid).
Like for icon of a sitemap element, IMG tag has to be replaced by an (embedded) SVG tag.
Should not be too much difficult as I have already the code to do that.

@lolodomo lolodomo added the basic ui Basic UI label Dec 31, 2023
@lolodomo lolodomo changed the title [BasicUI] Icons in buttongrid mappings aren't updated based on color theme [BasicUI] Icons (OH source) in buttongrid mappings aren't updated based on color theme Jan 1, 2024
lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Jan 6, 2024
Only concerns SVG icons delivered by the openHAB icon servlet and having "currentColor" as fill color.

Convertion to inline SVG is applied only if the "inline SVG" setting is enabled.

Fix openhab#2249

Signed-off-by: Laurent Garnier <[email protected]>
lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Jan 6, 2024
Only concerns SVG icons delivered by the openHAB icon servlet and having "currentColor" as fill color.

Convertion to inline SVG is applied only if the "inline SVG" setting is enabled.

Fix openhab#2249

Signed-off-by: Laurent Garnier <[email protected]>
lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Jan 6, 2024
Only concerns SVG icons delivered by the openHAB icon servlet and having "currentColor" as fill color.

Convertion to inline SVG is applied only if the "inline SVG" setting is enabled.

Fix openhab#2249

Signed-off-by: Laurent Garnier <[email protected]>
kaikreuzer pushed a commit that referenced this issue Jan 7, 2024
Only concerns SVG icons delivered by the openHAB icon servlet and having
"currentColor" as fill color.

Convertion to inline SVG is applied only if the "inline SVG" setting is
enabled.

Fix #2249

Signed-off-by: Laurent Garnier <[email protected]>
kaikreuzer pushed a commit that referenced this issue Jan 7, 2024
Only concerns SVG icons delivered by the openHAB icon servlet and having
"currentColor" as fill color.

Convertion to inline SVG is applied only if the "inline SVG" setting is
enabled.

Fix #2249

Signed-off-by: Laurent Garnier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
basic ui Basic UI bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants