Added: High DPI support for the Configuration Editor. Icons and proportions should look better now when DPI scaling is used.
Improved: Updated Qt to version 5.7 Fixed: The GUI for the Channel command was showing the wrong channels as selected when channel numbers were used instead of names.
This commit is contained in:
1 parent
fb8d573fba
commit
3d8ef28d1b
112 files changed
+779
-212
No files matched your search
@@ -20,6 +20,7 @@
|
||||
#include <QGraphicsScene>
|
||||
#include <QPainter>
|
||||
|
||||
#include "Editor/helpers/DPIHelper.h"
|
||||
#include "ChannelGraphItem.h"
|
||||
|
||||
static const float margin = 5;
|
||||
@@ -43,8 +44,8 @@ QRectF ChannelGraphItem::boundingRect() const
|
||||
// shift by 0.5 to have sharp lines
|
||||
cachedRect.setLeft(0.5);
|
||||
cachedRect.setTop(0.5);
|
||||
cachedRect.setWidth(width + 2 * margin);
|
||||
cachedRect.setHeight(height + 2 * margin);
|
||||
cachedRect.setWidth(width + 2 * DPIHelper::scale(margin));
|
||||
cachedRect.setHeight(height + 2 * DPIHelper::scale(margin));
|
||||
}
|
||||
|
||||
return cachedRect;
|
||||
@@ -62,6 +63,6 @@ void ChannelGraphItem::paint(QPainter* painter, QColor color)
|
||||
gradient.setColorAt(0, QColor(255, 255, 255));
|
||||
gradient.setColorAt(1, color);
|
||||
painter->setBrush(gradient);
|
||||
painter->drawRoundedRect(rect, margin, margin);
|
||||
painter->drawRoundedRect(rect, DPIHelper::scale(margin), DPIHelper::scale(margin));
|
||||
painter->drawText(rect.translated(1, -1), Qt::AlignCenter, name);
|
||||
}
|
||||
Reference in new issue
Block a user