Skip to content

fix: drop the spurious half-row padding in the filament submenu - #999

Merged
zhangzhend0ng merged 1 commit into
Snapmaker:mainfrom
ZhongZhiPan:bugfix_filament_submenu_bottom_gap
Oct 13, 2026
Merged

zhangzhend0ng merged 1 commit into
Snapmaker:mainfrom
ZhongZhiPan:bugfix_filament_submenu_bottom_gap

Conversation

@ZhongZhiPan

Copy link
Copy Markdown

Description

The half row reserved for the scroll bar in the second-level submenu was decided
by the total filament count (items.size()) instead of the number of rows the
current group actually renders. There is only one submenu window and switching
groups filters rather than rebuilds it, so items.size() is always the full
count and always exceeds the submenu's row limit (8): the half row was added to
every submenu.

Fix: decide by the current group's row count (count), consistent with the
condition that draws the scroll bar.

Size: 1 file, 1 line; no dependency, preset or configuration changes.

Screenshots/Recordings/Graphs

The bug before fixed
耗材分页下拉框子菜单留白过多缺陷

now the filament combobox show like this
修复耗材下拉框子菜单底部留白过多

Tests

Manual (GUI, on device): the extra blank space at the bottom of the second-level
submenu is gone, and the vendor groups under the system section behave normally.
No automated coverage: the repository's tests only cover pure logic, and popup
size computation is GUI layout.

The submenu keeps half a row free for the scroll bar whenever the item
count exceeds max_rows. That check read items.size(), but the popup holds
the whole item vector and selects a group by filtering, so the value was
always the total preset count — the reservation went in even for groups
that never scroll, leaving a blank strip below the last row of the user,
project and small vendor submenus.

Test the rows the current group actually shows instead (count > max_rows),
the same condition render_scroll_bar() uses to decide whether to draw a
scroll bar. Groups that do scroll are unchanged.
@zhangzhend0ng
zhangzhend0ng merged commit 383d948 into Snapmaker:main Oct 13, 2026
1 check passed
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