Open chwdt opened 7 years ago
chwdt,
tactics_pi is a fork of dahboard_pi, I want to keep both in synch as much as possible, I will merge your pull request as soon as it is merged in dashboard.
Thomas
Did you, Petri or TDan fix this with the changes to wind history?
Rick, no I didn't do it yet. I'm compiling under Windows, and it's linux related, I can't even test it. Before I destroy the whole plugin, I decided to wait for dashboard_pi to merge it. I still see tactics as a fork of dashboard, and I try to keep at least the basic framework in sync... I introduce all dashboard changes into tactics anyway (manually). As I haven't seen it being merged into dashboard these days I also didn't merge into tactics ... Thomas
There is indeed quite a few Draw(wxGCDC* dc); type of stuff here and there, in my dashboard_tactics_pi even more than in tactics_pi. But I have not seen any difference in Linux (albeit a small screen device) and nobody has complained. Like Thomas, I would say that if it is not fixed in Dashboard, we should not implement this change before users are reporting about an issue caused by it.
Well, what he says seems to make sense when I read it.
Has anyone else experienced this with high resolution displays? - We do not know. Can the problem be replicated? How? (High res display) -But we do not know. Has the Opencpn Program team been advised? Yes, I made an Issue for this and listed. So we'll wait and see.
Inside OnPaint we get a wxBufferedPaintDC(this) and create a wxGCDC from it. The wxGCDC has a constructor from wxMemoryDC, which is used in this case. The constructor does not set m_window inside the underlaying wxDCImpl.
Inside GetSize methods we use a wxClientDC(this) to do dc.GetTextExtent(). The wxClientDC has a window associated to itself.
When running on a GTK display with high PPI configured to use a custom DPI setting for fonts, the above leads to large sizes returned from GetSize(), but only small text drawn from the actual Draw() routines.
Using wxDC instead of wxGCDC preserves the associated window in the wxBufferedPaintDC, so GetSize() and Draw() use the same font sizes.
I have sent the same pull request to OpenCPN with changes against dashboard_pi.