diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 8e2b9027..f60f8ea9 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -52,6 +52,7 @@ void CConfigManager::setDefaultVars() { configValues["dwindle:col.group_border_active"].intValue = 0x66ffff00; configValues["dwindle:force_split"].intValue = 0; configValues["dwindle:preserve_split"].intValue = 0; + configValues["dwindle:special_scale_factor"].floatValue = 0.8f; configValues["animations:enabled"].intValue = 1; configValues["animations:speed"].floatValue = 7.f; diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 03fc5acd..e5cbf46c 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -164,10 +164,12 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode) { if (PWORKSPACE->m_bIsSpecialWorkspace) { // if special, we adjust the coords a bit - PWINDOW->m_vRealPosition = calcPos + (calcSize - calcSize * 0.8f) / 2.f; - PWINDOW->m_vRealSize = calcSize * 0.8f; + static auto *const PSCALEFACTOR = &g_pConfigManager->getConfigValuePtr("dwindle:special_scale_factor")->floatValue; - g_pXWaylandManager->setWindowSize(PWINDOW, calcSize * 0.8f); + PWINDOW->m_vRealPosition = calcPos + (calcSize - calcSize * *PSCALEFACTOR) / 2.f; + PWINDOW->m_vRealSize = calcSize * *PSCALEFACTOR; + + g_pXWaylandManager->setWindowSize(PWINDOW, calcSize * *PSCALEFACTOR); } else { PWINDOW->m_vRealSize = calcSize; PWINDOW->m_vRealPosition = calcPos;