diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp index 8248564fc..a2e5ab7a1 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp @@ -534,7 +534,7 @@ qreal AppletInterface::readGraphicsObjectSizeHint(const char *hint) const } if (prop.isValid() && prop.canConvert()) { - return qMax(qreal(1), prop.toReal()); + return prop.toReal(); } else { return -1; } @@ -715,6 +715,8 @@ void AppletInterface::compactRepresentationCheck() this, SIGNAL(implicitHeightChanged())); } + emit fillWidthChanged(); + emit fillHeightChanged(); emit minimumWidthChanged(); emit minimumHeightChanged(); emit implicitWidthChanged(); @@ -766,6 +768,8 @@ void AppletInterface::compactRepresentationCheck() this, SIGNAL(implicitHeightChanged())); } + emit fillWidthChanged(); + emit fillHeightChanged(); emit minimumWidthChanged(); emit minimumHeightChanged(); emit implicitWidthChanged(); diff --git a/src/scriptengines/qml/plasmoid/appletinterface.h b/src/scriptengines/qml/plasmoid/appletinterface.h index 626e80e3d..1da8aece0 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.h +++ b/src/scriptengines/qml/plasmoid/appletinterface.h @@ -74,8 +74,8 @@ class AppletInterface : public QQuickItem Q_PROPERTY(qreal maximumWidth READ maximumWidth NOTIFY maximumWidthChanged) Q_PROPERTY(qreal maximumHeight READ maximumHeight NOTIFY maximumHeightChanged) //implicitWidth/height is already there - //Q_PROPERTY(qreal implicitWidth READ implicitWidth NOTIFY implicitWidthChanged) - //Q_PROPERTY(qreal implicitHeight READ implicitHeight NOTIFY implicitHeightChanged) + Q_PROPERTY(qreal implicitWidth READ implicitWidth NOTIFY implicitWidthChanged) + Q_PROPERTY(qreal implicitHeight READ implicitHeight NOTIFY implicitHeightChanged) Q_PROPERTY(bool fillWidth READ fillWidth NOTIFY fillWidthChanged) Q_PROPERTY(bool fillHeight READ fillHeight NOTIFY fillHeightChanged) @@ -181,8 +181,8 @@ Q_SIGNALS: void minimumHeightChanged(); void maximumWidthChanged(); void maximumHeightChanged(); - //void implicitWidthChanged(); - //void implicitHeightChanged(); + void implicitWidthChanged(); + void implicitHeightChanged(); void fillWidthChanged(); void fillHeightChanged(); diff --git a/src/shell/qmlpackages/desktop/contents/applet/CompactApplet.qml b/src/shell/qmlpackages/desktop/contents/applet/CompactApplet.qml index 18200304e..578663741 100644 --- a/src/shell/qmlpackages/desktop/contents/applet/CompactApplet.qml +++ b/src/shell/qmlpackages/desktop/contents/applet/CompactApplet.qml @@ -34,6 +34,8 @@ Item { property int implicitWidth: compactRepresentation && compactRepresentation.implicitWidth !== undefined ? compactRepresentation.implicitWidth : -1 property int implicitHeight: compactRepresentation && compactRepresentation.implicitHeight !== undefined ? compactRepresentation.implicitHeight : -1 + property bool fillWidth: compactRepresentation && compactRepresentation.fillWidth !== undefined ? compactRepresentation.fillWidth : false + property bool fillHeight: compactRepresentation && compactRepresentation.fillHeight !== undefined ? compactRepresentation.fillHeight : false property Item applet