Repository navigation
Recent Programs: Show as a list, with rows per column - #2587
Open
emilioheredia-source wants to merge 8 commits into
Open
emilioheredia-source wants to merge 8 commits into
emilioheredia-source wants to merge 8 commits into
Conversation
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.
This was referenced Nov 15, 2026
…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.
…r column Until now the pinned programs always lead the first column of the main menu. A new item, Pinned programs (pinned_programs, Classic two-column style only), puts them where it is in the menu: after a column break it gives them a column of their own, next to the places, for example. The pinned programs stay at the start of the item list (0..m_ScrollCount) because the pager, painting, keyboard and drag and drop rely on that. Only the layout order changes: GetLayoutOrder lays out the items configured before the Pinned programs item first, then the pinned programs and their separator, then the rest. MovePinnedPadding keeps a leading COLUMN_PADDING with the items it belongs to. The item has a Rows per column setting in the item editor (Item.Rows, 0 = no limit). After that many rows the list continues in the next column, aligned under its first row: SetOverflowBreaks marks those breaks as overflow breaks, which start a column in the same pane and never move the boundary between the panes. One list and one order, so drag and drop works as before. The pager follows the pinned programs to their column (GetScrollColumn), including its pane and its skin settings. Restore Defaults in the item editor also clears the rows.
emilioheredia-source
force-pushed
the
recent-list
branch
from
November 15, 2026 18:44
483e5f7 to
80a0967
Compare
AddStandardItems puts a separator between the pinned programs and the items that follow them, because in the default menu they share a column. With a Pinned Programs item the user places the pinned programs and everything around them, so that separator is no longer needed, and when a list follows in the same column it pushes the rows below it out of line with the column next to it. The separator now gets no height when a Pinned Programs item places the pinned programs. The item stays, so the bottom alignment it carries for COLUMN_PADDING and the pager's use of it are unchanged. A SEPARATOR item after the Pinned Programs item still draws a line. Menus without a Pinned Programs item are unchanged.
The Recent Programs item can show the recent programs as a list in its own place in the menu (Show as a list in the item editor, setting FLAT_LIST), instead of as a sub-menu. In the Classic two-column menu that puts the recent list wherever the user wants it, for example in a column of its own after a column break, and Rows per column lets it continue in the next column, like the Pinned programs item. - The item is a placeholder, replaced once all other items are added (InsertRecentProgramLists), because GetRecentPrograms skips programs that are already in the main menu. Any Recent Programs item already turns off the recent programs that the RecentPrograms setting adds to the main menu (MENU_NORECENT), so they never show twice. - The list takes the icon size of the pane it is in (IsInSecondPane). - Sorting by name or in reverse used to reorder only the first block of recent programs, in one column. Every block is sorted now, and each program takes a place the layout gave the list, so a list that runs over several columns keeps its shape. - Rows per column is enabled for the Recent Programs item only while Show as a list is checked, since a sub-menu has no rows. - GetRecentProgramCount and SetJumplistFlags are the code InitItems already had, moved into helpers so the list can use them too.
…rst list With no column break between the Pinned Programs item and a recent programs list, the recent programs continue in the pinned programs' last column, after the separator. Each list set the height its overflow columns start at, so the recent list's next column started level with its own first item, halfway down, leaving an empty band at the top. Now only the first list in a column sets that height; a list with nothing above it in its column is unchanged.
emilioheredia-source
force-pushed
the
recent-list
branch
from
November 16, 2026 01:58
80a0967 to
c6afcda
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is 3 of 5 of the column work from #2544:
This PR builds on #2586, which builds on #2580. Neither is merged yet, so GitHub also lists their commits here. This PR's own changes are the last two commits, Recent Programs: Show as a list, with rows per column and Overflow columns of a second list in a column start level with the first list. Once they are in, I'll rebase this so only those two remain.
Where this is going. Not this PR: this needs all five. This PR lets the recent programs have a column of their own; the extra columns, the pinned list, the headings and the column lines come with the other PRs (example programs, pinned and recent):
What this PR does on its own
Today the recent programs either open as a sub-menu (the Recent Programs item) or, with the Recent programs setting, sit under the pinned programs at the top of the first column. The more of them there are, the taller that one column gets.
The Recent Programs item gets a new option in its editor, Show as a list (
FLAT_LIST): the recent programs then appear as a list in the item's place instead of as a sub-menu, so they can go anywhere in the menu, for example in a column of their own after a column break. Rows per column from #2586 works for this list too: after that many rows it continues in the next column. Rows per column is greyed out unless Show as a list is checked, since a sub-menu has no rows. Without the option nothing changes.The same 5 pinned and 8 recent programs. Before: the Recent programs setting puts them under the pinned programs, and the first column is twice as tall as the others. After: a Recent Programs item shown as a list, after a column break between the first column and the places.
How it works:
InsertRecentProgramLists), becauseGetRecentProgramsskips programs that are already in the main menu. Any Recent Programs item already turns off the recent programs that the setting adds (MENU_NORECENT), so they never show twice.GetRecentProgramCountandSetJumplistFlagsare the codeInitItemsalready had, moved into helpers so the list can use them too.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. Both are #2580's three-column menu with recent programs on (8):
recent-before.xmlas it is,recent-after.xmlwith a Recent Programs item shown as a list after one more column break. 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.