From 8418faf1673f10c7e1ccaaadc2df63e76c8ce634 Mon Sep 17 00:00:00 2001 From: reionwong Date: Mon, 20 Sep 2021 23:29:48 +0800 Subject: [PATCH] Fix property dialog size --- dialogs/filepropertiesdialog.cpp | 2 +- qml/Dialogs/PropertiesDialog.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dialogs/filepropertiesdialog.cpp b/dialogs/filepropertiesdialog.cpp index 3fb803c..dce72cc 100644 --- a/dialogs/filepropertiesdialog.cpp +++ b/dialogs/filepropertiesdialog.cpp @@ -73,7 +73,7 @@ FilePropertiesDialog::~FilePropertiesDialog() void FilePropertiesDialog::updateSize(int width, int height) { - setBaseSize(QSize(width, height)); + resize(QSize(width, height)); setMinimumSize(QSize(width, height)); setMaximumSize(QSize(width, height)); } diff --git a/qml/Dialogs/PropertiesDialog.qml b/qml/Dialogs/PropertiesDialog.qml index 86592cc..35d0b02 100644 --- a/qml/Dialogs/PropertiesDialog.qml +++ b/qml/Dialogs/PropertiesDialog.qml @@ -29,8 +29,8 @@ Item { property int widthValue: _mainLayout.implicitWidth + FishUI.Units.largeSpacing * 4 property int heightValue: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2 - // width: widthValue - // height: heightValue + width: widthValue + height: heightValue onWidthValueChanged: main.updateSize(widthValue, heightValue) onHeightValueChanged: main.updateSize(widthValue, heightValue)