Skip to content

Commit efe1f64

Browse files
committed
reverted unintentional whitespace changes, and allowed offset to be used regardless of operating system
1 parent 6397cce commit efe1f64

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

Src/StartMenu/StartMenuDLL/SettingsUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5193,7 +5193,7 @@ static void UpdateButtons( bool bForce )
51935193
}
51945194
if (path==START_BUTTON_CUSTOM)
51955195
path=CalcFNVHash(GetSettingString(L"StartButtonPath"));
5196-
bool bRecreate = (g_bButtonEnable != GetSettingBool(L"EnableStartButton") || path != g_ButtonPath || g_ButtonSize != GetSettingInt(L"StartButtonSize") || g_ButtonOffset != GetSettingInt(L"StartButtonOffset")
5196+
bool bRecreate=(g_bButtonEnable!=GetSettingBool(L"EnableStartButton") || path!=g_ButtonPath || g_ButtonSize!=GetSettingInt(L"StartButtonSize") || g_ButtonOffset!=GetSettingInt(L"StartButtonOffset")
51975197
|| g_ButtonIcon!=icon || g_ButtonIconSize!=GetSettingInt(L"StartButtonIconSize") || g_ButtonText!=text || g_ButtonTip!=tip);
51985198
if ((g_bTaskbarsChanged && !g_bTaskbarsUpdated) || bForce || bRecreate)
51995199
{

Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,8 @@ class CStartMenuTarget: public IDropTarget
498498
return E_NOINTERFACE;
499499
}
500500

501-
virtual ULONG STDMETHODCALLTYPE AddRef( void )
502-
{
501+
virtual ULONG STDMETHODCALLTYPE AddRef( void )
502+
{
503503
return InterlockedIncrement(&m_RefCount);
504504
}
505505

@@ -1345,13 +1345,11 @@ static void UpdateStartButtonPosition(const TaskbarInfo* taskBar, const WINDOWPO
13451345

13461346
// Start button on Win11 is a bit shifted to the right
13471347
// We will shift our Aero button to cover original button
1348-
if (IsWin11() && (x == info.rcMonitor.left) && !g_epTaskbar) {
1349-
if (GetStartButtonType() == START_BUTTON_AERO)
1350-
x += ScaleForDpi(taskBar->taskBar, 6);
1351-
// we should also be able to shift our custom icon, as it's also incorrectly aligned to the left edge on Windows 11
1352-
else if (GetStartButtonType() == START_BUTTON_CUSTOM)
1353-
x += ScaleForDpi(taskBar->taskBar, GetSettingInt(L"StartButtonOffset"));
1354-
}
1348+
if (IsWin11() && (x == info.rcMonitor.left) && (GetStartButtonType() == START_BUTTON_AERO) && !g_epTaskbar)
1349+
x += ScaleForDpi(taskBar->taskBar, 6);
1350+
1351+
if (GetStartButtonType() == START_BUTTON_CUSTOM)
1352+
x += ScaleForDpi(taskBar->taskBar, GetSettingInt(L"StartButtonOffset"));
13551353
}
13561354

13571355
RECT rcButton = { x, y, x + taskBar->startButtonSize.cx, y + taskBar->startButtonSize.cy };
@@ -2394,7 +2392,7 @@ void UpdateTaskBars( TUpdateTaskbar update )
23942392
{
23952393
if (bDefColor && GetWinVersion()>WIN_VER_WIN7)
23962394
{
2397-
if (IsAppThemed())
2395+
if (IsAppThemed())
23982396
{
23992397
color=GetSystemGlassColor8();
24002398
color=((color&0xFF)<<16)|(color&0xFF00)|((color>>16)&0xFF);
@@ -4311,7 +4309,7 @@ HBITMAP GetStartScreenIcon( int size )
43114309
}
43124310
SelectObject(hDst,bmp0);
43134311
DeleteDC(hDst);
4314-
4312+
43154313
int i=0;
43164314
int n=size*rc.top;
43174315
for (;i<n;i++)

Src/StartMenu/StartMenuDLL/StartMenuDLL.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ END
5353

5454
IDD_RENAME DIALOGEX 0, 0, 227, 54
5555
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
56-
EXSTYLE WS_EX_TOPMOST
56+
EXSTYLE WS_EX_TOPMOST
5757
CAPTION "Rename"
5858
FONT 8, "MS Shell Dlg", 400, 0, 0x1
5959
BEGIN
@@ -1073,7 +1073,7 @@ BEGIN
10731073
IDS_MENU_GLASS "Enable Aero Glass (requires Aero Glass mod)"
10741074
IDS_MENU_GLASS_TIP "Check this to use glass transparency (requires the Aero Glass mod to be installed)"
10751075
IDS_MAIN_MENU_SETTINGS "Main Menu"
1076-
IDS_BUTTON_OFFSET "Button left offset"
1076+
IDS_BUTTON_OFFSET "Button offset"
10771077
IDS_BUTTON_OFFSET_TIP "Offset the start button horizontally by the amount of pixels specified"
10781078
END
10791079

0 commit comments

Comments
 (0)