Rescale dialog size according to DPI scaling level.

This commit is contained in:
LoRd_MuldeR 2017-03-03 22:44:16 +01:00
parent c423797d3d
commit d50dea8a12
18 changed files with 4283 additions and 4284 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@
<context>
<name>MainWindow</name>
<message numerus="yes">
<location filename="../../src/Dialog_MainWindow.cpp" line="832"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="830"/>
<source>%n file(s) have been rejected, because read access was not granted!</source>
<translation>
<numerusform>%n file have been rejected, because read access was not granted!</numerusform>
@ -39,7 +39,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_MainWindow.cpp" line="836"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="834"/>
<source>%n file(s) have been rejected, because they are dummy CDDA files!</source>
<translation>
<numerusform>%n file have been rejected, because they are dummy CDDA files!</numerusform>
@ -47,7 +47,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_MainWindow.cpp" line="840"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="838"/>
<source>%n file(s) have been rejected, because they appear to be Cue Sheet images!</source>
<translation>
<numerusform>%n file have been rejected, because they appear to be Cue Sheet images!</numerusform>
@ -55,7 +55,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_MainWindow.cpp" line="844"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="842"/>
<source>%n file(s) have been rejected, because the file format could not be recognized!</source>
<translation>
<numerusform>%n file have been rejected, because the file format could not be recognized!</numerusform>
@ -63,7 +63,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_MainWindow.cpp" line="4230"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="4228"/>
<source>%n Instance(s)</source>
<translation>
<numerusform>%n Instance</numerusform>
@ -74,7 +74,7 @@
<context>
<name>ProcessingDialog</name>
<message numerus="yes">
<location filename="../../src/Dialog_Processing.cpp" line="676"/>
<location filename="../../src/Dialog_Processing.cpp" line="674"/>
<source>Encoding: %n file(s) of %1 completed so far, please wait...</source>
<translation>
<numerusform>Encoding: %n file of %1 completed so far, please wait...</numerusform>
@ -82,7 +82,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_Processing.cpp" line="708"/>
<location filename="../../src/Dialog_Processing.cpp" line="706"/>
<source>Process was aborted by the user after %n file(s)!</source>
<translation>
<numerusform>Process was aborted by the user after %n file!</numerusform>
@ -90,7 +90,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_Processing.cpp" line="729"/>
<location filename="../../src/Dialog_Processing.cpp" line="727"/>
<source>Error: %1 of %n file(s) failed (%2). Double-click failed items for detailed information!</source>
<translation>
<numerusform>Error: %1 of %n file failed (%2). Double-click failed items for detailed information!</numerusform>
@ -98,7 +98,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_Processing.cpp" line="729"/>
<location filename="../../src/Dialog_Processing.cpp" line="727"/>
<source>%n file(s) skipped</source>
<translation>
<numerusform>%n file skipped</numerusform>
@ -106,7 +106,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_Processing.cpp" line="733"/>
<location filename="../../src/Dialog_Processing.cpp" line="731"/>
<source>Error: %1 of %n file(s) failed. Double-click failed items for detailed information!</source>
<translation>
<numerusform>Error: %1 of %n file failed. Double-click failed items for detailed information!</numerusform>
@ -114,7 +114,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_Processing.cpp" line="747"/>
<location filename="../../src/Dialog_Processing.cpp" line="745"/>
<source>All files completed successfully. Skipped %n file(s).</source>
<translation>
<numerusform>All files completed successfully. Skipped %n file.</numerusform>
@ -122,7 +122,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_Processing.cpp" line="1166"/>
<location filename="../../src/Dialog_Processing.cpp" line="1164"/>
<source>%n hour(s)</source>
<translation>
<numerusform>%n hour</numerusform>
@ -130,8 +130,8 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_Processing.cpp" line="1167"/>
<location filename="../../src/Dialog_Processing.cpp" line="1171"/>
<location filename="../../src/Dialog_Processing.cpp" line="1165"/>
<location filename="../../src/Dialog_Processing.cpp" line="1169"/>
<source>%n minute(s)</source>
<translation>
<numerusform>%n minute</numerusform>
@ -139,8 +139,8 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_Processing.cpp" line="1172"/>
<location filename="../../src/Dialog_Processing.cpp" line="1176"/>
<location filename="../../src/Dialog_Processing.cpp" line="1170"/>
<location filename="../../src/Dialog_Processing.cpp" line="1174"/>
<source>%n second(s)</source>
<translation>
<numerusform>%n second</numerusform>
@ -148,7 +148,7 @@
</translation>
</message>
<message numerus="yes">
<location filename="../../src/Dialog_Processing.cpp" line="1177"/>
<location filename="../../src/Dialog_Processing.cpp" line="1175"/>
<source>%n millisecond(s)</source>
<translation>
<numerusform>%n millisecond</numerusform>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -34,8 +34,8 @@
#define VER_LAMEXP_MINOR_HI 1
#define VER_LAMEXP_MINOR_LO 5
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 3
#define VER_LAMEXP_BUILD 1952
#define VER_LAMEXP_PATCH 4
#define VER_LAMEXP_BUILD 1955
#define VER_LAMEXP_CONFG 1934
///////////////////////////////////////////////////////////////////////////////

