Warning, /plasma-mobile/plasma-phonebook/src/contents/ui/RoundImage.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * SPDX-FileCopyrightText: 2017-2019 Kaidan Developers and Contributors 
0003  * SPDX-FileCopyrightText: 2019 Jonah BrĂ¼chert <jbb@kaidan.im>
0004  *
0005  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006  */
0007 import QtQuick 2.6
0008 import QtGraphicalEffects 1.0
0009 import org.kde.kirigami 2.6 as Kirigami
0010 
0011 Kirigami.Icon {
0012     id: img
0013     property bool isRound: true
0014 
0015     layer.enabled: isRound
0016     layer.effect: OpacityMask {
0017         maskSource: Item {
0018             width: img.width
0019             height: img.height
0020 
0021             Rectangle {
0022                 anchors.centerIn: parent
0023                 width: Math.min(img.width, img.height)
0024                 height: width
0025                 radius: Math.min(width, height)
0026             }
0027         }
0028     }
0029 }