Kstars

KSMenuItem.qml
1 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
2 // SPDX-License-Identifier: GPL-2.0-or-later
3 
4 import QtQuick 2.7
5 import QtQuick.Controls 2.0
6 import "../../constants/" 1.0
7 
8 MenuItem {
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-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.