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
|
||||
interactive: contentHeight > height
|
||||
model: {
|
||||
if (typeof root.actions == "undefined") {
|
||||
return null;
|
||||
}
|
||||
if (root.actions.length == 0) {
|
||||
return null;
|
||||
} else {
|
||||
|
|
|
@ -146,7 +146,7 @@ OverlayDrawer {
|
|||
visible: level > 0
|
||||
enabled: true
|
||||
RowLayout {
|
||||
height: implicitHeight + Units.smallSpacing * 2
|
||||
height: Units.iconSizes.smallMedium + Units.smallSpacing * 2
|
||||
anchors {
|
||||
left: parent.left
|
||||
}
|
||||
|
|
|
@ -27,13 +27,16 @@ Item {
|
|||
property alias smooth: image.smooth
|
||||
property bool active: false
|
||||
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 {
|
||||
id: image
|
||||
anchors.fill: parent
|
||||
source: root.source != "" ? (root.source.indexOf(".") === -1 ? "icons/" + root.source + ".svg" : root.source) : root.source
|
||||
sourceSize.width: root.width
|
||||
sourceSize.height: root.height
|
||||
}
|
||||
GammaAdjust {
|
||||
anchors.fill: image
|
||||
|
|
|
@ -57,7 +57,7 @@ Rectangle {
|
|||
|
||||
Connections {
|
||||
target: flickable
|
||||
property real oldContentY: flickable.contentY
|
||||
property real oldContentY: (flickable == null) ? 0 : flickable.contentY
|
||||
onContentYChanged: {
|
||||
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