feat(client): add support for 8-bit hex color codes in CSS

This allows users to use #RRGGBBAA format in their style.css.
The client now detects 8-bit hex codes, transforms them into
GTK-compatible rgba() syntax, and loads the modified data
into the CSS provider.

- Added utility to detect 8-bit hex patterns.
- Added transformation logic to convert hex alpha to decimal.
- Intercepted CSS loading in Client::setupCss to handle the conversion.
This commit is contained in:
Keepo
2026-03-28 21:10:15 -04:00
parent 49460defdc
commit 3b512d1a2c
5 changed files with 88 additions and 11 deletions

View File

@@ -185,7 +185,9 @@ src_files = files(
'src/util/gtk_icon.cpp',
'src/util/icon_loader.cpp',
'src/util/regex_collection.cpp',
'src/util/css_reload_helper.cpp'
'src/util/css_reload_helper.cpp',
'src/util/has_8bit_hex.cpp',
'src/util/transform_8bit_to_rgba.cpp'
)
man_files = files(