Skip to content

Classic two-column menu: Column lines, and the same width for all columns - #2589

Open
emilioheredia-source wants to merge 5 commits into
Open-Shell:masterfrom
emilioheredia-source:column-lines
Open

emilioheredia-source wants to merge 5 commits into
Open-Shell:masterfrom
emilioheredia-source:column-lines

Conversation

@emilioheredia-source

@emilioheredia-source emilioheredia-source commented Nov 15, 2026 •

Copy link
Copy Markdown

This is 5 of 5 of the column work from #2544:

# PR Builds on
1 More than two columns, and the Second pane look setting (#2580) master
2 A Pinned programs item, with rows per column (#2586) 1
3 Recent Programs: Show as a list, with rows per column (#2587) 2
4 A Heading item (a separator with a label) (#2588) master
5 Column lines, and the same width for all columns (#2589, this PR) 1

This PR builds on #2580, which isn't merged yet, so GitHub also lists #2580's commits here. This PR's own change is the last commit, Classic two-column menu: Column lines, and the same width for all columns. Once #2580 is in, I'll rebase this so only that commit remains.

Where this is going. Not this PR: this needs all five. This PR adds the lines between the columns; the pinned and recent lists in their own columns and the headings come with the other PRs (example programs, pinned and recent):

end goal

What this PR does on its own

With more columns (#2580), some skins give no sign of where one column ends and the next begins: Immersive, for example, tints its own column separator to the background. Two settings on the Menu Look tab, for the Classic two-column menu, both off by default:

  • Column lines draws a thin line in the middle of the gap between the columns of the main menu, in place of the skin's own separators. The line is the item text color at 25% opacity, one pixel wide (two on high DPI screens). The gap grows by 4 pixels on each side, so the line keeps clear of the icons and the text.
  • Same width for all columns makes every column of the main menu as wide as the widest. SameSizeColumns does this for multi-column sub-menus, but it defaults to on, so reusing it would change every existing two-column menu.

The three-column menu from #2580 with Second pane look = None, where all columns share one background. Before, nothing marks the columns; after, with both settings on:

Before After
before after

Trying it

The zip has the two settings files used for the screenshots: Settings, Backup → Load from XML file. Loading one replaces all your settings, so save yours first with Backup → Save to XML file. lines-before.xml is #2580's three-column menu with Second pane look = None, and lines-after.xml adds Column lines and Same width for all columns. The pinned and recent programs are your own.

settings-examples.zip

Tested

On Windows 11 26H2 (26300), x64, with the Immersive skin:

The screenshots were taken with #2575 applied too, so the pinned Store apps show their icons.

Every column break now starts a column. The last one still starts the
second pane, and earlier ones add columns to the first pane, so a menu
with one break looks exactly as before. The Windows 7 style keeps using
only its first break.

A new setting on the Menu Look tab, Second pane look, picks which column
gets the skin's second-pane look: the last column (the default, as
before), none (all columns alike), or the first column, drawn on the
left. For the first column the background is drawn as usual and then
mirrored, so the skin's outer borders stay on the outside; emblems, the
user picture and the user name are placed in their pane afterwards.

What had to change for that, since the layout assumed column 0 and
column 1 in many places: each pane's width is the sum of its columns,
items are offset from their own pane's content rectangle, every column
is aligned to the bottom on its own (COLUMN_PADDING), and the columns
inside a pane get the skin's vertical separators like sub-menu columns
do. The icon size of an item, which AddStandardItems picks before the
layout, follows the same panes: until now every item after the first
column break got the second pane's icon size, so a middle column lost
its icons with skins that hide them in the second pane.

The pager scrolls the first column, where the pinned programs are, and
until now it used the whole first pane for that, which was the same
thing. With more columns it is not: the arrows were drawn in the middle
of the pane, and hovering or clicking at the top or bottom of any column
of the pane hit the pager. GetScrollRect gives the pager its own column.
With Second pane look = First that column is in the second pane, whose
items can draw composited text (their own opacity setting). Composited
text ignores the clip rectangle, so the pager also checks those items
before it draws its background again over the spilled text.
The scroll range for touch, hover, keyboard and wheel scrolling was still
measured from the top of the first pane (m_rContent). With Second pane
look = First column the pinned programs are in the second pane, whose
top can be at another height, depending on the skin's padding, so the
last pinned program could be cut off or followed by a gap. It now comes
from GetScrollRect, like the rest of the pager. With Immersive both panes
start at the same height, so the screenshots in this PR don't change.
A drop on empty space adds the program to the pinned programs. It was
measured against the first pane (m_rContent), which until now was the
same as their column. With more columns, a drop on empty space in
another column of the first pane pinned the program too, and with
Second pane look = First column a drop in the pinned programs' own
column did nothing. It now uses GetScrollRect, like the pager.

The pager's scroll range was the same expression in six places;
GetScrollRange now gives it once.
…elpers

Behavior is unchanged. InitWindowInternal and HitTest are long upstream
functions, so the new code they needed now lives in two helpers instead
of growing them: GetColumnBottomShifts works out how far each column's
bottom-aligned items move, and IsInScrollColumn tells whether a point is
in the column the pager scrolls.
…umns

Two settings on Menu Look for the Classic two-column menu, both off by
default:

- Column lines draws a thin line in the middle of the gap between the
  columns of the main menu. Some skins, like Immersive, tint their own
  column separator to the background, so with more than two columns
  nothing shows where one column ends. The line is the item text color
  at 25% opacity, one pixel wide (two on high DPI screens), and replaces
  the skin's separators while it is on. The gap between columns grows by
  4 pixels on each side (GetMainColumnGap), so the line keeps clear of
  the icons and the text.
- Same width for all columns makes every column of the main menu as wide
  as the widest. SameSizeColumns does this for multi-column sub-menus,
  but it defaults to on, so reusing it would change every existing
  two-column menu.

This branch has not been deployed

No deployments
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.

1 participant