mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
sync with mobilecomponents f4d5d19fc
- Kills a warning in ContextDrawer. - Improves sizing of menu icons. - Fixes icon rendering in menues. Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
parent
946cc5fec2
commit
44fd9bff67
4 changed files with 10 additions and 4 deletions
|
@ -37,6 +37,9 @@ OverlayDrawer {
|
||||||
id: menu
|
id: menu
|
||||||
interactive: contentHeight > height
|
interactive: contentHeight > height
|
||||||
model: {
|
model: {
|
||||||
|
if (typeof root.actions == "undefined") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (root.actions.length == 0) {
|
if (root.actions.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -146,7 +146,7 @@ OverlayDrawer {
|
||||||
visible: level > 0
|
visible: level > 0
|
||||||
enabled: true
|
enabled: true
|
||||||
RowLayout {
|
RowLayout {
|
||||||
height: implicitHeight + Units.smallSpacing * 2
|
height: Units.iconSizes.smallMedium + Units.smallSpacing * 2
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,13 +27,16 @@ Item {
|
||||||
property alias smooth: image.smooth
|
property alias smooth: image.smooth
|
||||||
property bool active: false
|
property bool active: false
|
||||||
property bool valid: image.status == Image.Ready
|
property bool valid: image.status == Image.Ready
|
||||||
implicitWidth: Math.min(image.sourceSize.width, Units.iconSizes.medium)
|
|
||||||
implicitHeight: Math.min(image.sourceSize.height, Units.iconSizes.medium)
|
implicitWidth: image.source != "" ? Units.iconSizes.smallMedium : 0
|
||||||
|
implicitHeight: image.source != "" ? Units.iconSizes.smallMedium : 0
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: image
|
id: image
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: root.source != "" ? (root.source.indexOf(".") === -1 ? "icons/" + root.source + ".svg" : root.source) : root.source
|
source: root.source != "" ? (root.source.indexOf(".") === -1 ? "icons/" + root.source + ".svg" : root.source) : root.source
|
||||||
|
sourceSize.width: root.width
|
||||||
|
sourceSize.height: root.height
|
||||||
}
|
}
|
||||||
GammaAdjust {
|
GammaAdjust {
|
||||||
anchors.fill: image
|
anchors.fill: image
|
||||||
|
|
|
@ -57,7 +57,7 @@ Rectangle {
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: flickable
|
target: flickable
|
||||||
property real oldContentY: flickable.contentY
|
property real oldContentY: (flickable == null) ? 0 : flickable.contentY
|
||||||
onContentYChanged: {
|
onContentYChanged: {
|
||||||
actionButton.transform[0].y = Math.min(actionButton.height, Math.max(0, actionButton.transform[0].y + (flickable.contentY - oldContentY)));
|
actionButton.transform[0].y = Math.min(actionButton.height, Math.max(0, actionButton.transform[0].y + (flickable.contentY - oldContentY)));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue