Plasma-framework

BackgroundMetrics.qml
1/*
2 SPDX-FileCopyrightText: 2020 Marco Martin <mart@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6import QtQuick
7
8import org.kde.plasma.plasmoid
9import org.kde.plasma.core as PlasmaCore
10import org.kde.ksvg as KSvg
11
12KSvg.FrameSvgItem {
13 visible: false
14 imagePath: {
15 if (Window.window instanceof PlasmaCore.AppletPopup || Window.window instanceof PlasmaCore.Dialog) {
16 return "dialogs/background";
17 } else if (Plasmoid.formFactor === PlasmaCore.Types.Planar) {
18 return "widgets/background";
19 // panels and other formfactors are explicitly not supported
20 } else {
21 return "";
22 }
23 }
24 readonly property bool hasInset: inset.left >= 0 && inset.right >= 0 && inset.top >= 0 && inset.bottom >= 0
25}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:54:11 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.