Discussion:
wxGTK3-3 rendering is broken
Jan Engelhardt
2014-06-09 10:24:50 UTC
Permalink
Hi,

With wxWidgets 3.0.0 and the following snippet,

---
/* http://inai.de/files/tw.cpp */
#include <wx/wx.h>
class M : public wxFrame {
public: M(void) : wxFrame(NULL, wxID_ANY, "") {
auto hp = new wxBoxSizer(wxHORIZONTAL);
auto tx = new wxStaticText(this, wxID_ANY, "The lazy fox jumps. Def'o!");
tx->SetForegroundColour(*wxBLACK);
tx->SetFont(tx->GetFont().MakeLarger().MakeLarger().MakeBold());
hp->Add(tx);
SetSizer(hp);
hp->SetSizeHints(this);
};};
class A : public wxApp {
public: bool OnInit(void) { (new M)->Show(); return true; };
};
IMPLEMENT_APP(A);
-----

I observe “broken” rendering with the GTK3 backend of wxWidgets. See
Loading Image... for a screenshot, showing GTK2 backend
(above) and GTK3 (lower window).
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-06-09 21:33:57 UTC
Permalink
On Mon, 9 Jun 2014 12:24:50 +0200 (CEST) Jan Engelhardt wrote:

JE> With wxWidgets 3.0.0 and the following snippet,
JE>
JE> ---
JE> /* http://inai.de/files/tw.cpp */
JE> #include <wx/wx.h>
JE> class M : public wxFrame {
JE> public: M(void) : wxFrame(NULL, wxID_ANY, "") {
JE> auto hp = new wxBoxSizer(wxHORIZONTAL);
JE> auto tx = new wxStaticText(this, wxID_ANY, "The lazy fox jumps. Def'o!");
JE> tx->SetForegroundColour(*wxBLACK);
JE> tx->SetFont(tx->GetFont().MakeLarger().MakeLarger().MakeBold());
JE> hp->Add(tx);
JE> SetSizer(hp);
JE> hp->SetSizeHints(this);
JE> };};
JE> class A : public wxApp {
JE> public: bool OnInit(void) { (new M)->Show(); return true; };
JE> };
JE> IMPLEMENT_APP(A);
JE> -----
JE>
JE> I observe “broken” rendering with the GTK3 backend of wxWidgets. See
JE> http://inai.de/files/tw.png for a screenshot, showing GTK2 backend
JE> (above) and GTK3 (lower window).

Sorry, I don't know what's going on here, so please open a ticket for this
and attach your code there. I assume setting the font is necessary to see
the bug or can it be reproduced without it?

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Jan Engelhardt
2014-06-09 22:11:18 UTC
Permalink
Post by Vadim Zeitlin
JE> With wxWidgets 3.0.0 and the following snippet,
JE>
JE> ---[...]
JE>
JE> I observe “broken” rendering with the GTK3 backend of wxWidgets. See
JE> http://inai.de/files/tw.png for a screenshot, showing GTK2 backend
JE> (above) and GTK3 (lower window).
Sorry, I don't know what's going on here, so please open a ticket for this
and attach your code there. I assume setting the font is necessary to see
the bug or can it be reproduced without it?
The font is just Arial. The way I perceive it, this visual glitch may
be related to font sizes, though: if I do away with the font
modifications (MakeLarger/MakeBold) and instead let it show at the
default system size, it shows ok (naturally, with a somewhat smaller
window because the font does not require more).


Speaking of tickets, I already had registered almost a decade ago, but
don't remember the mail address assigned to the jengelh account to do
the password recovery. If perhaps that could be passed along to me in
private, that would be good.
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...