mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 22:25:58 +01:00
Added dwindle:special_scale_factor
This commit is contained in:
parent
1a93b2a756
commit
246aa000f5
2 changed files with 6 additions and 3 deletions
|
@ -52,6 +52,7 @@ void CConfigManager::setDefaultVars() {
|
||||||
configValues["dwindle:col.group_border_active"].intValue = 0x66ffff00;
|
configValues["dwindle:col.group_border_active"].intValue = 0x66ffff00;
|
||||||
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["animations:enabled"].intValue = 1;
|
configValues["animations:enabled"].intValue = 1;
|
||||||
configValues["animations:speed"].floatValue = 7.f;
|
configValues["animations:speed"].floatValue = 7.f;
|
||||||
|
|
|
@ -164,10 +164,12 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode) {
|
||||||
|
|
||||||
if (PWORKSPACE->m_bIsSpecialWorkspace) {
|
if (PWORKSPACE->m_bIsSpecialWorkspace) {
|
||||||
// if special, we adjust the coords a bit
|
// if special, we adjust the coords a bit
|
||||||
PWINDOW->m_vRealPosition = calcPos + (calcSize - calcSize * 0.8f) / 2.f;
|
static auto *const PSCALEFACTOR = &g_pConfigManager->getConfigValuePtr("dwindle:special_scale_factor")->floatValue;
|
||||||
PWINDOW->m_vRealSize = calcSize * 0.8f;
|
|
||||||
|
|
||||||
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 {
|
} else {
|
||||||
PWINDOW->m_vRealSize = calcSize;
|
PWINDOW->m_vRealSize = calcSize;
|
||||||
PWINDOW->m_vRealPosition = calcPos;
|
PWINDOW->m_vRealPosition = calcPos;
|
||||||
|
|
Loading…
Reference in a new issue