Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Src/StartMenu/StartMenuDLL/SettingsUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4456,6 +4456,7 @@ CSetting g_Settings[]={
{L"CustomButton",CSetting::TYPE_RADIO,IDS_CUSTOM_BUTTON,IDS_CUSTOM_BUTTON_TIP},
{L"StartButtonPath",CSetting::TYPE_BITMAP,IDS_BUTTON_IMAGE,IDS_BUTTON_IMAGE_TIP,L"",0,L"#StartButtonType=2",L"CustomButton"},
{L"StartButtonSize",CSetting::TYPE_INT,IDS_BUTTON_SIZE,IDS_BUTTON_SIZE_TIP2,0,0,L"#StartButtonType=2",L"CustomButton"},
{L"StartButtonOffset",CSetting::TYPE_INT,IDS_BUTTON_OFFSET,IDS_BUTTON_OFFSET_TIP,0,0,L"#StartButtonType=2",L"CustomButton"},
{L"StartButtonAlign",CSetting::TYPE_BOOL,IDS_BUTTON_ALIGN,IDS_BUTTON_ALIGN_TIP,0,0,L"#StartButtonType=2",L"CustomButton"},
{L"StartButtonIcon",CSetting::TYPE_ICON,IDS_BUTTON_ICON,IDS_BUTTON_ICON_TIP,L",1",0,L"#StartButtonType=1",L"ClasicButton"},
{L"StartButtonIconSize",CSetting::TYPE_INT,IDS_BUTTON_ICON_SIZE,IDS_BUTTON_ICON_SIZE_TIP,0,0,L"#StartButtonType=1",L"ClasicButton"},
Expand Down Expand Up @@ -5157,7 +5158,7 @@ void InitSettings( void )
InitSettings(g_Settings,COMPONENT_MENU,&g_CustomSettings);
}

static int g_ButtonPath, g_ButtonSize, g_ButtonIcon, g_ButtonIconSize, g_ButtonText, g_ButtonTip;
static int g_ButtonPath, g_ButtonSize, g_ButtonIcon, g_ButtonOffset, g_ButtonIconSize, g_ButtonText, g_ButtonTip;
static bool g_bButtonEnable, g_bTaskbarsChanged, g_bTaskbarsUpdated;

static void StoreButtonSettings( void )
Expand All @@ -5175,6 +5176,7 @@ static void StoreButtonSettings( void )
if (g_ButtonPath==START_BUTTON_CUSTOM)
g_ButtonPath=CalcFNVHash(GetSettingString(L"StartButtonPath"));
g_ButtonSize=GetSettingInt(L"StartButtonSize");
g_ButtonOffset=GetSettingInt(L"StartButtonOffset");
g_ButtonIconSize=GetSettingInt(L"StartButtonIconSize");
}

Expand All @@ -5191,7 +5193,7 @@ static void UpdateButtons( bool bForce )
}
if (path==START_BUTTON_CUSTOM)
path=CalcFNVHash(GetSettingString(L"StartButtonPath"));
bool bRecreate=(g_bButtonEnable!=GetSettingBool(L"EnableStartButton") || path!=g_ButtonPath || g_ButtonSize!=GetSettingInt(L"StartButtonSize")
bool bRecreate=(g_bButtonEnable!=GetSettingBool(L"EnableStartButton") || path!=g_ButtonPath || g_ButtonSize!=GetSettingInt(L"StartButtonSize") || g_ButtonOffset!=GetSettingInt(L"StartButtonOffset")
|| g_ButtonIcon!=icon || g_ButtonIconSize!=GetSettingInt(L"StartButtonIconSize") || g_ButtonText!=text || g_ButtonTip!=tip);
if ((g_bTaskbarsChanged && !g_bTaskbarsUpdated) || bForce || bRecreate)
{
Expand Down
3 changes: 3 additions & 0 deletions Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,9 @@ static void UpdateStartButtonPosition(const TaskbarInfo* taskBar, const WINDOWPO
// We will shift our Aero button to cover original button
if (IsWin11() && (x == info.rcMonitor.left) && (GetStartButtonType() == START_BUTTON_AERO) && !g_epTaskbar)
x += ScaleForDpi(taskBar->taskBar, 6);

if (GetStartButtonType() == START_BUTTON_CUSTOM)
x += ScaleForDpi(taskBar->taskBar, GetSettingInt(L"StartButtonOffset"));
}

RECT rcButton = { x, y, x + taskBar->startButtonSize.cx, y + taskBar->startButtonSize.cy };
Expand Down
2 changes: 2 additions & 0 deletions Src/StartMenu/StartMenuDLL/StartMenuDLL.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,8 @@ BEGIN
IDS_MENU_GLASS "Enable Aero Glass (requires Aero Glass mod)"
IDS_MENU_GLASS_TIP "Check this to use glass transparency (requires the Aero Glass mod to be installed)"
IDS_MAIN_MENU_SETTINGS "Main Menu"
IDS_BUTTON_OFFSET "Button offset"
IDS_BUTTON_OFFSET_TIP "Offset the start button horizontally by the amount of pixels specified"
END

STRINGTABLE
Expand Down
2 changes: 2 additions & 0 deletions Src/StartMenu/StartMenuDLL/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,8 @@
#define IDS_ENABLE_ACCELERATORS_TIP 3687
#define IDS_ALT_ACCELERATORS 3688
#define IDS_ALT_ACCELERATORS_TIP 3689
#define IDS_BUTTON_OFFSET 3690
#define IDS_BUTTON_OFFSET_TIP 3691
#define IDS_STRING7001 7001
#define IDS_STRING7002 7002
#define IDS_STRING7003 7003
Expand Down