mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 23:41:26 +12:00
Qt: Fix Save Data Dialog initial size
This commit is contained in:
parent
c2ac05f734
commit
0741698f13
2 changed files with 10 additions and 3 deletions
|
@ -7,6 +7,8 @@
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
#include <QDesktopWidget>
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
constexpr auto qstr = QString::fromStdString;
|
constexpr auto qstr = QString::fromStdString;
|
||||||
|
|
||||||
|
@ -214,6 +216,9 @@ void save_data_list_dialog::UpdateList()
|
||||||
m_list->horizontalHeader()->height() + m_list->verticalHeader()->length() + m_list->frameWidth() * 2
|
m_list->horizontalHeader()->height() + m_list->verticalHeader()->length() + m_list->frameWidth() * 2
|
||||||
);
|
);
|
||||||
|
|
||||||
resize(minimumSize().expandedTo(sizeHint() - m_list->sizeHint() + tableSize));
|
QSize preferredSize = minimumSize().expandedTo(sizeHint() - m_list->sizeHint() + tableSize);
|
||||||
|
|
||||||
|
QSize maxSize = QSize(preferredSize.width(), static_cast<int>(QApplication::desktop()->screenGeometry().height()*.6));
|
||||||
|
|
||||||
|
resize(preferredSize.boundedTo(maxSize));
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,6 @@ save_manager_dialog::save_manager_dialog(std::string dir, QWidget* parent) : QDi
|
||||||
setMinimumSize(QSize(400, 400));
|
setMinimumSize(QSize(400, 400));
|
||||||
|
|
||||||
Init(dir);
|
Init(dir);
|
||||||
resize(width(), std::min(height(), static_cast<int>(QApplication::desktop()->screenGeometry().height()*.6)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -202,8 +201,11 @@ void save_manager_dialog::UpdateList()
|
||||||
m_list->verticalHeader()->width() + m_list->horizontalHeader()->length() + m_list->frameWidth() * 2,
|
m_list->verticalHeader()->width() + m_list->horizontalHeader()->length() + m_list->frameWidth() * 2,
|
||||||
m_list->horizontalHeader()->height() + m_list->verticalHeader()->length() + m_list->frameWidth() * 2);
|
m_list->horizontalHeader()->height() + m_list->verticalHeader()->length() + m_list->frameWidth() * 2);
|
||||||
|
|
||||||
resize(minimumSize().expandedTo(sizeHint() - m_list->sizeHint() + tableSize));
|
QSize preferredSize = minimumSize().expandedTo(sizeHint() - m_list->sizeHint() + tableSize);
|
||||||
|
|
||||||
|
QSize maxSize = QSize(preferredSize.width(), static_cast<int>(QApplication::desktop()->screenGeometry().height()*.6));
|
||||||
|
|
||||||
|
resize(preferredSize.boundedTo(maxSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue