forked from vslavik/poedit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed layout of preferences/advanced under GTK
The height of wxChoice has been increased for the selection of line endings and also the width of the wxSpinCtrl for the wrap at value. Otherwise these settings are often not fully visible and can be difficult to set, depending on the environment
- Loading branch information
Showing
1 changed file
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -898,7 +898,12 @@ class AdvancedPageWindow : public PrefsPanel | |
auto crlfbox = new wxBoxSizer(wxHORIZONTAL); | ||
sizer->Add(crlfbox, wxSizerFlags().Expand().PXBorder(wxTOP)); | ||
crlfbox->Add(new wxStaticText(this, wxID_ANY, _("Line endings:")), wxSizerFlags().Center().BORDER_WIN(wxTOP, PX(1))); | ||
#if defined(__WXGTK__) | ||
// Make the height of wxChoice slightly larger under GTK | ||
m_crlf = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1,PX(34))); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
#else | ||
m_crlf = new wxChoice(this, wxID_ANY); | ||
#endif | ||
m_crlf->Append(_("Unix (recommended)")); | ||
m_crlf->Append(_("Windows")); | ||
crlfbox->Add(m_crlf, wxSizerFlags(1).Center().BORDER_OSX(wxLEFT, PX(3)).BORDER_WIN(wxLEFT, PX(5))); | ||
|
@@ -907,7 +912,12 @@ class AdvancedPageWindow : public PrefsPanel | |
m_wrap = new wxCheckBox(this, wxID_ANY, _("Wrap at:")); | ||
crlfbox->AddSpacer(PX(10)); | ||
crlfbox->Add(m_wrap, wxSizerFlags().Center().BORDER_WIN(wxTOP, PX(1))); | ||
#if defined(__WXGTK__) | ||
// Make the width of wxSpinCtrl larger under GTK | ||
m_wrapWidth = new wxSpinCtrl(this, wxID_ANY, "", wxDefaultPosition, wxSize(PX(120),-1)); | ||
This comment has been minimized.
Sorry, something went wrong.
vslavik
|
||
#else | ||
m_wrapWidth = new wxSpinCtrl(this, wxID_ANY, "", wxDefaultPosition, wxSize(PX(50),-1)); | ||
#endif | ||
m_wrapWidth->SetRange(10, 1000); | ||
crlfbox->Add(m_wrapWidth, wxSizerFlags().Center().BORDER_OSX(wxLEFT, PX(3))); | ||
|
||
|
This is a wrong thing to do, even for GTK+. The height is theme dependent, possibly version dependent, almost certainly GTK+ 2 vs 3 dependent, and user code should never hardcode it like this, in either GTK+ or wx.
This looks like a bug in wxGTK to me. It’s support for GTK+ 3 is still rough around the edges, especially on the 3.0 branch, but improvements are being made, and IIRC I’e seen something related.
It’s worth trying to build against the very latest wxGTK from git (
WX_3_0_BRANCH
) as well as gitmaster
, to see if the bug is fixed.