mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Sync with mobilecomponents 54e4f2622a
This fixes loading the icon. Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
parent
ffb2c6014e
commit
e0fc5268fe
1 changed files with 4 additions and 3 deletions
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
import org.kde.plasma.mobilecomponents 0.2
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
@ -26,13 +27,13 @@ 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: image.sourceSize.width
|
implicitWidth: Math.min(image.sourceSize.width, Units.iconSizes.medium)
|
||||||
implicitHeight: image.sourceSize.height
|
implicitHeight: Math.min(image.sourceSize.height, Units.iconSizes.medium)
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: image
|
id: image
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: root.source != "" ? "icons/" + root.source + ".svg" : root.source
|
source: root.source != "" ? (root.source.indexOf(".") === -1 ? "icons/" + root.source + ".svg" : root.source) : root.source
|
||||||
}
|
}
|
||||||
GammaAdjust {
|
GammaAdjust {
|
||||||
anchors.fill: image
|
anchors.fill: image
|
||||||
|
|
Loading…
Add table
Reference in a new issue