fix size hints propagation
This commit is contained in:
parent
1b9d6cbb13
commit
0f86bd5b6e
@ -29,6 +29,7 @@ Item {
|
||||
|
||||
property bool fillWidth: true
|
||||
property bool fillHeight: true
|
||||
implicitWidth: tasksModel.count * 50
|
||||
|
||||
PlasmaCore.DataSource {
|
||||
id: tasksSource
|
||||
@ -56,6 +57,7 @@ Item {
|
||||
orientation: ListView.Horizontal
|
||||
|
||||
model: PlasmaCore.DataModel {
|
||||
id: tasksModel
|
||||
dataSource: tasksSource
|
||||
}
|
||||
|
||||
|
@ -751,11 +751,10 @@ void AppletInterface::compactRepresentationCheck()
|
||||
emit expandedChanged();
|
||||
|
||||
//we are already expanded: nothing to do
|
||||
if (!m_compactUiObject) {
|
||||
return;
|
||||
if (m_compactUiObject) {
|
||||
disconnect(m_compactUiObject.data(), 0, this, 0);
|
||||
}
|
||||
|
||||
disconnect(m_compactUiObject.data(), 0, this, 0);
|
||||
//Here we have to use the old connect syntax, because we don't have access to the class type
|
||||
if (m_qmlObject->rootObject()->property("minimumWidth").isValid()) {
|
||||
connect(m_qmlObject->rootObject(), SIGNAL(minimumWidthChanged()),
|
||||
@ -794,7 +793,9 @@ void AppletInterface::compactRepresentationCheck()
|
||||
emit maximumHeightChanged();
|
||||
|
||||
m_qmlObject->rootObject()->setProperty("parent", QVariant::fromValue(this));
|
||||
m_compactUiObject.data()->deleteLater();
|
||||
if (m_compactUiObject) {
|
||||
m_compactUiObject.data()->deleteLater();
|
||||
}
|
||||
|
||||
//set anchors
|
||||
QQmlExpression expr(m_qmlObject->engine()->rootContext(), m_qmlObject->rootObject(), "parent");
|
||||
|
@ -82,33 +82,33 @@ PlasmaCore.FrameSvgItem {
|
||||
}
|
||||
onMinimumWidthChanged: {
|
||||
if (containment.formFactor === PlasmaCore.Types.Horizontal) {
|
||||
panel.width = Math.max(panel.width, containment.minimumWidth);
|
||||
panel.width = Math.max(panel.width, panel.minimumLength);
|
||||
}
|
||||
}
|
||||
onMaximumWidthChanged: {
|
||||
if (containment.formFactor === PlasmaCore.Types.Horizontal) {
|
||||
panel.width = Math.min(panel.width, containment.maximumWidth);
|
||||
panel.width = Math.min(panel.width, panel.maximumLength);
|
||||
}
|
||||
}
|
||||
onImplicitWidthChanged: {
|
||||
if (containment.formFactor === PlasmaCore.Types.Horizontal) {
|
||||
panel.width = Math.min(containment.maximumWidth, Math.max(containment.implicitWidth, containment.minimumWidth));
|
||||
panel.width = Math.min(panel.maximumLength, Math.max(containment.implicitWidth, panel.minimumLength));
|
||||
}
|
||||
}
|
||||
|
||||
onMinimumHeightChanged: {
|
||||
if (containment.formFactor === PlasmaCore.Types.Vertical) {
|
||||
panel.width = Math.max(panel.width, containment.minimumHeight);
|
||||
panel.width = Math.max(panel.width, panel.minimumLength);
|
||||
}
|
||||
}
|
||||
onMaximumHeightChanged: {
|
||||
if (containment.formFactor === PlasmaCore.Types.Vertical) {
|
||||
panel.width = Math.min(panel.width, containment.maximumHeight);
|
||||
panel.width = Math.min(panel.width, panel.maximumLength);
|
||||
}
|
||||
}
|
||||
onImplicitHeightChanged: {
|
||||
if (containment.formFactor === PlasmaCore.Types.Vertical) {
|
||||
panel.width = Math.min(containment.maximumHeight, Math.max(containment.implicitHeight, containment.minimumHeight));
|
||||
panel.width = Math.min(panel.maximumLength, Math.max(containment.implicitHeight, panel.minimumLength));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user