Re-implemented "View_setLayout"
... allowing to set absolute and relative values
This commit is contained in:
parent
2346f3734e
commit
9a539e10af
3 changed files with 13 additions and 14 deletions
|
@ -105,8 +105,9 @@ two log messages (`Manager_logViewWindowList` and
|
||||||
### Layout management
|
### Layout management
|
||||||
|
|
||||||
`#Tab::View_setLayout(-1)`
|
`#Tab::View_setLayout(-1)`
|
||||||
> Set the previously set layout. You may also use `View_setLayout(>)` for
|
> Set the previously set layout. You may also use `View_setLayout(0, +1)` for
|
||||||
setting the next layout in the layout array.
|
setting the next or `View_setLayout(0, -1)` for setting the previous layout in
|
||||||
|
the layout array.
|
||||||
|
|
||||||
`#f::View_setLayout(3)`
|
`#f::View_setLayout(3)`
|
||||||
> Set the 3<sup><small>rd</small></sup> defined layout (i. e. floating layout
|
> Set the 3<sup><small>rd</small></sup> defined layout (i. e. floating layout
|
||||||
|
|
|
@ -318,7 +318,7 @@ Bar_GuiContextMenu:
|
||||||
{
|
{
|
||||||
If Not (SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) = Manager_aMonitor)
|
If Not (SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) = Manager_aMonitor)
|
||||||
Manager_activateMonitor(SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) - Manager_aMonitor)
|
Manager_activateMonitor(SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) - Manager_aMonitor)
|
||||||
View_setLayout(">")
|
View_setLayout(0, +1)
|
||||||
}
|
}
|
||||||
Else If (SubStr(A_GuiControl, -4) = "_view")
|
Else If (SubStr(A_GuiControl, -4) = "_view")
|
||||||
{
|
{
|
||||||
|
|
20
src/View.ahk
20
src/View.ahk
|
@ -225,21 +225,19 @@ View_setGapWidth(d)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
View_setLayout(l)
|
View_setLayout(i, d = 0) {
|
||||||
{
|
|
||||||
Local v
|
Local v
|
||||||
|
|
||||||
v := Monitor_#%Manager_aMonitor%_aView_#1
|
v := Monitor_#%Manager_aMonitor%_aView_#1
|
||||||
If (l = -1)
|
If (i = -1)
|
||||||
l := View_#%Manager_aMonitor%_#%v%_layout_#2
|
i := View_#%Manager_aMonitor%_#%v%_layout_#2
|
||||||
If (l = ">")
|
Else If (i = 0)
|
||||||
l := Manager_loop(View_#%Manager_aMonitor%_#%v%_layout_#1, +1, 1, Config_layoutCount)
|
i := View_#%Manager_aMonitor%_#%v%_layout_#1
|
||||||
If (l > 0) And (l <= Config_layoutCount)
|
i := Manager_loop(i, d, 1, Config_layoutCount)
|
||||||
{
|
If (i > 0) And (i <= Config_layoutCount) {
|
||||||
If Not (l = View_#%Manager_aMonitor%_#%v%_layout_#1)
|
If Not (i = View_#%Manager_aMonitor%_#%v%_layout_#1) {
|
||||||
{
|
|
||||||
View_#%Manager_aMonitor%_#%v%_layout_#2 := View_#%Manager_aMonitor%_#%v%_layout_#1
|
View_#%Manager_aMonitor%_#%v%_layout_#2 := View_#%Manager_aMonitor%_#%v%_layout_#1
|
||||||
View_#%Manager_aMonitor%_#%v%_layout_#1 := l
|
View_#%Manager_aMonitor%_#%v%_layout_#1 := i
|
||||||
}
|
}
|
||||||
View_arrange(Manager_aMonitor, v, True)
|
View_arrange(Manager_aMonitor, v, True)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue