Skip to content

Added setting to horizontally offset start button - #2524

Open
hxmid wants to merge 2 commits into
Open-Shell:masterfrom
hxmid:master
Open

Added setting to horizontally offset start button #2524
hxmid wants to merge 2 commits into
Open-Shell:masterfrom
hxmid:master

Conversation

@hxmid

@hxmid hxmid commented Aug 26, 2026

Copy link
Copy Markdown

Windows 11 (at least on my PC) forces the start button to be locked to the left edge of the taskbar. These changes allow the horizontal offset to be adjusted, thus allowing it to correctly be placed overtop the start button.

before (offset 0):
before

after (offset 12):
image

Having a setting within the UI allows the user to have finer control where images/icons may not be perfectly aligned by default.

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 left offset"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd name it just Button offset.
The tooltip explains what kind of offset it means.


virtual ULONG STDMETHODCALLTYPE AddRef( void )
{
virtual ULONG STDMETHODCALLTYPE AddRef( void )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove these unintentional whitespace changes? They are not related to changes in this PR.
There are some more below.

if (GetStartButtonType() == START_BUTTON_AERO)
x += ScaleForDpi(taskBar->taskBar, 6);
// we should also be able to shift our custom icon, as it's also incorrectly aligned to the left edge on Windows 11
else if (GetStartButtonType() == START_BUTTON_CUSTOM)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this code is restricted only for Win11 without ExplorerPatcher.
I guess the offset setting should be more generic.

I'd move this outside of the if section.
By default the offset is 0 so it won't affect anything.
If user changes the setting, it would apply no matter of OS and other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants