Warning, /graphics/koko/src/qml/imagedelegate/RasterImageDelegate.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: (C) 2015 Vishesh Handa <vhanda@kde.org> 0003 * SPDX-FileCopyrightText: (C) 2017 Atul Sharma <atulsharma406@gmail.com> 0004 * SPDX-FileCopyrightText: (C) 2017 Marco Martin <mart@kde.org> 0005 * SPDX-FileCopyrightText: (C) 2021 Noah Davis <noahadvs@gmail.com> 0006 * SPDX-FileCopyrightText: (C) 2021 Mikel Johnson <mikel5764@gmail.com> 0007 * SPDX-FileCopyrightText: (C) 2021 Arjen Hiemstra <ahiemstra@heimr.nl> 0008 * 0009 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0010 */ 0011 0012 import QtQuick 2.15 0013 import QtQml 2.15 0014 import org.kde.kirigami 2.15 as Kirigami 0015 import org.kde.koko 0.1 0016 0017 BaseImageDelegate { 0018 id: root 0019 0020 readonly property bool zoomedOut: root.zoomFactor < 1 0021 0022 loaded: image.status == Image.Ready 0023 loading: image.status == Image.Loading 0024 0025 sourceWidth: imageInfo.width 0026 sourceHeight: imageInfo.height 0027 0028 Image { 0029 id: image 0030 0031 anchors.fill: parent 0032 0033 source: root.source 0034 asynchronous: true 0035 cache: false 0036 0037 fillMode: Image.PreserveAspectFit 0038 0039 // This makes zoomed-out imaged slook better 0040 smooth: root.zoomedOut 0041 mipmap: root.zoomedOut 0042 0043 autoTransform: true 0044 } 0045 0046 FileInfo { 0047 id: imageInfo 0048 source: root.source 0049 } 0050 } 0051