[EXPLORER] Add tooltip for show desktop button (#7483)

CORE-15369
This commit is contained in:
Thamatip Chitpong 2024-11-01 01:09:22 +07:00 committed by GitHub
parent 9cca5bf4b0
commit 898cc5663d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
35 changed files with 47 additions and 0 deletions

View File

@ -216,4 +216,5 @@ BEGIN
IDS_RESTORE_ALL "&Покажи отворените прозорци"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -216,4 +216,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -219,4 +219,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -219,4 +219,5 @@ BEGIN
IDS_RESTORE_ALL "&Mostrar ventanas abiertas"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "E&rakutsi irekitako leihoak"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -216,4 +216,5 @@ BEGIN
IDS_RESTORE_ALL "&Afficher les fenêtres ouvertes"
IDS_TRAYWND_UNDO_CASCADE "Ann&uler cascade"
IDS_TRAYWND_UNDO_TILE "Ann&uler mosaïque"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "खुले हुऐ विंडोज &दिखाएं"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "&Megnyitott ablakok megjelenítése"
IDS_TRAYWND_UNDO_CASCADE "Lépcsőzetes elre&ndezés visszavonása"
IDS_TRAYWND_UNDO_TILE "Mozaik elre&ndezés visszavonása"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -216,4 +216,5 @@ BEGIN
IDS_RESTORE_ALL "&Tampilkan Semua Jendela"
IDS_TRAYWND_UNDO_CASCADE "&Urungkan Tumpukan"
IDS_TRAYWND_UNDO_TILE "U&rungkan Ubin"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -216,4 +216,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -217,4 +217,5 @@ BEGIN
IDS_RESTORE_ALL "開いているウィンドウを表示(&S)"
IDS_TRAYWND_UNDO_CASCADE "「重ねて表示」を元に戻す(&U)"
IDS_TRAYWND_UNDO_TILE "「ウィンドウを並べて表示」を元に戻す(&U)"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -216,4 +216,5 @@ BEGIN
IDS_RESTORE_ALL "열린 창 보기(&S)"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -216,4 +216,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -218,4 +218,5 @@ BEGIN
IDS_RESTORE_ALL "&Pokaż otwarte okna"
IDS_TRAYWND_UNDO_CASCADE "&Cofnij kaskadowe ułożenie okien"
IDS_TRAYWND_UNDO_TILE "&Cofnij sąsiadujące ułożenie okien"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -216,4 +216,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -217,4 +217,5 @@ BEGIN
IDS_RESTORE_ALL "&Mostrar janelas abertas"
IDS_TRAYWND_UNDO_CASCADE "Desfazer &cascata"
IDS_TRAYWND_UNDO_TILE "Desfazer &lado a lado"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -216,4 +216,5 @@ BEGIN
IDS_RESTORE_ALL "&Afișare ferestre deschise"
IDS_TRAYWND_UNDO_CASCADE "Anulare cascadă"
IDS_TRAYWND_UNDO_TILE "An&ulare aranjare"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -219,4 +219,5 @@ BEGIN
IDS_RESTORE_ALL "&Показать окна"
IDS_TRAYWND_UNDO_CASCADE "&Отменить Каскадом"
IDS_TRAYWND_UNDO_TILE "&Отменить Окна рядом"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -215,4 +215,5 @@ BEGIN
IDS_RESTORE_ALL "&Show Open Windows"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -217,4 +217,5 @@ BEGIN
IDS_RESTORE_ALL "&Açık Pencereleri Göster"
IDS_TRAYWND_UNDO_CASCADE "&Kademeyi Geri Al"
IDS_TRAYWND_UNDO_TILE "&Döşemeyi Geri Al"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -219,4 +219,5 @@ BEGIN
IDS_RESTORE_ALL "&Показати відкриті вікна"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -217,4 +217,5 @@ BEGIN
IDS_RESTORE_ALL "显示打开的窗口(&S)"
IDS_TRAYWND_UNDO_CASCADE "撤销层叠(&U)"
IDS_TRAYWND_UNDO_TILE "撤销平铺(&U)"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -216,4 +216,5 @@ BEGIN
IDS_RESTORE_ALL "顯示開啟的視窗(&S)"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -217,4 +217,5 @@ BEGIN
IDS_RESTORE_ALL "顯示開啟的視窗(&S)"
IDS_TRAYWND_UNDO_CASCADE "&Undo Cascade"
IDS_TRAYWND_UNDO_TILE "&Undo Tile"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END

View File

@ -105,6 +105,7 @@
#define IDS_RESTORE_ALL 811
#define IDS_TRAYWND_UNDO_CASCADE 812
#define IDS_TRAYWND_UNDO_TILE 813
#define IDS_TRAYDESKBTN_TOOLTIP 814
/* These values must be synchronized with shell32 */
#define IDS_ADVANCED_DISPLAY_FAVORITES 30466

View File

@ -76,6 +76,19 @@ HRESULT CTrayShowDesktopButton::DoCreate(HWND hwndParent)
m_szIcon.cx = GetSystemMetrics(SM_CXSMICON);
m_szIcon.cy = GetSystemMetrics(SM_CYSMICON);
// Create tooltip
m_tooltip.Create(m_hWnd, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP);
TOOLINFOW ti = { 0 };
ti.cbSize = TTTOOLINFOW_V1_SIZE;
ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
ti.hwnd = m_hWnd;
ti.uId = reinterpret_cast<UINT_PTR>(m_hWnd);
ti.hinst = hExplorerInstance;
ti.lpszText = MAKEINTRESOURCEW(IDS_TRAYDESKBTN_TOOLTIP);
m_tooltip.AddTool(&ti);
// Prep visual style
EnsureWindowTheme(TRUE);

View File

@ -28,6 +28,7 @@ class CTrayShowDesktopButton :
BOOL m_drawWithDedicatedBackground;
BOOL m_bHovering;
HWND m_hWndTaskbar;
CTooltips m_tooltip;
public:
BOOL m_bPressed;