Kstars

KSMenuItem.qml
1// SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4import QtQuick 2.7
5import QtQuick.Controls 2.0
6import "../../constants/" 1.0
7
8MenuItem {
9 id: menuItem
10 onVisibleChanged: {
11 //Height stays the same when visible is changed so we update height manually
12 height = visible ? implicitHeight : 0
13 }
14
15 contentItem: Text {
16 text: menuItem.text
17 font: menuItem.font
18 color: Num.sysPalette.text
19 opacity: enabled ? 1.0 : 0.3
20 }
21
22 Rectangle {
23 width: parent.width - 10
24 height: 1
25 color: Num.sysPalette.light
26 anchors {
27 bottom: parent.bottom
28 bottomMargin: 5
29 horizontalCenter: parent.horizontalCenter
30 }
31 }
32}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.