From 008aecde67e4d5b52e85baf39717807f2bc078e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ed=C3=AAnis=20Freindorfer=20Azevedo?= Date: Fri, 28 Feb 2020 00:03:33 -0300 Subject: [PATCH] [LINUX] Fix display of `RGB` values on viewers. The flag `wxST_NO_AUTORESIZE` does not behave well on our viewers. They were being hidden due to not fitting the text box available. On Windows, they were working as expected. It is unknown on MacOs. --- src/wx/viewsupt.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/wx/viewsupt.cpp b/src/wx/viewsupt.cpp index 422f9b52..3ea9b88b 100644 --- a/src/wx/viewsupt.cpp +++ b/src/wx/viewsupt.cpp @@ -776,17 +776,29 @@ ColorView::ColorView(wxWindow* parent, wxWindowID id) wxStaticText* lab = new wxStaticText(this, wxID_ANY, _("R:")); gs->Add(lab, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); rt = new wxStaticText(this, wxID_ANY, wxT("255"), wxDefaultPosition, +#if !defined(__WXGTK__) wxDefaultSize, wxST_NO_AUTORESIZE); +#else + wxDefaultSize, wxALIGN_CENTRE_HORIZONTAL); +#endif // !defined(__WXGTK__) gs->Add(rt, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); lab = new wxStaticText(this, wxID_ANY, _("G:")); gs->Add(lab, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); gt = new wxStaticText(this, wxID_ANY, wxT("255"), wxDefaultPosition, +#if !defined(__WXGTK__) wxDefaultSize, wxST_NO_AUTORESIZE); +#else + wxDefaultSize, wxALIGN_CENTRE_HORIZONTAL); +#endif // !defined(__WXGTK__) gs->Add(gt, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); lab = new wxStaticText(this, wxID_ANY, _("B:")); gs->Add(lab, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); bt = new wxStaticText(this, wxID_ANY, wxT("255"), wxDefaultPosition, +#if !defined(__WXGTK__) wxDefaultSize, wxST_NO_AUTORESIZE); +#else + wxDefaultSize, wxALIGN_CENTRE_HORIZONTAL); +#endif // !defined(__WXGTK__) gs->Add(bt, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); sz->Add(gs); sz->Layout();