fileitemaction: size dialog to 33% of screen width
This commit is contained in:
parent
d5902ee1ff
commit
a679132b10
|
|
@ -14,6 +14,7 @@
|
|||
#include <QFileInfo>
|
||||
#include <QFormLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QScreen>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
|
||||
|
|
@ -82,7 +83,10 @@ void DenoteFileItemAction::renameWithDenote(const KFileItemList &items, QWidget
|
|||
// Build dialog
|
||||
QDialog dialog(parentWidget);
|
||||
dialog.setWindowTitle(QStringLiteral("Rename with Denote"));
|
||||
dialog.setMinimumWidth(480);
|
||||
// Size to 33% of screen width (accounts for HiDPI)
|
||||
if (auto *screen = dialog.screen()) {
|
||||
dialog.setMinimumWidth(screen->availableGeometry().width() / 3);
|
||||
}
|
||||
|
||||
auto *layout = new QVBoxLayout(&dialog);
|
||||
auto *form = new QFormLayout();
|
||||
|
|
|
|||
Loading…
Reference in New Issue