search dialog: fix 10px-tall extension input field (#568) - #569
Merged
mrjimenez merged 1 commit intoMay 11, 2026
Merged
Conversation
The Extension input on the search dialog was constructed with wxSize(40,10), pinning the control's initial best-size to 10 pixels of height. On Debian-stable Mate and Ubuntu 24.04 (wx 3.2 / GTK3) the sizer's Expand() flag does not override that explicit height, so the field renders as a 10-pixel-tall sliver — visually a green dash with no room for any glyph. Replace the hard-coded size with wxSize(60, -1): width matches the adjacent Min/Max-size spin controls in the same FlexGridSizer column, and -1 lets wx pick the platform-default text-control height. The sizer flag wxSizerFlags().Expand().CenterVertical() then handles the rest.
Contributor
|
Looks good on Ubuntu for the extension field. Let's wait for @mifritscher2 confirmation too. On a side note, I just noticed that the Min Size, Max Size and Availability selectors on the below line look clipped... |
|
Yes, looks good now! The observation of @danim7 regarding the min/max size is correct. I assume that the used is with the "stacked spinner" layout widely used, not with the 2 side by side big buttons used here. |
mrjimenez
pushed a commit
that referenced
this pull request
May 14, 2026
…on Linux Follow-up to #569. The extension field there was pinned to wxSize(40, 10) which collapsed it to a 10-pixel sliver on wxGTK 3.2 / GTK3. The same row also has three wxSpinCtrls -- Min Size, Max Size, Availability -- pinned to wxSize(60, -1) or wxSize(45, -1). On GTK those numeric widths aren't wide enough to fit the stacked up/down arrow buttons plus the digit display, so the value column gets clipped behind the spin arrows. Drop the hard-coded widths to wxDefaultSize and let the layout engine choose. macOS / Windows render side-by-side spin buttons that fit comfortably in the wider default; GTK gets the larger geometry it needs for stacked arrows. Reported by @danim7 on the #569 thread, confirmed by @mifritscher2. Symptom and fix are mechanically identical to #569's, just on the row below and on the spin-control widths instead of the textctrl height.
got3nks
added a commit
to got3nks/amule
that referenced
this pull request
May 27, 2026
…ject#737) Six SpinCtrls in the Preferences dialog were pinned to widths that fall below GtkSpinButton's intrinsic minimum on wxGTK 3.2 / GTK3: IDC_TOOLTIPDELAY wxSize(40, -1) General tab IDC_SERVERRETRIES wxSize(40, -1) Server tab IDC_OSUPDATE wxSize(60, -1) Online Signature tab IDC_MAXDOWN wxSize(140, -1) Connection tab (Bandwidth limits) IDC_MAXUP wxSize(140, -1) Connection tab (Bandwidth limits) IDC_SLOTALLOC wxSize(140, -1) Connection tab (Bandwidth limits) GTK3's GtkSpinButton is a composite widget (entry + stacked up/down arrows). The internal box gadget needs ~80 px just to fit the entry + arrow column at the default theme; combined with the surrounding wxFlexGridSizer / wxBoxSizer's tight allocation, forcing a smaller or even an explicit "we know what we want" wx-side hint shoves the entry's allocation below zero, which triggers Gtk-CRITICAL: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton every time the panel is laid out (open Preferences, switch tabs, expose). The 140 px hint on the bandwidth caps was originally widened from 100 px in amule-project#463 to fit million-kB/s values; the new width itself isn't too narrow, but combining an explicit wxSize with the column's sizer constraints still leaves GTK's internal layout pass unhappy. Same family as amule-project#569 / 82626f2 on the search dialog, just on the Preferences side. Fix: drop the explicit width to wxDefaultSize on all six and let the layout engine pick. macOS / Windows already render side-by-side spin buttons that fit comfortably in the default; GTK gets the larger geometry it needs for stacked arrows. The label / unit text on either side of each spin keeps its own sizer flags, so the row overall still flows the same. Reported in amule-project#737 (Diego Heras), verified on amule-dev-vm with the fixed AppImage — no more Gtk-CRITICAL SpinButton warnings on Preferences open or tab switch. The Gtk-CRITICAL GtkScrollbar variant @ngosang also reported is a separate widget family (likely a wxScrolledWindow / wxListBox sub-widget), tracking that independently of this PR.
5 tasks
mrjimenez
pushed a commit
that referenced
this pull request
May 27, 2026
Six SpinCtrls in the Preferences dialog were pinned to widths
that fall below GtkSpinButton's intrinsic minimum on wxGTK 3.2 /
GTK3:
IDC_TOOLTIPDELAY wxSize(40, -1) General tab
IDC_SERVERRETRIES wxSize(40, -1) Server tab
IDC_OSUPDATE wxSize(60, -1) Online Signature tab
IDC_MAXDOWN wxSize(140, -1) Connection tab (Bandwidth limits)
IDC_MAXUP wxSize(140, -1) Connection tab (Bandwidth limits)
IDC_SLOTALLOC wxSize(140, -1) Connection tab (Bandwidth limits)
GTK3's GtkSpinButton is a composite widget (entry + stacked up/down
arrows). The internal box gadget needs ~80 px just to fit the entry
+ arrow column at the default theme; combined with the surrounding
wxFlexGridSizer / wxBoxSizer's tight allocation, forcing a smaller
or even an explicit "we know what we want" wx-side hint shoves the
entry's allocation below zero, which triggers
Gtk-CRITICAL: gtk_box_gadget_distribute:
assertion 'size >= 0' failed in GtkSpinButton
every time the panel is laid out (open Preferences, switch tabs,
expose). The 140 px hint on the bandwidth caps was originally widened
from 100 px in #463 to fit million-kB/s values; the new width itself
isn't too narrow, but combining an explicit wxSize with the column's
sizer constraints still leaves GTK's internal layout pass unhappy.
Same family as #569 / 82626f2 on the search dialog, just on the
Preferences side.
Fix: drop the explicit width to wxDefaultSize on all six and let
the layout engine pick. macOS / Windows already render side-by-side
spin buttons that fit comfortably in the default; GTK gets the
larger geometry it needs for stacked arrows. The label / unit text
on either side of each spin keeps its own sizer flags, so the row
overall still flows the same.
Reported in #737 (Diego Heras), verified on amule-dev-vm with the
fixed AppImage — no more Gtk-CRITICAL SpinButton warnings on
Preferences open or tab switch.
The Gtk-CRITICAL GtkScrollbar variant @ngosang also reported is a
separate widget family (likely a wxScrolledWindow / wxListBox
sub-widget), tracking that independently of this PR.
got3nks
added a commit
to got3nks/amule
that referenced
this pull request
Jul 24, 2026
…mule-project#570) The log views migrated to wxStyledTextCtrl (Scintilla) in amule-project#548 paint their colours from the system theme once, in the constructor. The native wxTextCtrl they replaced followed the platform appearance automatically; Scintilla does not, so a live light/dark switch left the three log panes (aMule Log, aMuleGUI Log, Server Info) stuck in the previous theme's colours while the rest of the UI re-themed. Re-apply the styles on wxEVT_SYS_COLOUR_CHANGED so the panes track the appearance. Also guard against a foreground/background that resolve with too little contrast to read: on macOS the window/text system colours are appearance-aware and, on some wx builds, come back near-identical, which paints the whole log invisible (amule-project#569). When the pair is unreadable, keep the theme's background and force a legible foreground from its brightness. Windows/GTK return static, well-contrasted colours and are unaffected.
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.
Closes #568.
The Extension text control on the search dialog was created with
wxSize(40, 10), pinning the widget's best-size to 10 pixels of height. On Debian-stable Mate and Ubuntu 24.04 (both wxGTK 3.2 / GTK3), the surroundingwxFlexGridSizerhonours that explicit height even withExpand(), so the field renders as a 10-px sliver — visually a green dash with no room for any glyph. Reported on the Debian/Mate stack and confirmed on Ubuntu 24.04.Replace the hard-coded geometry with
wxSize(60, -1):muuli_wdr.cpp:255,:274), so the visual rhythm of the row is preserved-1for height lets wx pick the platform-default text-control height — the sizer'sExpand().CenterVertical()flag then takes overThe original
wxSize(40, 10)has been in tree since at least commitb4d6021d9(pre-CMake era). Older wx/GTK silently absorbed it viaExpand(); wx 3.2 + GTK3 honour it strictly, exposing the latent bug.Tested locally on macOS — the field now renders as a normal text input matching the Min/Max-size widths.