Skip to content

Commit

Permalink
[EXPLORER] Add tooltip for show desktop button (reactos#7483)
Browse files Browse the repository at this point in the history
CORE-15369
  • Loading branch information
TAN-Gaming authored Oct 31, 2024
1 parent 9cca5bf commit 898cc56
Show file tree
Hide file tree
Showing 35 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/shell/explorer/lang/bg-BG.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/cs-CZ.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/de-DE.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/en-US.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/es-ES.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/et-EE.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/eu-ES.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/fi-FI.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/fr-FR.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/he-IL.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/hi-IN.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/hu-HU.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/id-ID.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/it-IT.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/ja-JP.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/ko-KR.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/lt-LT.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/ms-MY.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/nl-NL.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/no-NO.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/pl-PL.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/pt-BR.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/pt-PT.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/ro-RO.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/ru-RU.rc
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,5 @@ BEGIN
IDS_RESTORE_ALL "&Показать окна"
IDS_TRAYWND_UNDO_CASCADE "&Отменить Каскадом"
IDS_TRAYWND_UNDO_TILE "&Отменить Окна рядом"
IDS_TRAYDESKBTN_TOOLTIP "Show Desktop/Windows"
END
1 change: 1 addition & 0 deletions base/shell/explorer/lang/sk-SK.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/sq-AL.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/tr-TR.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/uk-UA.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/zh-CN.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/zh-HK.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/lang/zh-TW.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions base/shell/explorer/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions base/shell/explorer/traydeskbtn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions base/shell/explorer/traydeskbtn.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CTrayShowDesktopButton :
BOOL m_drawWithDedicatedBackground;
BOOL m_bHovering;
HWND m_hWndTaskbar;
CTooltips m_tooltip;

public:
BOOL m_bPressed;
Expand Down

0 comments on commit 898cc56

Please sign in to comment.