##// END OF EJS Templates
Defined point sizes for fonts
Tero Ahola -
r717:a566cfd317a8
parent child
Show More
@@ -41,7 +41,8
41 QTCOMMERCIALCHART_BEGIN_NAMESPACE
41 QTCOMMERCIALCHART_BEGIN_NAMESPACE
42
42
43 ChartTheme::ChartTheme(QChart::ChartTheme id) :
43 ChartTheme::ChartTheme(QChart::ChartTheme id) :
44 m_masterFont(QFont()),
44 m_masterFont(QFont("arial", 12)),
45 m_labelFont(QFont("arial", 10)),
45 m_titleBrush(QColor(QRgb(0x000000))),
46 m_titleBrush(QColor(QRgb(0x000000))),
46 m_axisLinePen(QPen(QRgb(0x000000))),
47 m_axisLinePen(QPen(QRgb(0x000000))),
47 m_axisLabelBrush(QColor(QRgb(0x000000))),
48 m_axisLabelBrush(QColor(QRgb(0x000000))),
@@ -227,7 +228,7 void ChartTheme::decorate(QPieSeries* series, int index, bool force)
227 }
228 }
228
229
229 if (data.m_labelFont.isThemed() || force) {
230 if (data.m_labelFont.isThemed() || force) {
230 data.m_labelFont = m_masterFont;
231 data.m_labelFont = m_labelFont;
231 data.m_labelFont.setThemed(true);
232 data.m_labelFont.setThemed(true);
232 }
233 }
233
234
@@ -291,7 +292,7 void ChartTheme::decorate(QChartAxis* axis,bool axisX, bool force)
291 }
292 }
292
293
293 if(font == axis->labelsFont() || force){
294 if(font == axis->labelsFont() || force){
294 axis->setLabelsFont(m_masterFont);
295 axis->setLabelsFont(m_labelFont);
295 }
296 }
296 }
297 }
297 }
298 }
@@ -64,6 +64,7 protected:
64 QLinearGradient m_chartBackgroundGradient;
64 QLinearGradient m_chartBackgroundGradient;
65
65
66 QFont m_masterFont;
66 QFont m_masterFont;
67 QFont m_labelFont;
67 QBrush m_titleBrush;
68 QBrush m_titleBrush;
68 QPen m_axisLinePen;
69 QPen m_axisLinePen;
69 QBrush m_axisLabelBrush;
70 QBrush m_axisLabelBrush;
@@ -23,7 +23,6 public:
23 m_chartBackgroundGradient = backgroundGradient;
23 m_chartBackgroundGradient = backgroundGradient;
24
24
25 // Axes and other
25 // Axes and other
26 m_masterFont = QFont("arial");
27 m_titleBrush = QBrush(QRgb(0xffffff));
26 m_titleBrush = QBrush(QRgb(0xffffff));
28 m_axisLinePen = QPen(QRgb(0xd6d6d6));
27 m_axisLinePen = QPen(QRgb(0xd6d6d6));
29 m_axisLinePen.setWidth(2);
28 m_axisLinePen.setWidth(2);
@@ -23,7 +23,6 public:
23 m_chartBackgroundGradient = backgroundGradient;
23 m_chartBackgroundGradient = backgroundGradient;
24
24
25 // Axes and other
25 // Axes and other
26 m_masterFont = QFont("arial");
27 m_titleBrush = QBrush(QRgb(0x404044));
26 m_titleBrush = QBrush(QRgb(0x404044));
28 m_axisLinePen = QPen(QRgb(0xd6d6d6));
27 m_axisLinePen = QPen(QRgb(0xd6d6d6));
29 m_axisLinePen.setWidth(2);
28 m_axisLinePen.setWidth(2);
@@ -23,7 +23,6 public:
23 m_chartBackgroundGradient = backgroundGradient;
23 m_chartBackgroundGradient = backgroundGradient;
24
24
25 // Axes and other
25 // Axes and other
26 m_masterFont = QFont("arial");
27 m_titleBrush = QBrush(QRgb(0x404044));
26 m_titleBrush = QBrush(QRgb(0x404044));
28 m_axisLinePen = QPen(QRgb(0xb5b0a7));
27 m_axisLinePen = QPen(QRgb(0xb5b0a7));
29 m_axisLinePen.setWidth(2);
28 m_axisLinePen.setWidth(2);
@@ -23,7 +23,6 public:
23 m_chartBackgroundGradient = backgroundGradient;
23 m_chartBackgroundGradient = backgroundGradient;
24
24
25 // Axes and other
25 // Axes and other
26 m_masterFont = QFont("arial");
27 m_titleBrush = QBrush(QRgb(0xffffff));
26 m_titleBrush = QBrush(QRgb(0xffffff));
28 m_axisLinePen = QPen(QRgb(0x86878c));
27 m_axisLinePen = QPen(QRgb(0x86878c));
29 m_axisLinePen.setWidth(2);
28 m_axisLinePen.setWidth(2);
@@ -63,7 +63,6 public:
63 GetGValue(colorWindow),
63 GetGValue(colorWindow),
64 GetBValue(colorWindow)));
64 GetBValue(colorWindow)));
65 // Axes and other
65 // Axes and other
66 m_masterFont = QFont("arial");
67 m_axisLinePen = QPen(0xd6d6d6);
66 m_axisLinePen = QPen(0xd6d6d6);
68 m_axisLinePen.setWidth(1);
67 m_axisLinePen.setWidth(1);
69 m_axisLabelBrush = QBrush(QRgb(0x404044));
68 m_axisLabelBrush = QBrush(QRgb(0x404044));
@@ -87,7 +86,6 public:
87 m_chartBackgroundGradient = backgroundGradient;
86 m_chartBackgroundGradient = backgroundGradient;
88
87
89 // Axes and other
88 // Axes and other
90 m_masterFont = QFont("arial");
91 m_axisLinePen = QPen(0xd6d6d6);
89 m_axisLinePen = QPen(0xd6d6d6);
92 m_axisLinePen.setWidth(1);
90 m_axisLinePen.setWidth(1);
93 m_axisLabelBrush = QBrush(QRgb(0x404044));
91 m_axisLabelBrush = QBrush(QRgb(0x404044));
@@ -111,7 +109,6 public:
111 m_chartBackgroundGradient = backgroundGradient;
109 m_chartBackgroundGradient = backgroundGradient;
112
110
113 // Axes and other
111 // Axes and other
114 m_masterFont = QFont("arial");
115 m_axisLinePen = QPen(0xd6d6d6);
112 m_axisLinePen = QPen(0xd6d6d6);
116 m_axisLinePen.setWidth(1);
113 m_axisLinePen.setWidth(1);
117 m_axisLabelBrush = QBrush(QRgb(0x404044));
114 m_axisLabelBrush = QBrush(QRgb(0x404044));
@@ -135,7 +132,6 public:
135 m_chartBackgroundGradient = backgroundGradient;
132 m_chartBackgroundGradient = backgroundGradient;
136
133
137 // Axes and other
134 // Axes and other
138 m_masterFont = QFont("arial");
139 m_axisLinePen = QPen(0xd6d6d6);
135 m_axisLinePen = QPen(0xd6d6d6);
140 m_axisLinePen.setWidth(1);
136 m_axisLinePen.setWidth(1);
141 m_axisLabelBrush = QBrush(QRgb(0x404044));
137 m_axisLabelBrush = QBrush(QRgb(0x404044));
@@ -23,7 +23,6 public:
23 m_chartBackgroundGradient = backgroundGradient;
23 m_chartBackgroundGradient = backgroundGradient;
24
24
25 // Axes and other
25 // Axes and other
26 m_masterFont = QFont("arial");
27 m_axisLinePen = QPen(0xd6d6d6);
26 m_axisLinePen = QPen(0xd6d6d6);
28 m_axisLinePen.setWidth(1);
27 m_axisLinePen.setWidth(1);
29 m_axisLabelBrush = QBrush(QRgb(0x404044));
28 m_axisLabelBrush = QBrush(QRgb(0x404044));
General Comments 0
You need to be logged in to leave comments. Login now