correctly pass fillWidth and hints to outer layers
This commit is contained in:
parent
ea69577005
commit
d68e452545
@ -534,7 +534,7 @@ qreal AppletInterface::readGraphicsObjectSizeHint(const char *hint) const
|
||||
}
|
||||
|
||||
if (prop.isValid() && prop.canConvert<qreal>()) {
|
||||
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();
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user