Fix property dialog size
This commit is contained in:
parent
8587b0c040
commit
84edf40876
3 changed files with 17 additions and 2 deletions
|
@ -71,6 +71,13 @@ FilePropertiesDialog::~FilePropertiesDialog()
|
|||
}
|
||||
}
|
||||
|
||||
void FilePropertiesDialog::updateSize(int width, int height)
|
||||
{
|
||||
setBaseSize(QSize(width, height));
|
||||
setMinimumSize(QSize(width, height));
|
||||
setMaximumSize(QSize(width, height));
|
||||
}
|
||||
|
||||
void FilePropertiesDialog::accept(const QString &text)
|
||||
{
|
||||
KFileItemList list = m_items;
|
||||
|
|
|
@ -50,6 +50,8 @@ public:
|
|||
explicit FilePropertiesDialog(const QUrl &url, QQuickView *parent = nullptr);
|
||||
~FilePropertiesDialog();
|
||||
|
||||
Q_INVOKABLE void updateSize(int width, int height);
|
||||
|
||||
Q_INVOKABLE void accept(const QString &text);
|
||||
Q_INVOKABLE void reject();
|
||||
|
||||
|
|
|
@ -26,8 +26,14 @@ import FishUI 1.0 as FishUI
|
|||
Item {
|
||||
id: control
|
||||
|
||||
width: _mainLayout.implicitWidth + FishUI.Units.largeSpacing * 4
|
||||
height: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2
|
||||
property int widthValue: _mainLayout.implicitWidth + FishUI.Units.largeSpacing * 4
|
||||
property int heightValue: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2
|
||||
|
||||
// width: widthValue
|
||||
// height: heightValue
|
||||
|
||||
onWidthValueChanged: main.updateSize(widthValue, heightValue)
|
||||
onHeightValueChanged: main.updateSize(widthValue, heightValue)
|
||||
|
||||
focus: true
|
||||
Keys.enabled: true
|
||||
|
|
Loading…
Reference in a new issue