summaryrefslogtreecommitdiff
path: root/wx+/graph.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:48 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:48 +0200
commitee1c8c5c25d25dfa42120125a8a45dc9831ee412 (patch)
tree67aa287157db954e0cadeee05b4aad331eb2ecf2 /wx+/graph.cpp
parent5.13 (diff)
downloadFreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.tar.gz
FreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.tar.bz2
FreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.zip
5.14
Diffstat (limited to 'wx+/graph.cpp')
-rw-r--r--wx+/graph.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/wx+/graph.cpp b/wx+/graph.cpp
index 540f86a5..0d14ae69 100644
--- a/wx+/graph.cpp
+++ b/wx+/graph.cpp
@@ -131,7 +131,6 @@ void drawXLabel(wxDC& dc, double xMin, double xMax, int blockCount, const Conver
wxDCPenChanger dummy(dc, wxPen(wxColor(192, 192, 192))); //light grey
wxDCTextColourChanger dummy2(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); //use user setting for labels
- dc.SetFont(wxFont(wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, L"Arial"));
const double valRangePerBlock = (xMax - xMin) / blockCount;
@@ -160,7 +159,6 @@ void drawYLabel(wxDC& dc, double yMin, double yMax, int blockCount, const Conver
wxDCPenChanger dummy(dc, wxPen(wxColor(192, 192, 192))); //light grey
wxDCTextColourChanger dummy2(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); //use user setting for labels
- dc.SetFont(wxFont(wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, L"Arial"));
const double valRangePerBlock = (yMax - yMin) / blockCount;
@@ -304,6 +302,9 @@ void Graph2D::render(wxDC& dc) const
{
using namespace numeric;
+ //set label font right at the start so that it is considered by wxDC::GetTextExtent below!
+ dc.SetFont(wxFont(wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, L"Arial"));
+
const wxRect clientRect = GetClientRect(); //DON'T use wxDC::GetSize()! DC may be larger than visible area!
{
//clear complete client area; set label background color
bgstack15