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.
18 lines
389 B
C++
18 lines
389 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
/**
|
|
* Reads a CSS file, searches for 8-bit hex codes (#RRGGBBAA),
|
|
* and returns true if found, or false if not found.
|
|
*/
|
|
|
|
bool has_8bit_hex(std::string file_path);
|
|
|
|
/**
|
|
* Reads a CSS file, searches for 8-bit hex codes (#RRGGBBAA),
|
|
* and transforms them into GTK-compatible rgba() syntax.
|
|
*/
|
|
|
|
std::string transform_8bit_to_hex(std::string file_path);
|