Plasma

Popup.qml
1 /*
2  SPDX-FileCopyrightText: 2016 Marco Martin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 import QtQuick 2.6
8 import QtQuick.Templates @QQC2_VERSION@ as T
9 import org.kde.plasma.core 2.0 as PlasmaCore
10 
11 T.Popup {
12  id: control
13 
14  implicitWidth: Math.max(background ? background.implicitWidth : 0,
15  contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
16  implicitHeight: Math.max(background ? background.implicitHeight : 0,
17  contentWidth > 0 ? contentHeight + topPadding + bottomPadding : 0)
18 
19  contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
20  contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
21 
22  leftPadding: background.margins.left
23  topPadding: background.margins.top
24  rightPadding: background.margins.right
25  bottomPadding: background.margins.bottom
26 
27  enter: Transition {
28  NumberAnimation {
29  property: "opacity"
30  from: 0
31  to: 1
32  easing.type: Easing.InOutQuad
33  duration: PlasmaCore.Units.longDuration
34  }
35  }
36 
37  exit: Transition {
38  NumberAnimation {
39  property: "opacity"
40  from: 1
41  to: 0
42  easing.type: Easing.InOutQuad
43  duration: PlasmaCore.Units.longDuration
44  }
45  }
46 
47  contentItem: Item { }
48 
49  background: PlasmaCore.FrameSvgItem {
50  implicitWidth: PlasmaCore.Units.gridUnit * 12
51  imagePath: "widgets/background"
52  }
53 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 04:05:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.