Warning, /maui/mauikit/src/style.5/Dialog.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright 2017 Marco Martin <mart@kde.org> 0003 * Copyright 2017 The Qt Company Ltd. 0004 * 0005 * GNU Lesser General Public License Usage 0006 * Alternatively, this file may be used under the terms of the GNU Lesser 0007 * General Public License version 3 as published by the Free Software 0008 * Foundation and appearing in the file LICENSE.LGPLv3 included in the 0009 * packaging of this file. Please review the following information to 0010 * ensure the GNU Lesser General Public License version 3 requirements 0011 * will be met: https://www.gnu.org/licenses/lgpl.html. 0012 * 0013 * GNU General Public License Usage 0014 * Alternatively, this file may be used under the terms of the GNU 0015 * General Public License version 2.0 or later as published by the Free 0016 * Software Foundation and appearing in the file LICENSE.GPL included in 0017 * the packaging of this file. Please review the following information to 0018 * ensure the GNU General Public License version 2.0 requirements will be 0019 * met: http://www.gnu.org/licenses/gpl-2.0.html. 0020 */ 0021 0022 0023 import QtQuick 2.15 0024 import QtQuick.Layouts 1.15 0025 0026 import QtQuick.Templates 2.15 as T 0027 import org.mauikit.controls 1.3 as Maui 0028 0029 import QtGraphicalEffects 1.0 0030 0031 T.Dialog 0032 { 0033 id: control 0034 0035 Maui.Theme.colorSet: Maui.Theme.Window 0036 Maui.Theme.inherit: false 0037 0038 parent: T.Overlay.overlay 0039 0040 anchors.centerIn: parent 0041 0042 implicitWidth: Math.min(300, control.parent.width) 0043 implicitHeight: implicitContentHeight + topPadding + bottomPadding + implicitFooterHeight + implicitHeaderHeight + topMargin + bottomMargin 0044 0045 spacing: Maui.Style.defaultSpacing 0046 padding: Maui.Style.contentMargins 0047 margins: Maui.Style.space.medium 0048 modal: true 0049 0050 closePolicy: control.modal ? Popup.NoAutoClose | Popup.CloseOnEscape : Popup.CloseOnEscape | Popup.CloseOnPressOutside 0051 0052 // enter: Transition { 0053 // NumberAnimation { 0054 // property: "opacity" 0055 // from: 0 0056 // to: 1 0057 // easing.type: Easing.InOutQuad 0058 // duration: 250 0059 // } 0060 // } 0061 0062 // exit: Transition { 0063 // NumberAnimation { 0064 // property: "opacity" 0065 // from: 1 0066 // to: 0 0067 // easing.type: Easing.InOutQuad 0068 // duration: 250 0069 // } 0070 // } 0071 0072 background: Rectangle 0073 { 0074 radius: Maui.Style.radiusV 0075 color: Maui.Theme.backgroundColor 0076 0077 layer.enabled: true 0078 layer.effect: DropShadow 0079 { 0080 horizontalOffset: 0 0081 verticalOffset: 0 0082 radius: 8 0083 samples: 16 0084 color: "#80000000" 0085 transparentBorder: true 0086 } 0087 0088 Behavior on color 0089 { 0090 Maui.ColorTransition{} 0091 } 0092 } 0093 0094 header: Maui.ToolBar 0095 { 0096 visible: control.title.length >0 0097 background: null 0098 0099 middleContent: Label 0100 { 0101 text: control.title 0102 horizontalAlignment: Qt.AlignHCenter 0103 Layout.fillWidth: true 0104 Layout.alignment: Qt.AlignHCenter 0105 font: Maui.Style.h2Font 0106 } 0107 } 0108 0109 footer: DialogButtonBox 0110 { 0111 visible: count > 0 0112 width: parent.width 0113 padding: control.padding 0114 } 0115 }