mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 09:00:27 +00:00
[EXPLORER] Add Show Desktop button to taskbar customization preview (#7727)
Use a 4D lookup table for the notification area settings preview, instead of many if cases. CORE-19738
This commit is contained in:
parent
afb96acfdd
commit
6988b4e2c4
9 changed files with 51 additions and 26 deletions
|
@ -49,15 +49,21 @@ IDB_TASKBARPROP_LOCK_GROUP_NOQL BITMAP "res/bmp/150.bmp"
|
||||||
IDB_TASKBARPROP_NOLOCK_GROUP_NOQL BITMAP "res/bmp/151.bmp"
|
IDB_TASKBARPROP_NOLOCK_GROUP_NOQL BITMAP "res/bmp/151.bmp"
|
||||||
IDB_TASKBARPROP_LOCK_NOGROUP_NOQL BITMAP "res/bmp/152.bmp"
|
IDB_TASKBARPROP_LOCK_NOGROUP_NOQL BITMAP "res/bmp/152.bmp"
|
||||||
IDB_TASKBARPROP_NOLOCK_NOGROUP_NOQL BITMAP "res/bmp/153.bmp"
|
IDB_TASKBARPROP_NOLOCK_NOGROUP_NOQL BITMAP "res/bmp/153.bmp"
|
||||||
IDB_SYSTRAYPROP_SHOW_SECONDS BITMAP "res/bmp/154.bmp"
|
IDB_SYSTRAYPROP_SHOW_SECONDS_NODESK BITMAP "res/bmp/154.bmp"
|
||||||
IDB_SYSTRAYPROP_HIDE_SECONDS BITMAP "res/bmp/155.bmp"
|
IDB_SYSTRAYPROP_HIDE_SECONDS_NODESK BITMAP "res/bmp/155.bmp"
|
||||||
IDB_STARTMENU BITMAP "res/bmp/158.bmp"
|
IDB_STARTMENU BITMAP "res/bmp/158.bmp"
|
||||||
IDB_STARTPREVIEW BITMAP "res/bmp/170.bmp"
|
IDB_STARTPREVIEW BITMAP "res/bmp/170.bmp"
|
||||||
IDB_STARTPREVIEW_CLASSIC BITMAP "res/bmp/171.bmp"
|
IDB_STARTPREVIEW_CLASSIC BITMAP "res/bmp/171.bmp"
|
||||||
IDB_SYSTRAYPROP_HIDE_CLOCK BITMAP "res/bmp/180.bmp"
|
IDB_SYSTRAYPROP_HIDE_CLOCK_NODESK BITMAP "res/bmp/180.bmp"
|
||||||
IDB_SYSTRAYPROP_HIDE_NOCLOCK BITMAP "res/bmp/181.bmp"
|
IDB_SYSTRAYPROP_HIDE_NOCLOCK_NODESK BITMAP "res/bmp/181.bmp"
|
||||||
IDB_SYSTRAYPROP_SHOW_CLOCK BITMAP "res/bmp/182.bmp"
|
IDB_SYSTRAYPROP_SHOW_CLOCK_NODESK BITMAP "res/bmp/182.bmp"
|
||||||
IDB_SYSTRAYPROP_SHOW_NOCLOCK BITMAP "res/bmp/183.bmp"
|
IDB_SYSTRAYPROP_SHOW_NOCLOCK_NODESK BITMAP "res/bmp/183.bmp"
|
||||||
|
IDB_SYSTRAYPROP_SHOW_SECONDS_DESK BITMAP "res/bmp/184.bmp"
|
||||||
|
IDB_SYSTRAYPROP_HIDE_SECONDS_DESK BITMAP "res/bmp/185.bmp"
|
||||||
|
IDB_SYSTRAYPROP_HIDE_CLOCK_DESK BITMAP "res/bmp/186.bmp"
|
||||||
|
IDB_SYSTRAYPROP_HIDE_NOCLOCK_DESK BITMAP "res/bmp/187.bmp"
|
||||||
|
IDB_SYSTRAYPROP_SHOW_CLOCK_DESK BITMAP "res/bmp/188.bmp"
|
||||||
|
IDB_SYSTRAYPROP_SHOW_NOCLOCK_DESK BITMAP "res/bmp/189.bmp"
|
||||||
|
|
||||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "explorer.exe.manifest"
|
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "explorer.exe.manifest"
|
||||||
|
|
||||||
|
|
BIN
base/shell/explorer/res/bmp/184.bmp
Normal file
BIN
base/shell/explorer/res/bmp/184.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
base/shell/explorer/res/bmp/185.bmp
Normal file
BIN
base/shell/explorer/res/bmp/185.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
base/shell/explorer/res/bmp/186.bmp
Normal file
BIN
base/shell/explorer/res/bmp/186.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
base/shell/explorer/res/bmp/187.bmp
Normal file
BIN
base/shell/explorer/res/bmp/187.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
base/shell/explorer/res/bmp/188.bmp
Normal file
BIN
base/shell/explorer/res/bmp/188.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
base/shell/explorer/res/bmp/189.bmp
Normal file
BIN
base/shell/explorer/res/bmp/189.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -39,15 +39,21 @@
|
||||||
#define IDB_TASKBARPROP_NOLOCK_GROUP_NOQL 151
|
#define IDB_TASKBARPROP_NOLOCK_GROUP_NOQL 151
|
||||||
#define IDB_TASKBARPROP_LOCK_NOGROUP_NOQL 152
|
#define IDB_TASKBARPROP_LOCK_NOGROUP_NOQL 152
|
||||||
#define IDB_TASKBARPROP_NOLOCK_NOGROUP_NOQL 153
|
#define IDB_TASKBARPROP_NOLOCK_NOGROUP_NOQL 153
|
||||||
#define IDB_SYSTRAYPROP_SHOW_SECONDS 154
|
#define IDB_SYSTRAYPROP_SHOW_SECONDS_NODESK 154
|
||||||
#define IDB_SYSTRAYPROP_HIDE_SECONDS 155
|
#define IDB_SYSTRAYPROP_HIDE_SECONDS_NODESK 155
|
||||||
#define IDB_STARTMENU 158
|
#define IDB_STARTMENU 158
|
||||||
#define IDB_STARTPREVIEW 170
|
#define IDB_STARTPREVIEW 170
|
||||||
#define IDB_STARTPREVIEW_CLASSIC 171
|
#define IDB_STARTPREVIEW_CLASSIC 171
|
||||||
#define IDB_SYSTRAYPROP_HIDE_CLOCK 180
|
#define IDB_SYSTRAYPROP_HIDE_CLOCK_NODESK 180
|
||||||
#define IDB_SYSTRAYPROP_HIDE_NOCLOCK 181
|
#define IDB_SYSTRAYPROP_HIDE_NOCLOCK_NODESK 181
|
||||||
#define IDB_SYSTRAYPROP_SHOW_CLOCK 182
|
#define IDB_SYSTRAYPROP_SHOW_CLOCK_NODESK 182
|
||||||
#define IDB_SYSTRAYPROP_SHOW_NOCLOCK 183
|
#define IDB_SYSTRAYPROP_SHOW_NOCLOCK_NODESK 183
|
||||||
|
#define IDB_SYSTRAYPROP_SHOW_SECONDS_DESK 184
|
||||||
|
#define IDB_SYSTRAYPROP_HIDE_SECONDS_DESK 185
|
||||||
|
#define IDB_SYSTRAYPROP_HIDE_CLOCK_DESK 186
|
||||||
|
#define IDB_SYSTRAYPROP_HIDE_NOCLOCK_DESK 187
|
||||||
|
#define IDB_SYSTRAYPROP_SHOW_CLOCK_DESK 188
|
||||||
|
#define IDB_SYSTRAYPROP_SHOW_NOCLOCK_DESK 189
|
||||||
|
|
||||||
/*******************************************************************************\
|
/*******************************************************************************\
|
||||||
|* Menu Resources *|
|
|* Menu Resources *|
|
||||||
|
|
|
@ -230,13 +230,14 @@ class CNotifySettingsPage : public CPropertyPageImpl<CNotifySettingsPage>
|
||||||
private:
|
private:
|
||||||
HBITMAP m_hbmpTray;
|
HBITMAP m_hbmpTray;
|
||||||
HWND m_hwndTaskbar;
|
HWND m_hwndTaskbar;
|
||||||
|
static const WORD wImageIdLookupTable[2][2][2][2];
|
||||||
|
|
||||||
void _UpdateDialog()
|
void _UpdateDialog()
|
||||||
{
|
{
|
||||||
BOOL bShowClock = IsDlgButtonChecked(IDC_TASKBARPROP_CLOCK);
|
BOOL bShowClock = IsDlgButtonChecked(IDC_TASKBARPROP_CLOCK);
|
||||||
BOOL bShowSeconds = IsDlgButtonChecked(IDC_TASKBARPROP_SECONDS);
|
BOOL bShowSeconds = IsDlgButtonChecked(IDC_TASKBARPROP_SECONDS);
|
||||||
BOOL bHideInactive = IsDlgButtonChecked(IDC_TASKBARPROP_HIDEICONS);
|
BOOL bHideInactive = IsDlgButtonChecked(IDC_TASKBARPROP_HIDEICONS);
|
||||||
UINT uImageId;
|
BOOL bShowDesktopButton = IsDlgButtonChecked(IDC_TASKBARPROP_DESKTOP);
|
||||||
|
|
||||||
HWND hwndCustomizeNotifyButton = GetDlgItem(IDC_TASKBARPROP_ICONCUST);
|
HWND hwndCustomizeNotifyButton = GetDlgItem(IDC_TASKBARPROP_ICONCUST);
|
||||||
HWND hwndSeconds = GetDlgItem(IDC_TASKBARPROP_SECONDS);
|
HWND hwndSeconds = GetDlgItem(IDC_TASKBARPROP_SECONDS);
|
||||||
|
@ -246,19 +247,7 @@ private:
|
||||||
::EnableWindow(hwndSeconds, bShowClock);
|
::EnableWindow(hwndSeconds, bShowClock);
|
||||||
if (!bShowSeconds)
|
if (!bShowSeconds)
|
||||||
CheckDlgButton(IDC_TASKBARPROP_SECONDS, BST_UNCHECKED);
|
CheckDlgButton(IDC_TASKBARPROP_SECONDS, BST_UNCHECKED);
|
||||||
|
UINT uImageId = wImageIdLookupTable[bShowClock][bShowSeconds][bHideInactive][bShowDesktopButton];
|
||||||
if (bHideInactive && bShowClock && bShowSeconds)
|
|
||||||
uImageId = IDB_SYSTRAYPROP_HIDE_SECONDS;
|
|
||||||
else if (bHideInactive && bShowClock && !bShowSeconds)
|
|
||||||
uImageId = IDB_SYSTRAYPROP_HIDE_CLOCK;
|
|
||||||
else if (bHideInactive && !bShowClock)
|
|
||||||
uImageId = IDB_SYSTRAYPROP_HIDE_NOCLOCK;
|
|
||||||
else if (!bHideInactive && bShowClock && bShowSeconds)
|
|
||||||
uImageId = IDB_SYSTRAYPROP_SHOW_SECONDS;
|
|
||||||
else if (!bHideInactive && bShowClock && !bShowSeconds)
|
|
||||||
uImageId = IDB_SYSTRAYPROP_SHOW_CLOCK;
|
|
||||||
else if (!bHideInactive && !bShowClock)
|
|
||||||
uImageId = IDB_SYSTRAYPROP_SHOW_NOCLOCK;
|
|
||||||
|
|
||||||
SetBitmap(hwndTrayBitmap, &m_hbmpTray, uImageId);
|
SetBitmap(hwndTrayBitmap, &m_hbmpTray, uImageId);
|
||||||
}
|
}
|
||||||
|
@ -324,6 +313,30 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const WORD CNotifySettingsPage::wImageIdLookupTable[2][2][2][2] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{IDB_SYSTRAYPROP_SHOW_NOCLOCK_NODESK, IDB_SYSTRAYPROP_SHOW_NOCLOCK_DESK},
|
||||||
|
{IDB_SYSTRAYPROP_HIDE_NOCLOCK_NODESK, IDB_SYSTRAYPROP_HIDE_NOCLOCK_DESK}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{IDB_SYSTRAYPROP_SHOW_NOCLOCK_NODESK, IDB_SYSTRAYPROP_SHOW_NOCLOCK_DESK},
|
||||||
|
{IDB_SYSTRAYPROP_HIDE_NOCLOCK_NODESK, IDB_SYSTRAYPROP_HIDE_NOCLOCK_DESK}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{IDB_SYSTRAYPROP_SHOW_CLOCK_NODESK, IDB_SYSTRAYPROP_SHOW_CLOCK_DESK},
|
||||||
|
{IDB_SYSTRAYPROP_HIDE_CLOCK_NODESK, IDB_SYSTRAYPROP_HIDE_CLOCK_DESK}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{IDB_SYSTRAYPROP_SHOW_SECONDS_NODESK, IDB_SYSTRAYPROP_SHOW_SECONDS_DESK},
|
||||||
|
{IDB_SYSTRAYPROP_HIDE_SECONDS_NODESK, IDB_SYSTRAYPROP_HIDE_SECONDS_DESK}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
static int CALLBACK
|
static int CALLBACK
|
||||||
PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
|
PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue