diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-26 19:06:10 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-26 19:07:33 +0200 |
| commit | d53b0a649163102965033a4a63b05387ee85d9cf (patch) | |
| tree | 3e209c6cd129c562d6db9c49cf61a6133d21a723 /src/layout/DwindleLayout.cpp | |
| parent | 80d522cb261eac6877a02f498b17e1180568281e (diff) | |
optimize options in dwindle
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 d5b505cc..babe1a6e 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -6,9 +6,11 @@ void SDwindleNodeData::recalcSizePosRecursive(bool force) { const auto REVERSESPLITRATIO = 2.f - splitRatio; - if (g_pConfigManager->getInt("dwindle:preserve_split") == 0) { - const auto WIDTHMULTIPLIER = g_pConfigManager->getFloat("dwindle:split_width_multiplier"); - splitTop = size.y * WIDTHMULTIPLIER > size.x; + static auto *const PPRESERVESPLIT = &g_pConfigManager->getConfigValuePtr("dwindle:preserve_split")->intValue; + static auto *const PFLMULT = &g_pConfigManager->getConfigValuePtr("dwindle:split_width_multiplier")->floatValue; + + if (*PPRESERVESPLIT == 0) { + splitTop = size.y * *PFLMULT > size.x; } const auto SPLITSIDE = !splitTop; |
