Implemented setting mfact to an absolute value

This commit is contained in:
joten 2015-01-27 21:59:12 +01:00
parent f18dd93523
commit 2346f3734e
3 changed files with 20 additions and 17 deletions

View file

@ -122,17 +122,22 @@ the default configuration).
`#Left::View_setLayoutProperty("MFactor", 0, -0.05)` `#Left::View_setLayoutProperty("MFactor", 0, -0.05)`
> Reduce the size of the master area in the active view (only for the "tile" > Reduce the size of the master area in the active view (only for the "tile"
layout). You may also set a second parameter for accelerating the first one. layout). You may also set an additional parameter for accelerating the third
E. g. with `#Left::View_setLayoutProperty("MFactor", 0, -0.05, 2)` the first one. E. g. with `#Left::View_setLayoutProperty("MFactor", 0, -0.05, 2)` the
step, by which the master area is reduced, is -0.0016% and will be doubled with first step, by which the master area is reduced, is -0.0016% and will be
consecutive calls until it reaches -0.05%. doubled with consecutive calls until it reaches -0.05%.
With the second parameter you may set an absolute value, e. g.
'View_setLayoutProperty("MFactor", 0.5, 0)' splits the view in half.
`#Right::View_setLayoutProperty("MFactor", 0, +0.05)` `#Right::View_setLayoutProperty("MFactor", 0, +0.05)`
> Enlarge the size of the master area in the active view (only for the "tile" > Enlarge the size of the master area in the active view (only for the "tile"
layout). You may also set a second parameter for accelerating the first one. layout). You may also set a additional parameter for accelerating the third
E. g. with `#Right::View_setLayoutProperty("MFactor", 0, +0.05, 0.5)` the first one. E. g. with `#Right::View_setLayoutProperty("MFactor", 0, +0.05, 0.5)` the
step, by which the master area is reduced, is 0.05%, but with consecutive calls first step, by which the master area is reduced, is 0.05%, but with consecutive
it will be halved until it reaches 0.0016%. calls it will be halved until it reaches 0.0016%.
With the second parameter you may set an absolute value, e. g.
'View_setLayoutProperty("MFactor", 0.67, 0)' makes the master area two thirds
and the stacking area one third the size of the view.
`#^t::View_setLayoutProperty("Axis", 0, +1, 1)` `#^t::View_setLayoutProperty("Axis", 0, +1, 1)`
> Rotate the layout axis (i. e. 2 -> 1 = vertical layout, 1 -> 2 = horizontal > Rotate the layout axis (i. e. 2 -> 1 = vertical layout, 1 -> 2 = horizontal

View file

@ -216,16 +216,14 @@ Tiler_setAxis(m, v, id, d) {
Return, 0 Return, 0
} }
Tiler_setMFactor(m, v, d, dFact) { Tiler_setMFactor(m, v, i, d, dFact) {
Local mFact Local mFact
mFact := 0 If (i > 0)
If (d > 1) mFact := i
mFact := d Else
Else { mFact := View_#%m%_#%v%_layoutMFact
d := Tiler_getMFactorD(m, v, d, dFact) mFact += Tiler_getMFactorD(m, v, d, dFact)
mFact := View_#%m%_#%v%_layoutMFact + d
}
If (mFact > 0 And mFact < 1) { If (mFact > 0 And mFact < 1) {
View_#%m%_#%v%_layoutMFact := mFact View_#%m%_#%v%_layoutMFact := mFact
Return, 1 Return, 1

View file

@ -255,7 +255,7 @@ View_setLayoutProperty(name, i, d, opt = 0) {
Else If (name = "MFactor") { Else If (name = "MFactor") {
If (opt = 0) If (opt = 0)
opt := 1 opt := 1
a := Tiler_setMFactor(Manager_aMonitor, v, d, opt) a := Tiler_setMFactor(Manager_aMonitor, v, i, d, opt)
} Else If (name = "GapWidth") } Else If (name = "GapWidth")
View_setGapWidth(d) View_setGapWidth(d)
Else If (name = "MX") Else If (name = "MX")