mirror of
https://github.com/hyprwm/Hyprland
synced 2026-01-03 21:30:11 +01:00
parent
1ac1ff457a
commit
50a242f16a
3 changed files with 9 additions and 1 deletions
|
|
@ -1867,6 +1867,7 @@ void CCompositor::updateWindowAnimatedDecorationValues(PHLWINDOW pWindow) {
|
|||
static auto PSHADOWCOLINACTIVE = CConfigValue<Hyprlang::INT>("decoration:shadow:color_inactive");
|
||||
static auto PDIMSTRENGTH = CConfigValue<Hyprlang::FLOAT>("decoration:dim_strength");
|
||||
static auto PDIMENABLED = CConfigValue<Hyprlang::INT>("decoration:dim_inactive");
|
||||
static auto PDIMMODAL = CConfigValue<Hyprlang::INT>("decoration:dim_modal");
|
||||
|
||||
auto* const ACTIVECOL = sc<CGradientValueData*>((PACTIVECOL.ptr())->getData());
|
||||
auto* const INACTIVECOL = sc<CGradientValueData*>((PINACTIVECOL.ptr())->getData());
|
||||
|
|
@ -1924,7 +1925,7 @@ void CCompositor::updateWindowAnimatedDecorationValues(PHLWINDOW pWindow) {
|
|||
else
|
||||
goalDim = *PDIMSTRENGTH;
|
||||
|
||||
if (IS_SHADOWED_BY_MODAL)
|
||||
if (IS_SHADOWED_BY_MODAL && *PDIMMODAL)
|
||||
goalDim += (1.F - goalDim) / 2.F;
|
||||
|
||||
*pWindow->m_dimPercent = goalDim;
|
||||
|
|
|
|||
|
|
@ -231,6 +231,12 @@ inline static const std::vector<SConfigOptionDescription> CONFIG_OPTIONS = {
|
|||
.type = CONFIG_OPTION_FLOAT,
|
||||
.data = SConfigOptionDescription::SFloatData{1, 0, 1},
|
||||
},
|
||||
SConfigOptionDescription{
|
||||
.value = "decoration:dim_modal",
|
||||
.description = "enables dimming of parents of modal windows",
|
||||
.type = CONFIG_OPTION_BOOL,
|
||||
.data = SConfigOptionDescription::SBoolData{true},
|
||||
},
|
||||
SConfigOptionDescription{
|
||||
.value = "decoration:dim_inactive",
|
||||
.description = "enables dimming of inactive windows",
|
||||
|
|
|
|||
|
|
@ -582,6 +582,7 @@ CConfigManager::CConfigManager() {
|
|||
registerConfigVar("decoration:shadow:color", Hyprlang::INT{0xee1a1a1a});
|
||||
registerConfigVar("decoration:shadow:color_inactive", Hyprlang::INT{-1});
|
||||
registerConfigVar("decoration:dim_inactive", Hyprlang::INT{0});
|
||||
registerConfigVar("decoration:dim_modal", Hyprlang::INT{1});
|
||||
registerConfigVar("decoration:dim_strength", {0.5f});
|
||||
registerConfigVar("decoration:dim_special", {0.2f});
|
||||
registerConfigVar("decoration:dim_around", {0.4f});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue