Warning, /system/mycroft-gui/import/qml/ProportionalDelegate.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright 2019 by Marco Martin <mart@kde.org> 0003 * 0004 * Licensed under the Apache License, Version 2.0 (the "License"); 0005 * you may not use this file except in compliance with the License. 0006 * You may obtain a copy of the License at 0007 * 0008 * http://www.apache.org/licenses/LICENSE-2.0 0009 * 0010 * Unless required by applicable law or agreed to in writing, software 0011 * distributed under the License is distributed on an "AS IS" BASIS, 0012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0013 * See the License for the specific language governing permissions and 0014 * limitations under the License. 0015 * 0016 */ 0017 0018 import QtQuick 2.15 0019 import QtQuick.Layouts 1.15 0020 import QtQuick.Controls 2.15 as Controls 0021 import org.kde.kirigami 2.19 as Kirigami 0022 import Mycroft 1.0 as Mycroft 0023 0024 Delegate { 0025 id: root 0026 0027 property int unitDensity: 100 0028 property real proportionalGridUnit: Math.min(root.contentWidth, root.contentHeight) / unitDensity 0029 property int spacing: proportionalGridUnit * 10 0030 property alias enforceUniformSizes: layout.enforceUniformSizes 0031 0032 leftPadding: Math.min(root.width, root.height)/15 0033 topPadding: Math.min(root.width, root.height)/15 0034 rightPadding: Math.min(root.width, root.height)/15 0035 bottomPadding: Math.min(root.width, root.height)/15 + root.parent.extraBottomPadding 0036 0037 //contentItemAutoHeight: false 0038 contentItem: Mycroft.BoxLayout { 0039 id: layout 0040 0041 //TODO: default to zero? 0042 rowSpacing: root.spacing 0043 columnSpacing: root.spacing 0044 } 0045 }