audiodialog.cpp: Scale buttons size

This commit is contained in:
Nicolas Mailloux 2023-07-28 17:46:25 -04:00
parent 6ac8e781e2
commit 02543229fe

View file

@ -32,6 +32,7 @@ audioDialog::audioDialog(QWidget *parent) :
// Centering dialog // Centering dialog
int x = (screenGeometry.width() - this->width()) / 2; int x = (screenGeometry.width() - this->width()) / 2;
int y = (screenGeometry.height() - this->height()) / 2; int y = (screenGeometry.height() - this->height()) / 2;
int screenSizeProduct = screenGeometry.width() * screenGeometry.height();
this->move(x, y); this->move(x, y);
ui->minusBtn->setProperty("type", "borderless"); ui->minusBtn->setProperty("type", "borderless");
@ -44,9 +45,9 @@ audioDialog::audioDialog(QWidget *parent) :
ui->queueBtn->setProperty("type", "borderless"); ui->queueBtn->setProperty("type", "borderless");
ui->refreshBtn->setProperty("type", "borderless"); ui->refreshBtn->setProperty("type", "borderless");
int topButtonsSize = 55; int topButtonsSize = screenSizeProduct / 14298.6;
int menuButtonsSize = 80; int menuButtonsSize = screenSizeProduct / 9830;
int playBtnsSize = 50; int playBtnsSize = screenSizeProduct / 15728;
ui->minusBtn->setIconSize(QSize{topButtonsSize,topButtonsSize}); ui->minusBtn->setIconSize(QSize{topButtonsSize,topButtonsSize});
ui->plusBtn->setIconSize(QSize{topButtonsSize,topButtonsSize}); ui->plusBtn->setIconSize(QSize{topButtonsSize,topButtonsSize});