@@ -926,23 +926,44 void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced) | |||
|
926 | 926 | |
|
927 | 927 | bool axisX = m_orientation == Qt::Horizontal; |
|
928 | 928 | |
|
929 | if (m_arrowVisible) { | |
|
930 | ||
|
931 | if (forced || brush == m_labelsBrush){ | |
|
932 | q_ptr->setLabelsBrush(theme->labelBrush()); | |
|
929 | //TODO: introduce axis brush | |
|
930 | if (m_visible) { | |
|
931 | if (m_arrowVisible) { | |
|
932 | if (forced || pen == m_axisPen) { | |
|
933 | q_ptr->setLinePen(theme->axisLinePen()); | |
|
934 | } | |
|
933 | 935 | } |
|
934 | //TODO: introduce axis brush | |
|
935 |
if (forced || |
|
|
936 |
q_ptr->set |
|
|
936 | if (m_gridLineVisible) { | |
|
937 | if (forced || pen == m_gridLinePen) { | |
|
938 | q_ptr->setGridLinePen(theme->girdLinePen()); | |
|
939 | } | |
|
937 | 940 | } |
|
938 |
if ( |
|
|
939 | q_ptr->setLabelsPen(Qt::NoPen);// NoPen for performance reasons | |
|
941 | if (m_labelsVisible) { | |
|
942 | if (forced || brush == m_labelsBrush){ | |
|
943 | q_ptr->setLabelsBrush(theme->labelBrush()); | |
|
944 | } | |
|
945 | if (forced || pen == m_labelsPen){ | |
|
946 | q_ptr->setLabelsPen(Qt::NoPen);// NoPen for performance reasons | |
|
947 | } | |
|
948 | if (forced || font == m_labelsFont){ | |
|
949 | q_ptr->setLabelsFont(theme->labelFont()); | |
|
950 | } | |
|
940 | 951 | } |
|
941 |
if ( |
|
|
942 | q_ptr->setTitlePen(Qt::NoPen);// Noen for performance reasons | |
|
952 | if (m_titleVisible) { | |
|
953 | if (forced || brush == m_titleBrush){ | |
|
954 | q_ptr->setTitleBrush(theme->labelBrush()); | |
|
955 | } | |
|
956 | if (forced || pen == m_titlePen){ | |
|
957 | q_ptr->setTitlePen(Qt::NoPen);// Noen for performance reasons | |
|
958 | } | |
|
959 | //TODO: discuss with Tero | |
|
960 | if (forced || font == m_titleFont){ | |
|
961 | QFont font(m_labelsFont); | |
|
962 | font.setBold(true); | |
|
963 | q_ptr->setTitleFont(font); | |
|
964 | } | |
|
943 | 965 | } |
|
944 | 966 | if (forced || m_shadesVisible) { |
|
945 | ||
|
946 | 967 | if (forced || brush == m_shadesBrush){ |
|
947 | 968 | q_ptr->setShadesBrush(theme->backgroundShadesBrush()); |
|
948 | 969 | } |
@@ -952,27 +973,9 void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced) | |||
|
952 | 973 | if (forced && (theme->backgroundShades() == ChartTheme::BackgroundShadesBoth |
|
953 | 974 | || (theme->backgroundShades() == ChartTheme::BackgroundShadesVertical && axisX) |
|
954 | 975 | || (theme->backgroundShades() == ChartTheme::BackgroundShadesHorizontal && !axisX))) { |
|
955 |
|
|
|
976 | q_ptr->setShadesVisible(true); | |
|
956 | 977 | } |
|
957 | 978 | } |
|
958 | ||
|
959 | if (forced || pen == m_axisPen) { | |
|
960 | q_ptr->setLinePen(theme->axisLinePen()); | |
|
961 | } | |
|
962 | ||
|
963 | if (forced || pen == m_gridLinePen) { | |
|
964 | q_ptr->setGridLinePen(theme->girdLinePen()); | |
|
965 | } | |
|
966 | ||
|
967 | if (forced || font == m_labelsFont){ | |
|
968 | q_ptr->setLabelsFont(theme->labelFont()); | |
|
969 | } | |
|
970 | //TODO: discuss with Tero | |
|
971 | if (forced || font == m_titleFont){ | |
|
972 | QFont font(m_labelsFont); | |
|
973 | font.setBold(true); | |
|
974 | q_ptr->setTitleFont(font); | |
|
975 | } | |
|
976 | 979 | } |
|
977 | 980 | } |
|
978 | 981 |
General Comments 0
You need to be logged in to leave comments.
Login now