diff options
author | Ken Moore <ken@ixsystems.com> | 2019-10-29 08:16:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-29 08:16:05 -0400 |
commit | bbf4e940ff2e1c257ffd78c10d85b3681eb72f46 (patch) | |
tree | 480c429c743606f09a837ebc652ca57a69c42119 /src-qt5/desktop-utils/lumina-screenshot | |
parent | Merge pull request #705 from lbartoletti/shortcut_lumina_photo (diff) | |
parent | remove QSignalMapper. Use lambda func instead. (diff) | |
download | lumina-bbf4e940ff2e1c257ffd78c10d85b3681eb72f46.tar.gz lumina-bbf4e940ff2e1c257ffd78c10d85b3681eb72f46.tar.bz2 lumina-bbf4e940ff2e1c257ffd78c10d85b3681eb72f46.zip |
Merge pull request #706 from lbartoletti/fix_deprecated
Fix deprecated
Diffstat (limited to 'src-qt5/desktop-utils/lumina-screenshot')
-rw-r--r-- | src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp index 88192943..5e859f73 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp @@ -22,9 +22,9 @@ MainUI::MainUI() IMG = new ImageEditor(this); ui->scrollArea->setWidget(IMG); areaOverlay = 0; - ui->label_zoom_percent->setMinimumWidth( ui->label_zoom_percent->fontMetrics().width("200%") ); + ui->label_zoom_percent->setMinimumWidth( ui->label_zoom_percent->fontMetrics().horizontalAdvance("200%") ); setupIcons(); - ui->spin_monitor->setMaximum(QApplication::desktop()->screenCount()); + ui->spin_monitor->setMaximum(QGuiApplication::screens().count()); if(ui->spin_monitor->maximum()<2){ ui->spin_monitor->setEnabled(false); ui->radio_monitor->setEnabled(false); @@ -241,7 +241,7 @@ void MainUI::getPixmap(){ //Grab the whole screen cpic = scrn->grabWindow(QApplication::desktop()->winId()); }else if(cwin==0 && ui->radio_monitor->isChecked()){ - QRect geom = QApplication::desktop()->screenGeometry(ui->spin_monitor->value()-1); + QRect geom = QGuiApplication::screens().at(ui->spin_monitor->value()-1)->availableGeometry(); cpic = scrn->grabWindow(QApplication::desktop()->winId(), geom.x(), geom.y(), geom.width(), geom.height() ); }else if(cwin==0 && ui->radio_area->isChecked()){ //Grab the section of the screen which was selected @@ -329,7 +329,7 @@ void MainUI::closeEvent(QCloseEvent *ev){ //qDebug() << "Close Event:" << ui->check_show_popups->isChecked() << picSaved; if(ui->check_show_popups->isChecked() && !picSaved){ //Ask what to do about the unsaved changed - QMessageBox dialog( QMessageBox::Warning, tr("Unsaved Screenshot"), + QMessageBox dialog( QMessageBox::Warning, tr("Unsaved Screenshot"), tr("The current screenshot has not been saved yet. Do you want to save or discard your changes?"), QMessageBox::Discard | QMessageBox::Save | QMessageBox::Cancel, this); dialog.setDefaultButton(QMessageBox::Cancel); |