comparison view/View.cpp @ 1360:e848ea0850fe zoom

Merge from default branch
author Chris Cannam
date Fri, 05 Oct 2018 10:25:52 +0100
parents 9fb7133dd818 4949061fcb8c
children 40b9a495a0e0
comparison
equal deleted inserted replaced
1352:4949061fcb8c 1360:e848ea0850fe
631 pb->setMaximum(0); 631 pb->setMaximum(0);
632 pb->setFixedWidth(80); 632 pb->setFixedWidth(80);
633 pb->setTextVisible(false); 633 pb->setTextVisible(false);
634 634
635 QPushButton *cancel = new QPushButton(this); 635 QPushButton *cancel = new QPushButton(this);
636 cancel->setIcon(IconLoader().load("fileclose")); 636 cancel->setIcon(IconLoader().load("cancel"));
637 cancel->setFlat(true); 637 cancel->setFlat(true);
638 cancel->setFixedSize(QSize(20, 20)); 638 int scaled20 = ViewManager::scalePixelSize(20);
639 cancel->setFixedSize(QSize(scaled20, scaled20));
639 connect(cancel, SIGNAL(clicked()), this, SLOT(cancelClicked())); 640 connect(cancel, SIGNAL(clicked()), this, SLOT(cancelClicked()));
640 641
641 ProgressBarRec pbr; 642 ProgressBarRec pbr;
642 pbr.cancel = cancel; 643 pbr.cancel = cancel;
643 pbr.bar = pb; 644 pbr.bar = pb;
1642 i->second.lastCheck = 0; 1643 i->second.lastCheck = 0;
1643 timer->setInterval(2000); 1644 timer->setInterval(2000);
1644 timer->start(); 1645 timer->start();
1645 } 1646 }
1646 1647
1647 cancel->move(0, ph - pb->height()/2 - 10); 1648 int scaled20 = ViewManager::scalePixelSize(20);
1649
1650 cancel->move(0, ph - pb->height()/2 - scaled20/2);
1648 cancel->show(); 1651 cancel->show();
1649 1652
1650 pb->setValue(completion); 1653 pb->setValue(completion);
1651 pb->move(20, ph - pb->height()); 1654 pb->move(scaled20, ph - pb->height());
1652 1655
1653 pb->show(); 1656 pb->show();
1654 pb->update(); 1657 pb->update();
1655 1658
1656 ph -= pb->height(); 1659 ph -= pb->height();