aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-06-03 19:03:33 +0200
committervaxerski <[email protected]>2022-06-03 19:03:33 +0200
commit246aa000f56b5a3310b288e7993382aeb655bab4 (patch)
tree3789c77903227559b362cfad4140fd0459a7e187
parent1a93b2a7565d2bb6e376ce1884a4a43178ba443b (diff)
downloadHyprland-246aa000f56b5a3310b288e7993382aeb655bab4.tar.gz
Hyprland-246aa000f56b5a3310b288e7993382aeb655bab4.zip
Added dwindle:special_scale_factor
-rw-r--r--src/config/ConfigManager.cpp1
-rw-r--r--src/layout/DwindleLayout.cpp8
2 files changed, 6 insertions, 3 deletions
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;