mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 16:06:00 +01:00
Added a multiplier for the width to height ratio
This commit is contained in:
parent
f5f531562b
commit
3d46c73981
2 changed files with 6 additions and 3 deletions
|
@ -53,6 +53,7 @@ void CConfigManager::setDefaultVars() {
|
||||||
configValues["dwindle:force_split"].intValue = 0;
|
configValues["dwindle:force_split"].intValue = 0;
|
||||||
configValues["dwindle:preserve_split"].intValue = 0;
|
configValues["dwindle:preserve_split"].intValue = 0;
|
||||||
configValues["dwindle:special_scale_factor"].floatValue = 0.8f;
|
configValues["dwindle:special_scale_factor"].floatValue = 0.8f;
|
||||||
|
configValues["dwindle:split_width_multiplier"].floatValue = 1.0f;
|
||||||
|
|
||||||
configValues["animations:enabled"].intValue = 1;
|
configValues["animations:enabled"].intValue = 1;
|
||||||
configValues["animations:speed"].floatValue = 7.f;
|
configValues["animations:speed"].floatValue = 7.f;
|
||||||
|
|
|
@ -23,8 +23,10 @@ void SDwindleNodeData::recalcSizePosRecursive() {
|
||||||
|
|
||||||
const auto REVERSESPLITRATIO = 2.f - splitRatio;
|
const auto REVERSESPLITRATIO = 2.f - splitRatio;
|
||||||
|
|
||||||
if (g_pConfigManager->getInt("dwindle:preserve_split") == 0)
|
if (g_pConfigManager->getInt("dwindle:preserve_split") == 0) {
|
||||||
splitTop = size.y > size.x;
|
const auto WIDTHMULTIPLIER = g_pConfigManager->getFloat("dwindle:split_width_multiplier");
|
||||||
|
splitTop = size.y * WIDTHMULTIPLIER > size.x;
|
||||||
|
}
|
||||||
|
|
||||||
const auto SPLITSIDE = !splitTop;
|
const auto SPLITSIDE = !splitTop;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue