Skip to content

Commit 82626f2

Browse files
got3nksmrjimenez
authored andcommitted
search dialog: fix clipped Min/Max Size + Availability spin controls 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.
1 parent 2971761 commit 82626f2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/muuli_wdr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ wxSizer *searchDlg( wxWindow *parent, bool call_fit, bool set_sizer )
252252
item13->Add( item22, wxSizerFlags().CenterVertical().Border(wxALL, 5) );
253253
wxBoxSizer *item23 = new wxBoxSizer( wxHORIZONTAL );
254254

255-
wxSpinCtrl *item24 = new wxSpinCtrl( parent, IDC_SPINSEARCHMIN, "0", wxDefaultPosition, wxSize(60,-1), 0, 0, 4096, 0 );
255+
wxSpinCtrl *item24 = new wxSpinCtrl( parent, IDC_SPINSEARCHMIN, "0", wxDefaultPosition, wxDefaultSize, 0, 0, 4096, 0 );
256256
item23->Add( item24, wxSizerFlags().Expand().CenterVertical().Border(wxALL, 5) );
257257
wxString strs25[] =
258258
{
@@ -271,7 +271,7 @@ wxSizer *searchDlg( wxWindow *parent, bool call_fit, bool set_sizer )
271271
item13->Add( item27, wxSizerFlags().CenterVertical().Border(wxALL, 5) );
272272
wxBoxSizer *item28 = new wxBoxSizer( wxHORIZONTAL );
273273

274-
wxSpinCtrl *item29 = new wxSpinCtrl( parent, IDC_SPINSEARCHMAX, "0", wxDefaultPosition, wxSize(60,-1), 0, 0, 4096, 0 );
274+
wxSpinCtrl *item29 = new wxSpinCtrl( parent, IDC_SPINSEARCHMAX, "0", wxDefaultPosition, wxDefaultSize, 0, 0, 4096, 0 );
275275
item28->Add( item29, wxSizerFlags().Expand().CenterVertical().Border(wxALL, 5) );
276276
wxString strs30[] =
277277
{
@@ -288,7 +288,7 @@ wxSizer *searchDlg( wxWindow *parent, bool call_fit, bool set_sizer )
288288
item13->Add( item31, wxSizerFlags().Center().Border(wxALL, 5) );
289289
wxStaticText *item32 = new wxStaticText( parent, -1, _("Availability"), wxDefaultPosition, wxDefaultSize, 0 );
290290
item13->Add( item32, wxSizerFlags().CenterVertical().Border(wxALL, 5) );
291-
wxSpinCtrl *item33 = new wxSpinCtrl( parent, IDC_SPINSEARCHAVAIBILITY, "0", wxDefaultPosition, wxSize(45,-1), 0, 0, 1000, 0 );
291+
wxSpinCtrl *item33 = new wxSpinCtrl( parent, IDC_SPINSEARCHAVAIBILITY, "0", wxDefaultPosition, wxDefaultSize, 0, 0, 1000, 0 );
292292
item13->Add( item33, wxSizerFlags().Expand().CenterVertical().Border(wxALL, 5) );
293293
item1->Add( item13, 0, wxALIGN_CENTER, 5 );
294294

0 commit comments

Comments
 (0)