mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-12-22 12:19:49 +01:00
core: splash_color configuration option (#160)
This commit is contained in:
parent
5838c90cd2
commit
437ac0530b
2 changed files with 6 additions and 1 deletions
|
@ -532,7 +532,11 @@ void CHyprpaper::renderWallpaperForMonitor(SMonitor* pMonitor) {
|
||||||
const auto FONTSIZE = (int)(DIMENSIONS.y / 76.0 / scale);
|
const auto FONTSIZE = (int)(DIMENSIONS.y / 76.0 / scale);
|
||||||
cairo_set_font_size(PCAIRO, FONTSIZE);
|
cairo_set_font_size(PCAIRO, FONTSIZE);
|
||||||
|
|
||||||
cairo_set_source_rgba(PCAIRO, 1.0, 1.0, 1.0, 0.32);
|
static auto* const PSPLASHCOLOR = reinterpret_cast<Hyprlang::INT* const*>(g_pConfigManager->config->getConfigValuePtr("splash_color")->getDataStaticPtr());
|
||||||
|
|
||||||
|
Debug::log(LOG, "Splash color: %x", **PSPLASHCOLOR);
|
||||||
|
|
||||||
|
cairo_set_source_rgba(PCAIRO, ((**PSPLASHCOLOR >> 16) & 0xFF) / 255.0, ((**PSPLASHCOLOR >> 8) & 0xFF) / 255.0, (**PSPLASHCOLOR & 0xFF) / 255.0, ((**PSPLASHCOLOR >> 24) & 0xFF) / 255.0);
|
||||||
|
|
||||||
cairo_text_extents_t textExtents;
|
cairo_text_extents_t textExtents;
|
||||||
cairo_text_extents(PCAIRO, SPLASH.c_str(), &textExtents);
|
cairo_text_extents(PCAIRO, SPLASH.c_str(), &textExtents);
|
||||||
|
|
|
@ -136,6 +136,7 @@ CConfigManager::CConfigManager() {
|
||||||
config->addConfigValue("ipc", Hyprlang::INT{1L});
|
config->addConfigValue("ipc", Hyprlang::INT{1L});
|
||||||
config->addConfigValue("splash", Hyprlang::INT{0L});
|
config->addConfigValue("splash", Hyprlang::INT{0L});
|
||||||
config->addConfigValue("splash_offset", Hyprlang::FLOAT{2.F});
|
config->addConfigValue("splash_offset", Hyprlang::FLOAT{2.F});
|
||||||
|
config->addConfigValue("splash_color", Hyprlang::INT{0x55ffffff});
|
||||||
|
|
||||||
config->registerHandler(&handleWallpaper, "wallpaper", {.allowFlags = false});
|
config->registerHandler(&handleWallpaper, "wallpaper", {.allowFlags = false});
|
||||||
config->registerHandler(&handleUnload, "unload", {.allowFlags = false});
|
config->registerHandler(&handleUnload, "unload", {.allowFlags = false});
|
||||||
|
|
Loading…
Reference in a new issue