#2478 Add top edge axis (intersection View) and repositioned info box and legends to follow.

This commit is contained in:
Jacob Støren
2018-03-07 12:47:48 +01:00
parent 0083ecdf6a
commit df0a356a0a
3 changed files with 66 additions and 49 deletions

View File

@@ -347,22 +347,17 @@ void RiuViewer::setEnableMask(unsigned int mask)
//--------------------------------------------------------------------------------------------------
void RiuViewer::paintOverlayItems(QPainter* painter)
{
// No support for overlay items using SW rendering yet.
//if (!isShadersSupported())
//{
// return;
//}
int columnWidth = 200;
int edgeAxisFrameBorderWidth = m_showWindowEdgeAxes ? m_windowEdgeAxisOverlay->frameBorderWidth(): 0;
int edgeAxisFrameBorderHeight = m_showWindowEdgeAxes ? m_windowEdgeAxisOverlay->frameBorderHeight(): 0;
int margin = 5;
int yPos = margin;
int yPos = margin + edgeAxisFrameBorderHeight;
bool showAnimBar = false;
if (isAnimationActive() && frameCount() > 1) showAnimBar = true;
//if (showAnimBar) columnWidth = CVF_MAX(columnWidth, m_animationProgress->width());
if (m_showInfoText) columnWidth = CVF_MAX(columnWidth, m_infoLabel->sizeHint().width());
int columnPos = this->width() - columnWidth - margin - edgeAxisFrameBorderWidth;
@@ -598,7 +593,7 @@ void RiuViewer::addColorLegendToBottomLeftCorner(cvf::OverlayItem* legend)
for (auto catLegend : categoryLegends)
{
catLegend->setLayoutFixedPosition(cvf::Vec2i(xPos, yPos));
catLegend->setSizeHint(cvf::Vec2ui(categoryWidth, height - 2*border - axisCrossHeight - edgeAxisBorderHeight));
catLegend->setSizeHint(cvf::Vec2ui(categoryWidth, height - 2*border - axisCrossHeight - 2*edgeAxisBorderHeight));
xPos += categoryWidth + border;
}