From 02543229fe85ecdafa9c2440311532a477cc1ac3 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Fri, 28 Jul 2023 17:46:25 -0400 Subject: [PATCH] `audiodialog.cpp`: Scale buttons size --- src/widgets/dialogs/audio/audiodialog.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/widgets/dialogs/audio/audiodialog.cpp b/src/widgets/dialogs/audio/audiodialog.cpp index 982979b..7d89d23 100644 --- a/src/widgets/dialogs/audio/audiodialog.cpp +++ b/src/widgets/dialogs/audio/audiodialog.cpp @@ -32,6 +32,7 @@ audioDialog::audioDialog(QWidget *parent) : // Centering dialog int x = (screenGeometry.width() - this->width()) / 2; int y = (screenGeometry.height() - this->height()) / 2; + int screenSizeProduct = screenGeometry.width() * screenGeometry.height(); this->move(x, y); ui->minusBtn->setProperty("type", "borderless"); @@ -44,9 +45,9 @@ audioDialog::audioDialog(QWidget *parent) : ui->queueBtn->setProperty("type", "borderless"); ui->refreshBtn->setProperty("type", "borderless"); - int topButtonsSize = 55; - int menuButtonsSize = 80; - int playBtnsSize = 50; + int topButtonsSize = screenSizeProduct / 14298.6; + int menuButtonsSize = screenSizeProduct / 9830; + int playBtnsSize = screenSizeProduct / 15728; ui->minusBtn->setIconSize(QSize{topButtonsSize,topButtonsSize}); ui->plusBtn->setIconSize(QSize{topButtonsSize,topButtonsSize});