Warning, /education/kstars/kstars/kstarslite/qml/modules/helpers/KSMenuItem.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
0002 // SPDX-License-Identifier: GPL-2.0-or-later
0003
0004 import QtQuick 2.7
0005 import QtQuick.Controls 2.0
0006 import "../../constants/" 1.0
0007
0008 MenuItem {
0009 id: menuItem
0010 onVisibleChanged: {
0011 //Height stays the same when visible is changed so we update height manually
0012 height = visible ? implicitHeight : 0
0013 }
0014
0015 contentItem: Text {
0016 text: menuItem.text
0017 font: menuItem.font
0018 color: Num.sysPalette.text
0019 opacity: enabled ? 1.0 : 0.3
0020 }
0021
0022 Rectangle {
0023 width: parent.width - 10
0024 height: 1
0025 color: Num.sysPalette.light
0026 anchors {
0027 bottom: parent.bottom
0028 bottomMargin: 5
0029 horizontalCenter: parent.horizontalCenter
0030 }
0031 }
0032 }