fileitemaction: size dialog to 33% of screen width

This commit is contained in:
Levi Neely 2026-07-12 20:28:42 +02:00
parent d5902ee1ff
commit a679132b10
1 changed files with 5 additions and 1 deletions

View File

@ -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();