Warning, /plasma/qqc2-breeze-style/style/qtquickcontrols/Dialog.qml is written in an unsupported language. File is not indexed.

0001 /* SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
0002  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0003  */
0004 
0005 import QtQuick
0006 import QtQuick.Templates as T
0007 import org.kde.kirigami as Kirigami
0008 import org.kde.breeze.impl as Impl
0009 
0010 T.Dialog {
0011     id: control
0012 
0013     implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
0014                             Math.ceil(contentWidth) + leftPadding + rightPadding,
0015                             implicitHeaderWidth,
0016                             implicitFooterWidth)
0017     implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
0018                              Math.ceil(contentHeight) + topPadding + bottomPadding
0019                              + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0)
0020                              + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0))
0021 
0022     padding: Kirigami.Units.gridUnit
0023 
0024 //     anchors.centerIn: T.Overlay.overlay
0025 
0026     enter: Transition {
0027         NumberAnimation {
0028             property: "opacity"
0029             from: 0
0030             to: 1
0031             easing.type: Easing.InOutQuad
0032             duration: Kirigami.Units.longDuration
0033         }
0034     }
0035 
0036     exit: Transition {
0037         NumberAnimation {
0038             property: "opacity"
0039             from: 1
0040             to: 0
0041             easing.type: Easing.InOutQuad
0042             duration: Kirigami.Units.longDuration
0043         }
0044     }
0045 
0046     background: Rectangle {
0047         radius: Impl.Units.smallRadius
0048         color: Kirigami.Theme.backgroundColor
0049         border.color: Impl.Theme.separatorColor()
0050         border.width: control.dim ? 0 : Impl.Units.smallBorder
0051 
0052         Impl.LargeShadow {
0053             radius: parent.radius
0054         }
0055     }
0056 
0057     header: Kirigami.Heading {
0058         text: control.title
0059         level: 2
0060         visible: control.title
0061         elide: Label.ElideRight
0062         padding: Kirigami.Units.gridUnit
0063         bottomPadding: 0
0064     }
0065 
0066     footer: DialogButtonBox {
0067         visible: count > 0
0068     }
0069 
0070     T.Overlay.modal: Impl.OverlayModalBackground {}
0071     T.Overlay.modeless: Impl.OverlayDimBackground {}
0072 }