changeset 1351:9fb7133dd818

Scale positioning
author Chris Cannam
date Wed, 03 Oct 2018 12:59:55 +0100
parents 5ac1c323ac55
children 86429ff00f05 e848ea0850fe
files view/View.cpp
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/view/View.cpp	Wed Oct 03 12:59:47 2018 +0100
+++ b/view/View.cpp	Wed Oct 03 12:59:55 2018 +0100
@@ -573,7 +573,8 @@
     QPushButton *cancel = new QPushButton(this);
     cancel->setIcon(IconLoader().load("cancel"));
     cancel->setFlat(true);
-    cancel->setFixedSize(QSize(20, 20));
+    int scaled20 = ViewManager::scalePixelSize(20);
+    cancel->setFixedSize(QSize(scaled20, scaled20));
     connect(cancel, SIGNAL(clicked()), this, SLOT(cancelClicked()));
     
     ProgressBarRec pbr;
@@ -1578,11 +1579,13 @@
                     timer->start();
                 }
 
-                cancel->move(0, ph - pb->height()/2 - 10);
+                int scaled20 = ViewManager::scalePixelSize(20);
+
+                cancel->move(0, ph - pb->height()/2 - scaled20/2);
                 cancel->show();
 
                 pb->setValue(completion);
-                pb->move(20, ph - pb->height());
+                pb->move(scaled20, ph - pb->height());
 
                 pb->show();
                 pb->update();