diff options
| author | Caleb Owens <hello@calebowens.com> | 2022-06-20 14:37:27 +0100 |
|---|---|---|
| committer | Caleb Owens <hello@calebowens.com> | 2022-06-20 14:37:27 +0100 |
| commit | 3d46c739815b178fa77787083d02fabee8e79a21 (patch) | |
| tree | c2120b39043087b13156931892cdba6ac272db09 /src/layout/DwindleLayout.cpp | |
| parent | f5f531562bdd2e935017b5400bd3b4ae5f89b54b (diff) | |
Added a multiplier for the width to height ratio
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index ce63ace6..1a22bec0 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -23,8 +23,10 @@ void SDwindleNodeData::recalcSizePosRecursive() { const auto REVERSESPLITRATIO = 2.f - splitRatio; - if (g_pConfigManager->getInt("dwindle:preserve_split") == 0) - splitTop = size.y > size.x; + if (g_pConfigManager->getInt("dwindle:preserve_split") == 0) { + const auto WIDTHMULTIPLIER = g_pConfigManager->getFloat("dwindle:split_width_multiplier"); + splitTop = size.y * WIDTHMULTIPLIER > size.x; + } const auto SPLITSIDE = !splitTop; @@ -992,4 +994,4 @@ void CHyprDwindleLayout::toggleSplit(CWindow* pWindow) { std::string CHyprDwindleLayout::getLayoutName() { return "dwindle"; -}
\ No newline at end of file +} |
