mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 05:31:25 -07:00
Resize dialog size on high DPI monitors
This commit is contained in:
parent
aaaa67050c
commit
27cf98a962
26 changed files with 125 additions and 80 deletions
|
@ -39,6 +39,7 @@
|
|||
#include "base/utils/fs.h"
|
||||
#include "base/utils/misc.h"
|
||||
#include "previewlistdelegate.h"
|
||||
#include "utils.h"
|
||||
|
||||
#define SETTINGS_KEY(name) "PreviewSelectDialog/" name
|
||||
|
||||
|
@ -146,7 +147,7 @@ void PreviewSelectDialog::previewButtonClicked()
|
|||
void PreviewSelectDialog::saveWindowState()
|
||||
{
|
||||
// Persist dialog size
|
||||
m_storeDialogSize = this->size();
|
||||
m_storeDialogSize = size();
|
||||
// Persist TreeView Header state
|
||||
m_storeTreeHeaderState = previewList->header()->saveState();
|
||||
}
|
||||
|
@ -154,9 +155,8 @@ void PreviewSelectDialog::saveWindowState()
|
|||
void PreviewSelectDialog::loadWindowState()
|
||||
{
|
||||
// Restore dialog size
|
||||
if (m_storeDialogSize.value().isValid()) {
|
||||
resize(m_storeDialogSize);
|
||||
}
|
||||
Utils::Gui::resize(this, m_storeDialogSize);
|
||||
|
||||
// Restore TreeView Header state
|
||||
if (!m_storeTreeHeaderState.value().isEmpty()) {
|
||||
m_headerStateInitialized = previewList->header()->restoreState(m_storeTreeHeaderState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue