Skip to content
Snippets Groups Projects
Commit b9c36be5 authored by Martin Bauer's avatar Martin Bauer
Browse files

GUI: changed size parameters for better display of PDFs

parent 6ea4987e
No related merge requests found
...@@ -95,8 +95,8 @@ namespace gui { ...@@ -95,8 +95,8 @@ namespace gui {
// Paint arrows // Paint arrows
p->save(); p->save();
p->setPen(QPen(QColor(0,108,255), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); p->setPen(QPen(QColor(145,192,255), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
p->setBrush(QColor(0,108,255)); p->setBrush(QColor(145,192,255));
for ( auto d = stencil::D2Q9::begin(); d != stencil::D2Q9::end(); ++d ) for ( auto d = stencil::D2Q9::begin(); d != stencil::D2Q9::end(); ++d )
{ {
const double dx = d.cx() * 0.9; const double dx = d.cx() * 0.9;
...@@ -124,12 +124,12 @@ namespace gui { ...@@ -124,12 +124,12 @@ namespace gui {
QPointF dst = QPointF( dx * halfCellSize, - dy * halfCellSize); QPointF dst = QPointF( dx * halfCellSize, - dy * halfCellSize);
QFont f = p->font(); QFont f = p->font();
f.setPixelSize(2); f.setPixelSize(5);
p->setFont(f); p->setFont(f);
QFontMetrics fontMetrics = p->fontMetrics(); QFontMetrics fontMetrics = p->fontMetrics();
QPointF textPos = cellMidPoint + 0.8 * dst; QPointF textPos = cellMidPoint + 0.8 * dst;
QString s = QString("%1").arg(val,0,'e',9); QString s = QString("%1").arg(val);
textPos.setX(textPos.x() - 0.5 * fontMetrics.width(s)); textPos.setX(textPos.x() - 0.5 * fontMetrics.width(s));
p->drawText(textPos,s); p->drawText(textPos,s);
} }
......
...@@ -164,7 +164,7 @@ namespace gui { ...@@ -164,7 +164,7 @@ namespace gui {
translateVec[ uint_c(slice.sliceDimension) ] = slice.position - 0.5; translateVec[ uint_c(slice.sliceDimension) ] = slice.position - 0.5;
painter->modelViewMatrix().translate( translateVec[0], translateVec[1], translateVec[2] ); painter->modelViewMatrix().translate( translateVec[0], translateVec[1], translateVec[2] );
Vector3<double> scaleVec ( 1.1, 1.1, 1.1 ); Vector3<double> scaleVec ( 1.35, 1.35, 1.35 );
scaleVec[ uint_c(slice.sliceDimension) ] = 0.01; scaleVec[ uint_c(slice.sliceDimension) ] = 0.01;
painter->modelViewMatrix().scale( scaleVec[0], scaleVec[1], scaleVec[2] ); painter->modelViewMatrix().scale( scaleVec[0], scaleVec[1], scaleVec[2] );
mesh_->draw( painter ); mesh_->draw( painter );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment