ModelEditor: Fix toolbar icon rendering on HDPI screens

Some high DPI icons are still missing. But icons rendered from
stereotype definitions get the correct size and look much better.

Change-Id: Iabd8283e9bd0ae7e074471a065d009ac5c5836cc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Jochen Becher
2017-12-28 22:04:45 +01:00
parent 09bdb4f8cd
commit b567a080e2
5 changed files with 9 additions and 11 deletions

View File

@@ -1063,7 +1063,7 @@ void ModelEditor::initToolbars()
const qmt::Style *style = documentController->styleController()->adaptStyle(styleEngineElementType);
icon = stereotypeController->createIcon(
stereotypeIconElement, QStringList() << tool.m_stereotype,
QString(), style, QSize(48, 48), QMarginsF(3.0, 2.0, 3.0, 4.0));
QString(), style, QSize(256, 256), QMarginsF(12.0, 8.0, 12.0, 16.0), 16.0);
if (!icon.isNull()) {
QString stereotypeIconId = stereotypeController->findStereotypeIconId(
stereotypeIconElement, QStringList() << tool.m_stereotype);