Skip to content

fix(gui): inset the info-pane labels, hide the log panes' caret - #724

Merged
got3nks merged 1 commit into
amule-org:masterfrom
got3nks:fix/log-caret-and-info-margin
Jul 30, 2026
Merged

fix(gui): inset the info-pane labels, hide the log panes' caret#724
got3nks merged 1 commit into
amule-org:masterfrom
got3nks:fix/log-caret-and-info-margin

Conversation

@got3nks

@got3nks got3nks commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Closes #702. Two follow-ups to the log-pane margin work in #707, both reported against it by @mifritscher2 and both confirmed fixed by him.

Info panes drew their labels against the frame

The ED2K Info and Kad Info tabs are native two-column wxListCtrls, not Scintilla, so #707's SetMarginLeft couldn't reach them — and wxListCtrl has no counterpart. Left cell padding comes from the platform theme, and a theme that sets none leaves the text on the border.

Fixed with an empty 5px spacer column, matching the log panes' text margin so all four tabs in the notebook line up. Columns are created up front because inserting one into a populated wxListCtrl doesn't reliably shift the existing per-row data across ports.

InsertItem() writes column 0, which is now the spacer, so the ~20 row insertions and ~20 value writes go through two small helpers that keep the column indices in one place rather than at every call site. The copy handler reads by name for the same reason — left as columns 0/1 it would have picked up the empty spacer and prefixed every copied line with a stray tab. @mifritscher2 confirmed copies are clean.

Not addressed: the spacer only insets the left, so the first row still sits against the top frame. A vertical gap would mean growing every row's height, which is a heavier tool than a margin; the reporter looked at it and said the left inset alone is fine.

Log panes drew a caret

They're SetReadOnly(true), so there's no insertion point for a caret to mark, but Scintilla draws one anyway at the left of the text area. That went unnoticed while the text started there too; once #707's margin inset the text, the caret was left sitting on the frame. Now SetCaretStyle(wxSTC_CARETSTYLE_INVISIBLE). Selection highlighting is independent of caret visibility, so click-drag and Ctrl+C are unaffected.

Testing

Built amule + amulegui clean on macOS ARM64, Ubuntu ARM64 (wxGTK3) and Windows ARM64. clang-format 18.1.8 — CI's exact version — reports no violations; diff-scoped Tier-2 clang-tidy is clean with 0 compiler errors. @mifritscher2 verified the result on Debian/MATE, which is where the problem was originally visible.

Follow-ups to the log-pane margin work, both reported against it.

The ED2K Info and Kad Info panes still drew their labels hard against the
frame. They are native two-column wxListCtrls, not Scintilla, so the earlier
SetMarginLeft fix could not reach them, and wxListCtrl has no counterpart --
the left cell padding comes from the platform theme, and a theme that sets
none leaves the text on the border. Add an empty 5px spacer column, matching
the log panes' text margin so the notebook's four tabs line up. Columns are
created up front because inserting one into a populated wxListCtrl does not
shift the existing per-row data across ports.

InsertItem() writes column 0, which is now the spacer, so the ~20 row
insertions and ~20 value writes go through two small helpers that put the
column indices in one place instead of at every call site. The copy handler
reads by name for the same reason: left as column 0/1 it would have picked
up the empty spacer and prefixed every copied line with a stray tab.

Also stop the log panes drawing a caret. They are read-only, so there is no
insertion point for one to mark, but Scintilla draws it anyway at the left
of the text area. That went unnoticed while the text started there too;
once the text margin inset the text, the caret was left sitting on the
frame. Selection highlighting is independent of caret visibility, so
click-drag and Ctrl+C are unaffected.
@got3nks
got3nks merged commit e692af6 into amule-org:master Jul 30, 2026
15 checks passed
LSalami added a commit to LSalami/amule that referenced this pull request Jul 31, 2026
muleToolbar() duplicated several msgid source-location references
(Networks, Searches, Downloads Window, etc.) already present via
amuleDlg.cpp's own toolbar setup. Deleting it drops those now-stale
#: comments; no msgid added, removed, or retranslated -- verified via
unchanged msgid count (1903 before/after) and a diff limited to
source-location comments and POT-Creation-Date.

Regenerated after rebasing onto upstream/master to pick up po/
changes from amule-org#723/amule-org#724/amule-org#726/amule-org#728/amule-org#730/amule-org#731, which had drifted our
prior regeneration out of sync.
got3nks pushed a commit that referenced this pull request Jul 31, 2026
…r.cpp (#675) (#725)

* chore(gui): delete unreachable bitmap functions/entries from muuli_wdr.cpp

First slice of the icon-system cleanup scoped in #675: remove code with
zero call sites anywhere in the tree, before any wxArtProvider migration
work starts.

- muleToolbar(): whole function unused -- superseded by the main
  wxToolBar setup in amuleDlg.cpp; nothing calls it.
- moreImages(): whole function unused, both of its two icon entries.
- amuleDlgImages(): 21 of 35 index blocks have no caller anywhere
  (0-13, 16, 17, 19, 27, 28, 31, 34). The 14 live ones are untouched --
  10 of those (20-26, 29, 32, 33) are already the fallback path inside
  amuleDlg.cpp's Add_Skin_Icon, which prefers a wxArtProvider/SVG lookup
  first; the other 4 (14, 15, 18, 30) are still called directly.
- amuleSpecial(): 6 of 26 index blocks have no caller (6, 7, 8, 9, 18,
  20) -- checked both direct call sites and the PrefsUnifiedDlg.cpp
  fallback table (pages[].m_imageidx), which uses neither.

convert_xpm in PartFileConvertDlg.cpp was on the same "no literal
grep hits" list initially but is not actually dead -- SetIcon(wxICON
(convert)) reaches it via the wxICON macro's token-pasting
(X##_xpm), invisible to a plain identifier search. Caught by a full
build failing on the undeclared identifier, not by inspection; left
untouched.

Deletes 1373 lines (~16% of the file). No behavior change: every
touched entry was unreachable code. clang-format v18 clean; full
amule build verified (macOS, CLIENT_GUI unaffected since neither
touched symbol is CLIENT_GUI-only).

* chore(po): regenerate catalogs after muuli_wdr.cpp dead-code removal

muleToolbar() duplicated several msgid source-location references
(Networks, Searches, Downloads Window, etc.) already present via
amuleDlg.cpp's own toolbar setup. Deleting it drops those now-stale
#: comments; no msgid added, removed, or retranslated -- verified via
unchanged msgid count (1903 before/after) and a diff limited to
source-location comments and POT-Creation-Date.

Regenerated after rebasing onto upstream/master to pick up po/
changes from #723/#724/#726/#728/#730/#731, which had drifted our
prior regeneration out of sync.
@got3nks
got3nks deleted the fix/log-caret-and-info-margin branch July 31, 2026 15:29
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.

The new server info textfield, the info list etc. could need a bigger margin

1 participant