refactor(gui): drop the raw-bitmap fallback for the 10 built-in toolbar icons (#675) - #733
Merged
Merged
Conversation
…ar icons
Add_Skin_Icon()'s stdIcon argument was only ever consulted when no skin
was active AND the CamuleArtProvider ("amule:toolbar_<name>") lookup
failed. Every built-in toolbar icon ships embedded in icon_data.c,
generated from the same src/icons/ sources CamuleArtProvider reads --
that lookup failing is a broken-build condition, not one reachable at
runtime with a correct build, so the 10 bespoke ~130-line raw-pixel
fallback bitmaps in amuleDlgImages() (indices 20-26, 29, 32, 33) were
dead weight kept alive only by that one impossible branch.
Apply_Toolbar_Skin() now passes wxNullBitmap for these 10 calls, and
Add_Skin_Icon() falls back to wxART_MISSING_IMAGE (a generic stock
icon, always available, no embedding needed) if the lookup somehow
still fails, instead of silently misaligning m_tblist by skipping the
push.
Verified via a full amule build (macOS) and a visual check that the
main toolbar (Networks/Search/Download/Shared/Messages/Stats/Prefs/
Import/About/Blink) renders all 10 icons correctly with no fallback
triggered.
# Conflicts: # src/muuli_wdr.cpp
|
Resolved the |
# Conflicts: # src/muuli_wdr.cpp
LSalami
added a commit
to LSalami/amule
that referenced
this pull request
Jul 31, 2026
…ree, and tab-close icons to CamuleArtProvider Continues the icon-system cleanup scoped in amule-org#675, independent of amule-org#732/amule-org#733 (different files, no overlap). - amuleDlgImages(14)/(15): the small header icons in the Friends and Messages tabs. Friends gets a new "amule:friends" SVG; Messages reuses the existing "amule:toolbar_messages" art, requested at an explicit 16x16 so it doesn't inherit the toolbar's 32x32 natural size. - amuleDlgImages(18)/(30): the "reload list" buttons (shared files, ED2K server list, Kad node list) -- three call sites, one new "amule:reload" SVG (see below for its own history). - amuleSpecial(1)/(2): the shared-directory tree's folder icons get new "amule:folder"/"amule:folder_shared" SVGs -- same shape, tinted orange vs. red, matching how the original raw bitmaps only differed by colour. - amuleSpecial(3)/(4): the chat/search notebook tabs' close-on-hover icon, replaced with wx's own stock wxART_CLOSE for both states instead of a second bespoke asset (both were the same "X in a box" bitmap, differing only by a hover-highlight border colour). reload.svg's own history, per PR review: the first hand-drawn attempt (thin blue single arc) didn't match the original at all -- got3nks caught it, I reconstructed the original amuleDlgImages(18) raster to check (a thicker green double-arrow circle) and redrew closer to that, which still wasn't good enough. Final version is AI-vectorized via Recraft (through the Higgsfield MCP), which got3nks preferred over further hand-drawn iterations. src/icons/icon_data.c (the checked-in fallback used when Python3 is absent at configure time, per amule-org#487) regenerated via embed_icons.py to match. Rebased onto current master (picking up amule-org#732/amule-org#733/amule-org#739, which all touch the same amuleSpecial/amuleDlgImages functions) -- conflicts resolved by redoing the index deletions against the current tree rather than replaying the stale patch, since amule-org#725/amule-org#733 already moved the surrounding line numbers. Verified via a full amule build (macOS) and a visual check of every call site: Friends/Messages tab headers, the ED2K server-list and Kad node-list reload buttons, the shared-files reload button, and the Preferences > Directory shared-folder tree.
got3nks
pushed a commit
that referenced
this pull request
Jul 31, 2026
…or tab-close (#675) (#735) * feat(gui): migrate Friends/Messages headers, reload buttons, folder tree, and tab-close icons to CamuleArtProvider Continues the icon-system cleanup scoped in #675, independent of #732/#733 (different files, no overlap). - amuleDlgImages(14)/(15): the small header icons in the Friends and Messages tabs. Friends gets a new "amule:friends" SVG; Messages reuses the existing "amule:toolbar_messages" art, requested at an explicit 16x16 so it doesn't inherit the toolbar's 32x32 natural size. - amuleDlgImages(18)/(30): the "reload list" buttons (shared files, ED2K server list, Kad node list) -- three call sites, one new "amule:reload" SVG (see below for its own history). - amuleSpecial(1)/(2): the shared-directory tree's folder icons get new "amule:folder"/"amule:folder_shared" SVGs -- same shape, tinted orange vs. red, matching how the original raw bitmaps only differed by colour. - amuleSpecial(3)/(4): the chat/search notebook tabs' close-on-hover icon, replaced with wx's own stock wxART_CLOSE for both states instead of a second bespoke asset (both were the same "X in a box" bitmap, differing only by a hover-highlight border colour). reload.svg's own history, per PR review: the first hand-drawn attempt (thin blue single arc) didn't match the original at all -- got3nks caught it, I reconstructed the original amuleDlgImages(18) raster to check (a thicker green double-arrow circle) and redrew closer to that, which still wasn't good enough. Final version is AI-vectorized via Recraft (through the Higgsfield MCP), which got3nks preferred over further hand-drawn iterations. src/icons/icon_data.c (the checked-in fallback used when Python3 is absent at configure time, per #487) regenerated via embed_icons.py to match. Rebased onto current master (picking up #732/#733/#739, which all touch the same amuleSpecial/amuleDlgImages functions) -- conflicts resolved by redoing the index deletions against the current tree rather than replaying the stale patch, since #725/#733 already moved the surrounding line numbers. Verified via a full amule build (macOS) and a visual check of every call site: Friends/Messages tab headers, the ED2K server-list and Kad node-list reload buttons, the shared-files reload button, and the Preferences > Directory shared-folder tree. * fix(gui): thicker reload stroke, dedicated message-bubble icon (#735 review) got3nks, testing #735: - reload: arrow bodies read too thin at 16px. Regenerated via Recraft with an explicit thicker/bolder-stroke prompt. - Messages panel header: reusing "amule:toolbar_messages" (the main toolbar's detailed gradient mascot bust) at 16x16 doesn't read as "messages" once shrunk that far from its 32x32 native size. Added a dedicated "amule:message" chat-bubble glyph instead, sized for legibility at 16x16 specifically, and pointed the Messages panel header at it instead of the toolbar art. Folder/folder_shared and the tab-close X were already approved as-is. Verified via a full amule build (macOS) and a visual check of both fixes: the shared-files reload button and the Messages panel header.
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.
Continues the icon-system cleanup scoped in #675, following #725 and #732. This one closes out the "already ~90% migrated" toolbar subset flagged in the #675 synthesis comment.
What changed
Add_Skin_Icon()'sstdIconargument was only ever consulted for the toolbar's 10 built-in icons (Network/Transfers/Search/Shared/Messages/Stats/Prefs/Import/About/Blink) when both of these were true: no skin active, and theCamuleArtProvider("amule:toolbar_<name>") lookup failed. Every one of those icons ships embedded inicon_data.c, generated from the samesrc/icons/sourcesCamuleArtProviderreads — that lookup failing means a broken build, not something reachable at runtime with a correct one. The 10 correspondingamuleDlgImages()indices (20-26, 29, 32, 33) were each ~130 lines of raw pixel data kept alive purely by that one impossible branch.Apply_Toolbar_Skin()now passeswxNullBitmapfor these 10 calls instead.Add_Skin_Icon()falls back towxART_MISSING_IMAGE(wx's generic stock "missing icon" art, always available, nothing to embed) if the lookup somehow still fails, rather than silently skipping them_tblistpush (which would have misaligned every icon after it).Result
1344 lines removed net (mostly the 10 raw-pixel index blocks in
muuli_wdr.cpp).Testing
clang-formatv18 (Docker, pinned) clean. Fullamulebuild verified on macOS. Visually confirmed the main toolbar renders all 10 icons correctly (nowxART_MISSING_IMAGEfallback triggered) — screenshot on request.