View File

@ -154,8 +154,11 @@ AboutDialog::AboutDialog(SettingsModel *settings, QWidget *parent, bool firstSta
//Init the dialog, from the .ui file
ui->setupUi(this);
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
resize(this->minimumSize());
setMinimumSize(this->size());
//Adjust size to DPI settings and re-center
MUtils::GUI::scale_widget(this);
//Disable "X" button
if(firstStart)
{

View File

@ -273,6 +273,7 @@ MainWindow::MainWindow(MUtils::IPCChannel *const ipcChannel, FileListModel *cons
//Init the dialog, from the .ui file
ui->setupUi(this);
setWindowFlags(windowFlags() ^ Qt::WindowMaximizeButtonHint);
setMinimumSize(this->size());
//Create window icon
MUtils::GUI::set_window_icon(this, lamexp_app_icon(), true);
@ -719,12 +720,9 @@ MainWindow::MainWindow(MUtils::IPCChannel *const ipcChannel, FileListModel *cons
// Prepare to show window
//--------------------------------
//Center window in screen
QRect desktopRect = QApplication::desktop()->screenGeometry();
QRect thisRect = this->geometry();
move((desktopRect.width() - thisRect.width()) / 2, (desktopRect.height() - thisRect.height()) / 2);
setMinimumSize(thisRect.width(), thisRect.height());
//Adjust size to DPI settings and re-center
MUtils::GUI::scale_widget(this);
//Create DropBox widget
m_dropBox.reset(new DropBox(this, m_fileListModel, m_settings));
connect(m_fileListModel, SIGNAL(modelReset()), m_dropBox.data(), SLOT(modelChanged()));

View File

@ -170,7 +170,8 @@ ProcessingDialog::ProcessingDialog(FileListModel *const fileListModel, const Aud
//Init the dialog, from the .ui file
ui->setupUi(this);
setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint);
setMinimumSize(this->size());
//Update the window icon
MUtils::GUI::set_window_icon(this, lamexp_app_icon(), true);
@ -184,11 +185,8 @@ ProcessingDialog::ProcessingDialog(FileListModel *const fileListModel, const Aud
//Register meta type
qRegisterMetaType<QUuid>("QUuid");
//Center window in screen
QRect desktopRect = QApplication::desktop()->screenGeometry();
QRect thisRect = this->geometry();
move((desktopRect.width() - thisRect.width()) / 2, (desktopRect.height() - thisRect.height()) / 2);
setMinimumSize(thisRect.width(), thisRect.height());
//Adjust size to DPI settings and re-center
MUtils::GUI::scale_widget(this);
//Enable buttons
connect(ui->button_AbortProcess, SIGNAL(clicked()), this, SLOT(abortEncoding()));