Warning, /maui/mauikit/src/style.5/SplitView.qml is written in an unsupported language. File is not indexed.
0001 // Copyright 2018-2020 Camilo Higuita <milo.h@aol.com> 0002 // Copyright 2018-2020 Nitrux Latinoamericana S.C. 0003 // 0004 // SPDX-License-Identifier: GPL-3.0-or-later 0005 0006 0007 import QtQuick 2.15 0008 import QtQuick.Templates 2.15 as T 0009 0010 import org.mauikit.controls 1.3 as Maui 0011 0012 T.SplitView 0013 { 0014 id: control 0015 0016 Maui.Theme.colorSet: Maui.Theme.Window 0017 Maui.Theme.inherit: false 0018 0019 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, 0020 implicitContentWidth + leftPadding + rightPadding) 0021 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, 0022 implicitContentHeight + topPadding + bottomPadding) 0023 0024 clip: true 0025 focus: true 0026 padding: 0 0027 0028 Component 0029 { 0030 id: _horizontalHandleComponent 0031 0032 Rectangle 0033 { 0034 Maui.Theme.colorSet: Maui.Theme.Window 0035 Maui.Theme.inherit: false 0036 0037 implicitWidth: Maui.Handy.isMobile ? 8 : 4 0038 implicitHeight: Maui.Handy.isMobile ? 8 : 4 0039 0040 color: Maui.Theme.backgroundColor 0041 0042 Behavior on color 0043 { 0044 Maui.ColorTransition{} 0045 } 0046 0047 Rectangle 0048 { 0049 property int length: pressed ? 80 : 48 0050 0051 Behavior on length 0052 { 0053 NumberAnimation 0054 { 0055 duration: Maui.Style.units.shortDuration 0056 } 0057 } 0058 0059 Behavior on opacity 0060 { 0061 NumberAnimation 0062 { 0063 duration: Maui.Style.units.shortDuration 0064 } 0065 } 0066 0067 opacity: pressed ? 1 : 0.2 0068 0069 anchors.centerIn: parent 0070 height: Maui.Handy.isMobile ? 6 : 4 0071 width: length 0072 radius: height 0073 0074 color: pressed || control.T.SplitHandle.hovered ? Maui.Theme.highlightColor : Maui.Theme.textColor 0075 0076 Behavior on color 0077 { 0078 Maui.ColorTransition{} 0079 } 0080 } 0081 } 0082 } 0083 0084 Component 0085 { 0086 id: _verticalHandleComponent 0087 0088 Rectangle 0089 { 0090 Maui.Theme.colorSet: Maui.Theme.Window 0091 Maui.Theme.inherit: false 0092 0093 implicitWidth: Maui.Handy.isMobile ? 8 : 4 0094 implicitHeight: Maui.Handy.isMobile ? 8 : 4 0095 0096 color: Maui.Theme.backgroundColor 0097 0098 Behavior on color 0099 { 0100 Maui.ColorTransition{} 0101 } 0102 0103 Rectangle 0104 { 0105 property int length: pressed ? 80 : 48 0106 0107 Behavior on length 0108 { 0109 NumberAnimation 0110 { 0111 duration: 100 0112 } 0113 } 0114 0115 Behavior on opacity 0116 { 0117 NumberAnimation 0118 { 0119 duration: 100 0120 } 0121 } 0122 0123 Behavior on color 0124 { 0125 Maui.ColorTransition{} 0126 } 0127 0128 opacity: pressed ? 1 : 0.2 0129 anchors.centerIn: parent 0130 height: length 0131 width: Maui.Handy.isMobile ? 6 : 4 0132 radius: width 0133 color: pressed || control.T.SplitHandle.hovered ? Maui.Theme.highlightColor : Maui.Theme.textColor 0134 } 0135 } 0136 } 0137 0138 handle: Loader 0139 { 0140 // asynchronous: true 0141 z: control.z +9999 0142 property bool pressed: T.SplitHandle.pressed 0143 sourceComponent: control.orientation === Qt.Horizontal ? _verticalHandleComponent : _horizontalHandleComponent 0144 } 0145 }