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)`
> 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.
E. g. with `#Left::View_setLayoutProperty("MFactor", 0, -0.05, 2)` the first
step, by which the master area is reduced, is -0.0016% and will be doubled with
consecutive calls until it reaches -0.05%.
layout). You may also set an additional parameter for accelerating the third
one. E. g. with `#Left::View_setLayoutProperty("MFactor", 0, -0.05, 2)` the
first step, by which the master area is reduced, is -0.0016% and will be
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)`
> 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.
E. g. with `#Right::View_setLayoutProperty("MFactor", 0, +0.05, 0.5)` the first
step, by which the master area is reduced, is 0.05%, but with consecutive calls
it will be halved until it reaches 0.0016%.
layout). You may also set a additional parameter for accelerating the third
one. E. g. with `#Right::View_setLayoutProperty("MFactor", 0, +0.05, 0.5)` the
first step, by which the master area is reduced, is 0.05%, but with consecutive
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)`
> 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
}
Tiler_setMFactor(m, v, d, dFact) {
Tiler_setMFactor(m, v, i, d, dFact) {
Local mFact
mFact := 0
If (d > 1)
mFact := d
Else {
d := Tiler_getMFactorD(m, v, d, dFact)
mFact := View_#%m%_#%v%_layoutMFact + d
}
If (i > 0)
mFact := i
Else
mFact := View_#%m%_#%v%_layoutMFact
mFact += Tiler_getMFactorD(m, v, d, dFact)
If (mFact > 0 And mFact < 1) {
View_#%m%_#%v%_layoutMFact := mFact
Return, 1

View file

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