mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Center the test signal #97
This commit is contained in:
@@ -89,7 +89,6 @@ private slots:
|
||||
void openRecentFile();
|
||||
void clearRecentFileList();
|
||||
void openRecentVideo();
|
||||
//void quitMapMap();
|
||||
// Edit menu.
|
||||
void deleteItem();
|
||||
// Context menu for mappings.
|
||||
|
||||
+7
-1
@@ -89,8 +89,14 @@ void OutputGLCanvas::_drawTestSignal(QPainter* painter)
|
||||
}
|
||||
}
|
||||
|
||||
// Create responsive image
|
||||
QImage test_signal = _svg_test_signal.scaled(geo.height(), geo.height(), Qt::KeepAspectRatio);
|
||||
// Set new brush
|
||||
this->_brush_test_signal = QBrush(test_signal);
|
||||
// Center the brush
|
||||
painter->translate((geo.width() - test_signal.width()) / 2, (geo.height() - test_signal.height()) / 2);
|
||||
// Draw the actual brush.
|
||||
painter->fillRect(geo, this->_brush_test_signal);
|
||||
painter->fillRect(0, 0, test_signal.width(), test_signal.height(), this->_brush_test_signal);
|
||||
}
|
||||
|
||||
void OutputGLCanvas::resizeGL(int width, int height)
|
||||
|
||||
Reference in New Issue
Block a user