Revised Bar_toggleCommandGui() ...
... fixing positioning issues with more than one monitor possibly fixing issue #41
This commit is contained in:
parent
80b6b8163c
commit
4cde06aae5
1 changed files with 11 additions and 9 deletions
18
src/Bar.ahk
18
src/Bar.ahk
|
@ -335,25 +335,27 @@ Bar_move(m)
|
|||
WinMove, %wndTitle%, , %x%, %y%
|
||||
}
|
||||
|
||||
Bar_toggleCommandGui()
|
||||
{
|
||||
Bar_toggleCommandGui() {
|
||||
Local wndId, x, y
|
||||
|
||||
Gui, 99: Default
|
||||
If Bar_cmdGuiIsVisible
|
||||
{
|
||||
If Bar_cmdGuiIsVisible {
|
||||
Bar_cmdGuiIsVisible := False
|
||||
Gui, Cancel
|
||||
Manager_winActivate(Bar_aWndId)
|
||||
}
|
||||
Else
|
||||
{
|
||||
} Else {
|
||||
Bar_cmdGuiIsVisible := True
|
||||
|
||||
If (Config_verticalBarPos = "tray")
|
||||
x := Monitor_#%Manager_aMonitor%_x + Monitor_#%Manager_aMonitor%_barX + Monitor_#%Manager_aMonitor%_barWidth - Bar_#0_#0W
|
||||
If (Config_verticalBarPos = "top") Or (Config_verticalBarPos = "tray") And (Monitor_%Manager_aMonitor%_taskBarPos = "top" Or Not Monitor_#%Manager_aMonitor%_taskBarClass)
|
||||
Else
|
||||
x := Monitor_#%Manager_aMonitor%_barX + Monitor_#%Manager_aMonitor%_barWidth - Bar_#0_#0W ;; x := mX + (mBarX - mX) + mBarW - w
|
||||
|
||||
If (Config_verticalBarPos = "top") Or (Config_verticalBarPos = "tray") And (Monitor_#%Manager_aMonitor%_taskBarPos = "top" Or Not Monitor_#%Manager_aMonitor%_taskBarClass)
|
||||
y := Monitor_#%Manager_aMonitor%_y
|
||||
Else
|
||||
y := Monitor_#%Manager_aMonitor%_y + Monitor_#%Manager_aMonitor%_height - Bar_#0_#0H
|
||||
|
||||
Gui, Show
|
||||
WinGet, wndId, ID, bug.n_BAR_0
|
||||
WinMove, ahk_id %wndId%, , %x%, %y%
|
||||
|
|
Loading…
Reference in a new issue