Skip to content

Commit

Permalink
make wxSpinCtrl width on GTK3 at least 80px
Browse files Browse the repository at this point in the history
  • Loading branch information
wojdyr committed Mar 14, 2021
1 parent 7c7c28e commit d981589
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
$CXX --version
cmake --version
cmake . -DDOWNLOAD_XYLIB=OFF -DDOWNLOAD_LUA=OFF -DDOWNLOAD_ZLIB=OFF
make
make VERBOSE=1
sudo make install
- name: test
run: |
Expand Down
2 changes: 1 addition & 1 deletion wxgui/cmn.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ inline wxSpinCtrl* make_wxspinctrl(wxWindow* parent, wxWindowID id, int val,
int min, int max, int width=50)
{
#ifdef __WXGTK3__
width += 30;
width = std::max(width, 50) + 30;
#endif
return new wxSpinCtrl (parent, id, wxString::Format(wxT("%i"), val),
wxDefaultPosition, wxSize(width, -1),
Expand Down
2 changes: 1 addition & 1 deletion wxgui/statbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ ConfStatBarDlg::ConfStatBarDlg(wxWindow* parent, wxWindowID id, FStatusBar* sb_)

gsizer->Add(new wxStaticText(this, -1,wxT("precision")),
wxSizerFlags().Align(wxALIGN_CENTRE_VERTICAL|wxALIGN_RIGHT));
e_prec_sc = make_wxspinctrl(this, -1, sb->e_prec, 0, 9, 40);
e_prec_sc = make_wxspinctrl(this, -1, sb->e_prec, 0, 9);
gsizer->Add(e_prec_sc, wxSizerFlags().Align(wxALIGN_CENTRE_VERTICAL));

f_sizer->Add(gsizer, wxSizerFlags(1).Expand().Border());
Expand Down

0 comments on commit d981589

Please sign in to comment.