Added dwindle:special_scale_factor

This commit is contained in:
vaxerski 2022-06-03 19:03:33 +02:00
parent 1a93b2a756
commit 246aa000f5
2 changed files with 6 additions and 3 deletions

View file

@ -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;

View file

@ -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;