Skip to content

Commit 3366127

Browse files
committed
Retina display support
1 parent 7b6d1e9 commit 3366127

File tree

8 files changed

+271
-37
lines changed

8 files changed

+271
-37
lines changed

Info.plist

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@
7272
<key>CFBundleSignature</key>
7373
<string>INNX</string>
7474
<key>CFBundleVersion</key>
75-
<string>0.9.15</string>
75+
<string>0.9.16</string>
76+
<key>NSPrincipalClass</key>
77+
<string>NSApplication</string>
78+
<key>NSHighResolutionCapable</key>
79+
<string>True</string>
7680
</dict>
7781
</plist>

gui/uiinspector.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ UiInspector::UiInspector(QWidget *parent) :
3131
slidersLock = false;
3232
toolbarButton = 0;
3333
lastTabBeforeRessources = 0;
34+
mouseDisplay = false;
3435

3536
Help::syncHelpWith(ui->positionX, COMMAND_POS_X);
3637
Help::syncHelpWith(ui->positionY, COMMAND_POS_Y);
@@ -429,13 +430,16 @@ void UiInspector::actionMessages() {
429430
}
430431

431432
void UiInspector::setMousePos(const NxPoint & pos) {
432-
ui->mouseLabel->setText(tr("MOUSE:") + QString(" %1 s. / %2 s.").arg(pos.x(), 0, 'f', 3).arg(pos.y(), 0, 'f', 3));
433+
mousePos = tr("MOUSE:") + QString(" %1 s. / %2 s.").arg(pos.x(), 0, 'f', 3).arg(pos.y(), 0, 'f', 3);
434+
mouseDisplay = true;
433435
}
434436
void UiInspector::setMouseZoom(qreal zoom) {
435-
ui->zoomLabel->setText(tr("ZOOM:") + QString(" %1%").arg(zoom, 0, 'f', 1));
437+
mouseZoom = tr("ZOOM:") + QString(" %1%").arg(zoom, 0, 'f', 1);
438+
mouseDisplay = true;
436439
}
437440
void UiInspector:: setRotationAngles(const NxPoint &angles) {
438-
ui->rotationLabel->setText(tr("ANGLES:") + QString(" %1° / %2°").arg(angles.y(), 0, 'f', 3).arg(angles.z(), 0, 'f', 3));
441+
rotationAngles = tr("ANGLES:") + QString(" %1° / %2°").arg(angles.y(), 0, 'f', 3).arg(angles.z(), 0, 'f', 3);
442+
mouseDisplay = true;
439443
}
440444

441445
void UiInspector::actionTabChange(int) {
@@ -450,6 +454,12 @@ void UiInspector::actionTabChange(int) {
450454
void UiInspector::timerEvent(QTimerEvent *) {
451455
if(needRefresh)
452456
refresh();
457+
if(mouseDisplay) {
458+
ui->mouseLabel->setText(mousePos);
459+
ui->zoomLabel->setText(mouseZoom);
460+
ui->rotationLabel->setText(rotationAngles);
461+
mouseDisplay = false;
462+
}
453463
}
454464
void UiInspector::refreshIp() {
455465
//IPs

gui/uiinspector.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ class UiInspector : public QWidget {
4949
private:
5050
bool actionInfoLock;
5151
bool slidersLock;
52+
bool mouseDisplay;
53+
QString mousePos, mouseZoom, rotationAngles;
5254

5355
public slots:
5456
void addInterfaces();

0 commit comments

Comments
 (0)