diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-09-16 08:49:12 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-09-16 09:07:12 +0300 |
commit | cff52478831a7653514fb382c27db0faba395c7c (patch) | |
tree | e1c2b546cf19ba1836bbb6fcd53f51b3945420d9 /src/datavisualization | |
parent | 2f9fe2d24df97f1bffca578d6a97c9c7e603440c (diff) |
Slice view uses highlight colors for bars
Change-Id: I09a36568db78edf3bd768e78dc7fc0b525efb332
Change-Id: I09a36568db78edf3bd768e78dc7fc0b525efb332
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/datavisualization')
-rw-r--r-- | src/datavisualization/engine/bars3drenderer.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/datavisualization/engine/bars3drenderer.cpp b/src/datavisualization/engine/bars3drenderer.cpp index a397647f..a08c1a20 100644 --- a/src/datavisualization/engine/bars3drenderer.cpp +++ b/src/datavisualization/engine/bars3drenderer.cpp @@ -278,16 +278,24 @@ void Bars3DRenderer::drawSlicedScene(const LabelItem &xLabel, MVPMatrix = projectionMatrix * viewMatrix * modelMatrix; #if 0 - QVector3D baseColor = Utils::vectorFromColor(m_cachedTheme.m_baseColor); - QVector3D heightColor = Utils::vectorFromColor(m_cachedTheme.m_heightColor) * item->height(); + QVector3D baseColor; + if (m_selection.x() == item->position().x() && m_selection.y() == item->position().y()) + baseColor = Utils::vectorFromColor(m_cachedTheme.m_highlightBarColor); + else if (QDataVis::ModeSliceRow == m_cachedSelectionMode) + baseColor = Utils::vectorFromColor(m_cachedTheme.m_highlightRowColor); + else + baseColor = Utils::vectorFromColor(m_cachedTheme.m_highlightColumnColor); + QVector3D heightColor = Utils::vectorFromColor(m_cachedTheme.m_heightColor) * item->height(); QVector3D barColor = baseColor + heightColor; - if (m_selection.x() == item->position().x() && m_selection.y() == item->position().y()) - barColor = Utils::vectorFromColor(m_cachedTheme.m_highlightBarColor); #else - QVector3D barColor = Utils::vectorFromColor(m_cachedTheme.m_baseColor); + QVector3D barColor; if (m_selection.x() == item->position().x() && m_selection.y() == item->position().y()) barColor = Utils::vectorFromColor(m_cachedTheme.m_highlightBarColor); + else if (QDataVis::ModeSliceRow == m_cachedSelectionMode) + barColor = Utils::vectorFromColor(m_cachedTheme.m_highlightRowColor); + else + barColor = Utils::vectorFromColor(m_cachedTheme.m_highlightColumnColor); #endif if (item->height() != 0) { |