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