make classic theme fixes and taskbar blending configurable
This commit is contained in:
parent
8ab973790c
commit
60a13162db
2 changed files with 28 additions and 18 deletions
12
src/Bar.ahk
12
src/Bar.ahk
|
@ -167,17 +167,22 @@ Bar_init(m) {
|
||||||
Bar_appBarData := ""
|
Bar_appBarData := ""
|
||||||
If (Config_verticalBarPos = "tray" And Monitor_#%m%_taskBarClass) {
|
If (Config_verticalBarPos = "tray" And Monitor_#%m%_taskBarClass) {
|
||||||
trayWndId := WinExist("ahk_class " Monitor_#%m%_taskBarClass)
|
trayWndId := WinExist("ahk_class " Monitor_#%m%_taskBarClass)
|
||||||
|
|
||||||
|
; FIXME: find a specific ReBarWindow32 named a certain thing instead of first one
|
||||||
ControlGet, ToolbarRoot, Hwnd, , ReBarWindow321, ahk_id %trayWndId%
|
ControlGet, ToolbarRoot, Hwnd, , ReBarWindow321, ahk_id %trayWndId%
|
||||||
ControlGet, Toolbar, Hwnd, , ToolbarWindow321, ahk_id %ToolbarRoot%
|
ControlGet, Toolbar, Hwnd, , ToolbarWindow321, ahk_id %ToolbarRoot%
|
||||||
DllCall("SetParent", "UInt", wndId, "UInt", Toolbar)
|
DllCall("SetParent", "UInt", wndId, "UInt", Toolbar)
|
||||||
;Gui, Color, 000000, %wndTitle%
|
If (Config_barTaskbarBlend)
|
||||||
|
Gui, Color, 000000, %wndTitle%
|
||||||
|
|
||||||
|
If (Config_classicThemeFixes) {
|
||||||
WinSet, Style, -0x40000, ahk_id %trayWndId% ; WS_THICKFRAME
|
WinSet, Style, -0x40000, ahk_id %trayWndId% ; WS_THICKFRAME
|
||||||
WinSet, Style, +0x80, ahk_id %trayWndId% ; DS_MODALFRAME
|
WinSet, Style, +0x80, ahk_id %trayWndId% ; DS_MODALFRAME
|
||||||
WinSet, Style, +0x0004, ahk_id %trayWndId% ; DS_3DLOOK
|
WinSet, Style, +0x0004, ahk_id %trayWndId% ; DS_3DLOOK
|
||||||
|
|
||||||
WinSet, ExStyle, +0x1, ahk_id %trayWndId% ; WS_EX_DLGMODALFRAME
|
WinSet, ExStyle, +0x1, ahk_id %trayWndId% ; WS_EX_DLGMODALFRAME
|
||||||
WinSet, ExStyle, +0x20000, ahk_id %trayWndId% ; WS_EX_STATICEDGE
|
WinSet, ExStyle, +0x20000, ahk_id %trayWndId% ; WS_EX_STATICEDGE
|
||||||
|
}
|
||||||
} Else {
|
} Else {
|
||||||
appBarMsg := DllCall("RegisterWindowMessage", Str, "AppBarMsg")
|
appBarMsg := DllCall("RegisterWindowMessage", Str, "AppBarMsg")
|
||||||
|
|
||||||
|
@ -305,10 +310,12 @@ Bar_getHeight()
|
||||||
If Not Config_singleRowBar
|
If Not Config_singleRowBar
|
||||||
Bar_ctrlHeight := Bar_height / 2
|
Bar_ctrlHeight := Bar_height / 2
|
||||||
|
|
||||||
|
If (Config_classicThemeFixes) {
|
||||||
Bar_height := 22
|
Bar_height := 22
|
||||||
Bar_ctrlHeight := 22
|
Bar_ctrlHeight := 22
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Bar_getTextWidth(x, reverse=False)
|
Bar_getTextWidth(x, reverse=False)
|
||||||
{
|
{
|
||||||
|
@ -725,7 +732,8 @@ Bar_updateStatus() {
|
||||||
statusWidth -= Config_barItemSpacing
|
statusWidth -= Config_barItemSpacing
|
||||||
}
|
}
|
||||||
|
|
||||||
If (Config_verticalBarPos = "tray" And Monitor_#%m%_taskBarClass) {
|
; set this in update loop because OpenShell likes to revert it when you change settings
|
||||||
|
If (Config_verticalBarPos = "tray" And Monitor_#%m%_taskBarClass And Config_classicThemeFixes) {
|
||||||
trayWndId := WinExist("ahk_class " Monitor_#%m%_taskBarClass)
|
trayWndId := WinExist("ahk_class " Monitor_#%m%_taskBarClass)
|
||||||
WinSet, Style, -0x40000, ahk_id %trayWndId% ; WS_THICKFRAME
|
WinSet, Style, -0x40000, ahk_id %trayWndId% ; WS_THICKFRAME
|
||||||
WinSet, Style, +0x80, ahk_id %trayWndId% ; DS_MODALFRAME
|
WinSet, Style, +0x80, ahk_id %trayWndId% ; DS_MODALFRAME
|
||||||
|
|
|
@ -33,6 +33,7 @@ Config_init() {
|
||||||
}
|
}
|
||||||
Config_barTransparency := "off"
|
Config_barTransparency := "off"
|
||||||
Config_barCommands := "Run, explore " Main_docDir ";Monitor_toggleBar();Reload;ExitApp"
|
Config_barCommands := "Run, explore " Main_docDir ";Monitor_toggleBar();Reload;ExitApp"
|
||||||
|
Config_barTaskbarBlend := False
|
||||||
Config_readinBat := False
|
Config_readinBat := False
|
||||||
Config_readinCpu := False
|
Config_readinCpu := False
|
||||||
Config_readinDate := True
|
Config_readinDate := True
|
||||||
|
@ -59,6 +60,7 @@ Config_init() {
|
||||||
Config_scalingFactor := 1 ;; Undocumented. The value is retrieved by `Config_getSystemSettings()` from the registry.
|
Config_scalingFactor := 1 ;; Undocumented. The value is retrieved by `Config_getSystemSettings()` from the registry.
|
||||||
;; It should not be set manually by the user,
|
;; It should not be set manually by the user,
|
||||||
;; but is dependant on the setting in the `Display control panel` of Windows under `Appearance and Personalization`.
|
;; but is dependant on the setting in the `Display control panel` of Windows under `Appearance and Personalization`.
|
||||||
|
Config_classicThemeFixes := False
|
||||||
|
|
||||||
;; Window arrangement
|
;; Window arrangement
|
||||||
Config_viewNames := "1;2;3;4;5;6;7;8;9"
|
Config_viewNames := "1;2;3;4;5;6;7;8;9"
|
||||||
|
|
Loading…
Reference in a new issue