From 822a30eab5130585c70f1e92384a380d3951d25b Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Fri, 13 Dec 2024 00:09:41 +0000
Subject: [PATCH] deploy: 17e0c80c827a71f9a6a66079eaaae4dd289fecf9
---
catalog.json | 4 +-
changelogs/taskbar-labels.md | 6 +++
mods/taskbar-labels.wh.cpp | 78 +++++++++++++++++++++++++++---------
updates.atom | 30 +++++++-------
4 files changed, 84 insertions(+), 34 deletions(-)
diff --git a/catalog.json b/catalog.json
index cbdf17e3b..68fe0b87d 100644
--- a/catalog.json
+++ b/catalog.json
@@ -2888,7 +2888,7 @@
"published": 1661149953000,
"rating": 10,
"ratingUsers": 158,
- "updated": 1733320729000,
+ "updated": 1734048553000,
"users": 10725
},
"featured": true,
@@ -2906,7 +2906,7 @@
],
"name": "Taskbar Labels for Windows 11",
"twitter": "https://twitter.com/m417z",
- "version": "1.3.3"
+ "version": "1.3.4"
}
},
"taskbar-language-indicator-layout-control": {
diff --git a/changelogs/taskbar-labels.md b/changelogs/taskbar-labels.md
index 1fc4ebc25..0a73ac0db 100644
--- a/changelogs/taskbar-labels.md
+++ b/changelogs/taskbar-labels.md
@@ -1,3 +1,9 @@
+## 1.3.4 ([Dec 13, 2024](https://github.com/ramensoftware/windhawk-mods/blob/17e0c80c827a71f9a6a66079eaaae4dd289fecf9/mods/taskbar-labels.wh.cpp))
+
+* Fixed thumbnail labels incorrectly showing or not showing when using some modes.
+* Added an option to always show thumbnail labels. By default, thumbnail labels are shown on hover only if taskbar labels are hidden, but that might not be applied for all customizations that this mod offers.
+* Fixed restoring labels on mod unload.
+
## 1.3.3 ([Dec 4, 2024](https://github.com/ramensoftware/windhawk-mods/blob/b0179b2e31ee74e302077bfb2de1b7cdfc6092d7/mods/taskbar-labels.wh.cpp))
* The "Minimum taskbar item width" option can now be set to any value. Only 44 or larger values were previously supported.
diff --git a/mods/taskbar-labels.wh.cpp b/mods/taskbar-labels.wh.cpp
index 7df9655e9..de50da692 100644
--- a/mods/taskbar-labels.wh.cpp
+++ b/mods/taskbar-labels.wh.cpp
@@ -2,7 +2,7 @@
// @id taskbar-labels
// @name Taskbar Labels for Windows 11
// @description Customize text labels and combining for running programs on the taskbar (Windows 11 only)
-// @version 1.3.3
+// @version 1.3.4
// @author m417z
// @github https://github.com/m417z
// @twitter https://twitter.com/m417z
@@ -135,6 +135,12 @@ Labels can also be shown or hidden per-program in the settings.
$name: Left and right padding size
- spaceBetweenIconAndLabel: 8
$name: Space between icon and label
+- alwaysShowThumbnailLabels: false
+ $name: Always show thumbnail labels
+ $description: >-
+ By default, thumbnail labels are shown on hover only if taskbar labels are
+ hidden, but that might not be applied for all customizations that this mod
+ offers
- labelForSingleItem: "%name%"
$name: Label for a single item
$description: >-
@@ -212,6 +218,7 @@ struct {
int fontSize;
int leftAndRightPaddingSize;
int spaceBetweenIconAndLabel;
+ bool alwaysShowThumbnailLabels;
string_setting_unique_ptr labelForSingleItem;
string_setting_unique_ptr labelForMultipleItems;
} g_settings;
@@ -378,8 +385,6 @@ void RecalculateLabels() {
g_applyingSettings = false;
}
-void* TaskbarSettings_GroupingMode_Original;
-
using TaskListButton_get_IsRunning_t = HRESULT(WINAPI*)(void* pThis,
bool* running);
TaskListButton_get_IsRunning_t TaskListButton_get_IsRunning_Original;
@@ -1390,6 +1395,36 @@ void WINAPI TaskListButton_Icon_Hook(void* pThis, LONG_PTR randomAccessStream) {
}
}
+using TaskbarSettings_GroupingMode_t = DWORD(WINAPI*)(void* pThis);
+TaskbarSettings_GroupingMode_t TaskbarSettings_GroupingMode_Original;
+DWORD WINAPI TaskbarSettings_GroupingMode_Hook(void* pThis) {
+ Wh_Log(L">");
+
+ DWORD ret = TaskbarSettings_GroupingMode_Original(pThis);
+
+ if (!g_unloading) {
+ // 0 - Always
+ // 1 - When taskbar is full
+ // 2 - Never
+ if (g_settings.mode == Mode::noLabelsWithCombining ||
+ g_settings.mode == Mode::labelsWithCombining) {
+ ret = 0;
+ } else if (ret == 0) {
+ ret = 2;
+ }
+ }
+
+ if (g_overrideGroupingMode) {
+ if (ret == 0) {
+ ret = 2;
+ } else {
+ ret = 0;
+ }
+ }
+
+ return ret;
+}
+
using ITaskbarButton_get_MinScalableWidth_t = HRESULT(WINAPI*)(void* pThis,
float* minWidth);
ITaskbarButton_get_MinScalableWidth_t
@@ -1619,15 +1654,20 @@ LONG WINAPI RegGetValueW_Hook(HKEY hkey,
*pcbData == sizeof(DWORD)) {
Wh_Log(L">");
- DWORD taskbarGlomLevel = (ret = ERROR_SUCCESS) ? *(DWORD*)pvData : 0;
+ DWORD taskbarGlomLevel = (ret == ERROR_SUCCESS) ? *(DWORD*)pvData : 0;
DWORD taskbarGlomLevelOriginal = taskbarGlomLevel;
if (!g_unloading) {
- // 0 - Always
- // 1 - When taskbar is full
- // 2 - Never
- if (g_settings.mode == Mode::noLabelsWithCombining ||
- g_settings.mode == Mode::labelsWithCombining) {
+ // This value is used by native code for thumbnail titles and maybe
+ // other things. The value for WinUI code is overridden in
+ // TaskbarSettings_GroupingMode_Hook.
+ //
+ // 0 - Always (show thumb titles)
+ // 1 - When taskbar is full (hide thumb titles, adaptive)
+ // 2 - Never (hide thumb titles, adaptive)
+ if (g_settings.alwaysShowThumbnailLabels ||
+ g_settings.mode == Mode::noLabelsWithCombining ||
+ g_settings.mode == Mode::noLabelsWithoutCombining) {
taskbarGlomLevel = 0;
} else if (taskbarGlomLevel == 0) {
taskbarGlomLevel = 2;
@@ -1756,6 +1796,8 @@ void LoadSettings() {
Wh_GetIntSetting(L"leftAndRightPaddingSize");
g_settings.spaceBetweenIconAndLabel =
Wh_GetIntSetting(L"spaceBetweenIconAndLabel");
+ g_settings.alwaysShowThumbnailLabels =
+ Wh_GetIntSetting(L"alwaysShowThumbnailLabels");
g_settings.labelForSingleItem.reset(
Wh_GetStringSetting(L"labelForSingleItem"));
g_settings.labelForMultipleItems.reset(
@@ -2176,15 +2218,6 @@ bool HookTaskbarViewDllSymbols(HMODULE module) {
// Taskbar.View.dll, ExplorerExtensions.dll
SYMBOL_HOOK symbolHooks[] = //
{
- {
- {
- LR"(public: __cdecl winrt::impl::consume_WindowsUdk_UI_Shell_ITaskbarSettings5::GroupingMode(void)const )",
- LR"(public: __cdecl winrt::impl::consume_WindowsUdk_UI_Shell_ITaskbarSettings5::GroupingMode(void)const __ptr64)",
- },
- (void**)&TaskbarSettings_GroupingMode_Original,
- nullptr,
- true,
- },
{
{
LR"(public: virtual int __cdecl winrt::impl::produce::get_IsRunning(bool *))",
@@ -2232,6 +2265,15 @@ bool HookTaskbarViewDllSymbols(HMODULE module) {
(void**)&TaskListButton_Icon_Original,
(void*)TaskListButton_Icon_Hook,
},
+ {
+ {
+ LR"(public: __cdecl winrt::impl::consume_WindowsUdk_UI_Shell_ITaskbarSettings5::GroupingMode(void)const )",
+ LR"(public: __cdecl winrt::impl::consume_WindowsUdk_UI_Shell_ITaskbarSettings5::GroupingMode(void)const __ptr64)",
+ },
+ (void**)&TaskbarSettings_GroupingMode_Original,
+ (void*)TaskbarSettings_GroupingMode_Hook,
+ true,
+ },
{
{
LR"(public: virtual int __cdecl winrt::impl::produce::get_MinScalableWidth(float *))",
diff --git a/updates.atom b/updates.atom
index fb766e055..1dd4e491a 100644
--- a/updates.atom
+++ b/updates.atom
@@ -2,12 +2,27 @@
https://windhawk.net/Windhawk Mod Updates
- 2024-12-11T15:06:53.000Z
+ 2024-12-13T00:09:13.000Zhttps://github.com/jpmonette/feedUpdates in the official collection of Windhawk modshttps://windhawk.net/favicon.icoRamen Software
+
+
+ https://windhawk.net/mods/taskbar-labels#17e0c80c827a71f9a6a66079eaaae4dd289fecf9
+
+ 2024-12-13T00:09:13.000Z
+
+
Fixed thumbnail labels incorrectly showing or not showing when using some modes.
+
Added an option to always show thumbnail labels. By default, thumbnail labels are shown on hover only if taskbar labels are hidden, but that might not be applied for all customizations that this mod offers.
+
Fixed restoring labels on mod unload.
+]]>
+
+ m417z
+ https://github.com/m417z
+
+ https://windhawk.net/mods/remove-quotes-from-ctrl-shift-c#03e48ec11ead99e4fff7a66162d13dcd90dca4b7
@@ -300,17 +315,4 @@ center, etc. to another monitor.