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:
jthedering committed 2016-07-09 11:07:21 +00:00
1 parent fb8d573fba
commit 3d8ef28d1b
112 files changed
+779 -212

No files matched your search

+8 -1
View File
@@ -19,13 +19,20 @@
#include <QMouseEvent>
#include "Editor/helpers/DPIHelper.h"
#include "ResizeCorner.h"
ResizeCorner::ResizeCorner(FilterTable* filterTable, QSize minimumSize, QSize maximumSize, std::function<QSize()> getFunc, std::function<void(QSize)> setFunc, QWidget* parent)
: QLabel(parent), minimumSize(minimumSize), maximumSize(maximumSize), getFunc(getFunc), setFunc(setFunc), filterTable(filterTable)
{
setPixmap(QPixmap(":/icons/resize_corner.png"));
QIcon icon(":/icons/resize_corner.ico");
QSize desiredSize = DPIHelper::scale(QSize(16, 16));
QSize actualSize = icon.actualSize(desiredSize);
QPixmap pixmap = icon.pixmap(actualSize);
setPixmap(pixmap);
setCursor(Qt::SizeFDiagCursor);
// move icon to lower right if it does not fill the full area
setContentsMargins(desiredSize.width() - actualSize.width(), desiredSize.height() - actualSize.height(), 0, 0);
}
void ResizeCorner::mousePressEvent(QMouseEvent* event)