fix(gui): drop Mac padding from Preferences page icons - #307
Merged
Conversation
Follow-up to amule-project#295: the old `#ifdef __WXOSX__` right/bottom pads (14/9) compensated for `AssignImageList`'s NSTableView render path — zero native icon/text gap plus vertical-centre-of-the-full-bitmap, which made a bare 16x16 icon sit flush against the label and drift toward the row baseline. `SetSmallImages` uses a different wxOSX path that already inserts native icon/text spacing, so the pads now render as visible extra whitespace between icon and label. Drop them (and the now-dead `img.Size()` pass) so wxOSX matches Windows/Linux layout. Verified locally: rebuilt on macOS 15 ARM64 (wxOSX Cocoa 3.3.2), page icons now sit at the natural offset the wx-native path picks. No change on wxGTK or wxMSW paths (both pads were already 0 there).
Cflsft
pushed a commit
to Cflsft/amule
that referenced
this pull request
Jul 6, 2026
Follow-up to amule-org#295: the old `#ifdef __WXOSX__` right/bottom pads (14/9) compensated for `AssignImageList`'s NSTableView render path — zero native icon/text gap plus vertical-centre-of-the-full-bitmap, which made a bare 16x16 icon sit flush against the label and drift toward the row baseline. `SetSmallImages` uses a different wxOSX path that already inserts native icon/text spacing, so the pads now render as visible extra whitespace between icon and label. Drop them (and the now-dead `img.Size()` pass) so wxOSX matches Windows/Linux layout. Verified locally: rebuilt on macOS 15 ARM64 (wxOSX Cocoa 3.3.2), page icons now sit at the natural offset the wx-native path picks. No change on wxGTK or wxMSW paths (both pads were already 0 there).
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.
Bug
Follow-up to #295. On macOS, the Preferences page selector shows a visible extra horizontal gap between each icon and its label. Not present on Windows or Linux — the gap is Mac-only.
Root cause
The
#ifdef __WXOSX__right/bottom pads (14 / 9 px) added earlier were compensating for howAssignImageList+ NSTableView rendered:#295 switched to
SetSmallImages(wxVector<wxBitmapBundle>). That path uses a different wxOSX render code that already inserts native icon/text spacing and centres just the icon rather than the full bitmap. The old pads are now added on top of that native spacing, producing the extra gap.Fix
Drop the Mac-only pad values (0 on Windows/Linux, so this touches only the wxOSX path), and remove the now-dead
img.Size()pass in the bundle builder. The icon canvas becomes plain 16x16 at 1x and 32x32 at 2x on every backend.Test plan