make classic theme fixes and taskbar blending configurable

This commit is contained in:
Cynthia Foxwell 2023-03-01 21:15:46 -07:00
parent 8ab973790c
commit 60a13162db
2 changed files with 28 additions and 18 deletions

View file

@ -167,17 +167,22 @@ Bar_init(m) {
Bar_appBarData := ""
If (Config_verticalBarPos = "tray" And 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, Toolbar, Hwnd, , ToolbarWindow321, ahk_id %ToolbarRoot%
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, +0x80, ahk_id %trayWndId% ; DS_MODALFRAME
WinSet, Style, +0x0004, ahk_id %trayWndId% ; DS_3DLOOK
WinSet, ExStyle, +0x1, ahk_id %trayWndId% ; WS_EX_DLGMODALFRAME
WinSet, ExStyle, +0x20000, ahk_id %trayWndId% ; WS_EX_STATICEDGE
}
} Else {
appBarMsg := DllCall("RegisterWindowMessage", Str, "AppBarMsg")
@ -305,9 +310,11 @@ Bar_getHeight()
If Not Config_singleRowBar
Bar_ctrlHeight := Bar_height / 2
If (Config_classicThemeFixes) {
Bar_height := 22
Bar_ctrlHeight := 22
}
}
}
Bar_getTextWidth(x, reverse=False)
@ -725,7 +732,8 @@ Bar_updateStatus() {
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)
WinSet, Style, -0x40000, ahk_id %trayWndId% ; WS_THICKFRAME
WinSet, Style, +0x80, ahk_id %trayWndId% ; DS_MODALFRAME

View file

@ -33,6 +33,7 @@ Config_init() {
}
Config_barTransparency := "off"
Config_barCommands := "Run, explore " Main_docDir ";Monitor_toggleBar();Reload;ExitApp"
Config_barTaskbarBlend := False
Config_readinBat := False
Config_readinCpu := False
Config_readinDate := True
@ -59,6 +60,7 @@ Config_init() {
Config_scalingFactor := 1 ;; Undocumented. The value is retrieved by `Config_getSystemSettings()` from the registry.
;; 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`.
Config_classicThemeFixes := False
;; Window arrangement
Config_viewNames := "1;2;3;4;5;6;7;8;9"