Warning, /frameworks/qqc2-desktop-style/org.kde.desktop/MenuSeparator.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2017 The Qt Company Ltd.
0003     SPDX-FileCopyrightText: 2019 Alexander Stippich <a.stippich@gmx.net>
0004     SPDX-FileCopyrightText: 2021 Noah Davis <noahadvs@gmail.com>
0005 
0006     SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-or-later
0007 */
0008 
0009 
0010 import QtQuick
0011 import QtQuick.Templates as T
0012 import org.kde.kirigami as Kirigami
0013 
0014 T.MenuSeparator {
0015     id: controlRoot
0016 
0017     implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
0018                             implicitContentWidth + leftPadding + rightPadding)
0019     implicitHeight: visible ? Math.max(implicitBackgroundHeight + topInset + bottomInset,
0020                              implicitContentHeight + topPadding + bottomPadding) : 0
0021 
0022     // Let optional chaining operator fallback to undefined which would call a
0023     // RESET method so that width would follow implicit width automatically.
0024     width: parent?.width
0025 
0026     verticalPadding: Math.round(Kirigami.Units.smallSpacing / 2)
0027     hoverEnabled: false
0028     focusPolicy: Qt.NoFocus
0029 
0030     contentItem: Kirigami.Separator {
0031         // same as MenuItem background
0032         implicitWidth: Kirigami.Units.gridUnit * 8
0033     }
0034 }