diff --git a/src/Bar.ahk b/src/Bar.ahk index a271671..9ff2df7 100644 --- a/src/Bar.ahk +++ b/src/Bar.ahk @@ -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% - WinSet, Style, -0x40000, ahk_id %trayWndId% ; WS_THICKFRAME - WinSet, Style, +0x80, ahk_id %trayWndId% ; DS_MODALFRAME - WinSet, Style, +0x0004, ahk_id %trayWndId% ; DS_3DLOOK + 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 + 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,8 +310,10 @@ Bar_getHeight() If Not Config_singleRowBar Bar_ctrlHeight := Bar_height / 2 - Bar_height := 22 - Bar_ctrlHeight := 22 + If (Config_classicThemeFixes) { + Bar_height := 22 + Bar_ctrlHeight := 22 + } } } @@ -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 diff --git a/src/Config.ahk b/src/Config.ahk index 875e114..141dbe4 100644 --- a/src/Config.ahk +++ b/src/Config.ahk @@ -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 @@ -50,15 +51,16 @@ Config_init() { Config_iconFontYOffset := 3 ;; Windows ui elements - Config_bbCompatibility := False - Config_borderWidth := 0 - Config_borderPadding := -1 - Config_showTaskBar := False - Config_showBorder := True - Config_selBorderColor := "" - 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_bbCompatibility := False + Config_borderWidth := 0 + Config_borderPadding := -1 + Config_showTaskBar := False + Config_showBorder := True + Config_selBorderColor := "" + 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"