Warning, /maui/mauikit/src/style.5/DialogButtonBox.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 import QtQuick.Templates 2.15 as T
0026 import org.mauikit.controls 1.3 as Maui
0027
0028 T.DialogButtonBox
0029 {
0030 id: control
0031
0032 implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
0033 implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
0034
0035 padding: 0
0036 spacing: Maui.Style.space.small
0037 alignment: undefined
0038
0039 delegate: Button
0040 {
0041 id: _actionButton
0042 focus: true
0043 Layout.fillWidth: true
0044
0045 background: Rectangle
0046 {
0047 radius: Maui.Style.radiusV
0048 color: _actionButton.visualFocus || _actionButton.highlighted || _actionButton.hovered || _actionButton.down || _actionButton.pressed ? Maui.Theme.highlightColor : Maui.Theme.backgroundColor
0049
0050 Behavior on color
0051 {
0052 Maui.ColorTransition{}
0053 }
0054 }
0055 }
0056
0057 contentItem: GridLayout
0058 {
0059 rowSpacing: control.spacing
0060 columnSpacing: control.spacing
0061
0062 property bool isWide : control.width > Maui.Style.units.gridUnit*10
0063
0064 // visible: control.defaultButtons || control.actions.length
0065
0066 rows: isWide? 1 : children.length
0067 columns: isWide ? children.length : 1
0068
0069 Repeater
0070 {
0071 model: control.contentModel
0072 }
0073 }
0074
0075 background: Item {}
0076 }