diff --git a/src/controls/GlobalDrawer.qml b/src/controls/GlobalDrawer.qml --- a/src/controls/GlobalDrawer.qml +++ b/src/controls/GlobalDrawer.qml @@ -227,7 +227,7 @@ Layout.fillWidth: true Layout.preferredWidth: title.implicitWidth - Layout.preferredHeight: bannerImageSource != "" ? Math.max(title.implicitHeight, Math.floor(width / (sourceSize.width/sourceSize.height))) : title.implicitHeight + Layout.preferredHeight: 10 * Units.gridUnit Layout.minimumHeight: Math.max(headingIcon.height, heading.height) + Units.smallSpacing * 2 MouseArea { diff --git a/src/controls/ItemViewHeader.qml b/src/controls/ItemViewHeader.qml --- a/src/controls/ItemViewHeader.qml +++ b/src/controls/ItemViewHeader.qml @@ -38,7 +38,7 @@ property alias backgroundImage: image - maximumHeight: (backgroundImage.status == Image.Ready || backgroundImage.status == Image.Loading ? 10 : 6) * Kirigami.Units.gridUnit + maximumHeight: (backgroundImage.hasImage ? 10 : 6) * Kirigami.Units.gridUnit - (applicationWindow().header ? applicationWindow().header.height : 0) background: Rectangle { id: backgroundItem @@ -49,6 +49,7 @@ fill: parent bottomMargin: rect.height } + readonly property bool hasImage: backgroundImage.status === Image.Ready || backgroundImage.status === Image.Loading fillMode: Image.PreserveAspectCrop asynchronous: true } @@ -96,11 +97,11 @@ font.pointSize: 30 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignBottom - color: root.backgroundImage.status === Image.Ready ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.highlightColor + color: root.backgroundImage.hasImage ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.highlightColor opacity: 1 elide: Text.ElideRight - layer.enabled: root.backgroundImage.status === Image.Ready + layer.enabled: root.backgroundImage.hasImage layer.effect: DropShadow { horizontalOffset: 0 verticalOffset: 2