Skip to content

refactor(gui): drop the raw-bitmap fallback for the 10 built-in toolbar icons (#675) - #733

Merged
got3nks merged 3 commits into
amule-org:masterfrom
LSalami:iconsystem-toolbar-subset
Jul 31, 2026
Merged

refactor(gui): drop the raw-bitmap fallback for the 10 built-in toolbar icons (#675)#733
got3nks merged 3 commits into
amule-org:masterfrom
LSalami:iconsystem-toolbar-subset

Conversation

@LSalami

@LSalami LSalami commented Jul 31, 2026

Copy link
Copy Markdown

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()'s stdIcon argument 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 the CamuleArtProvider ("amule:toolbar_<name>") lookup failed. Every one of those icons ships embedded in icon_data.c, generated from the same src/icons/ sources CamuleArtProvider reads — that lookup failing means a broken build, not something reachable at runtime with a correct one. The 10 corresponding amuleDlgImages() 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 passes wxNullBitmap for these 10 calls instead. Add_Skin_Icon() falls back to wxART_MISSING_IMAGE (wx's generic stock "missing icon" art, always available, nothing to embed) if the lookup somehow still fails, rather than silently skipping the m_tblist push (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-format v18 (Docker, pinned) clean. Full amule build verified on macOS. Visually confirmed the main toolbar renders all 10 icons correctly (no wxART_MISSING_IMAGE fallback triggered) — screenshot on request.

…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.
@got3nks

got3nks commented Jul 31, 2026

Copy link
Copy Markdown

Resolved the muuli_wdr.cpp conflict by merging current master in — kept master's current icon data and removed only the 10 toolbar-subset blocks, so the net change matches your original (+28/−1344). Builds clean on macOS.

@got3nks
got3nks merged commit b400dca into amule-org:master Jul 31, 2026
14 checks passed
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.
@LSalami
LSalami deleted the iconsystem-toolbar-subset branch August 5, 2026 14:08
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