Commit 505b2523 authored by DonLakeFlyer's avatar DonLakeFlyer

parent 654ac76e
import QtQuick 2.11 import QtQuick 2.12
import QtQuick.Controls 2.4 import QtQuick.Controls 2.12
import QtQuick.Controls.impl 2.12
import QtQml 2.12
import QGroundControl 1.0 import QGroundControl 1.0
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
...@@ -8,16 +10,24 @@ import QGroundControl.ScreenTools 1.0 ...@@ -8,16 +10,24 @@ import QGroundControl.ScreenTools 1.0
TabButton { TabButton {
id: control id: control
font.pointSize: ScreenTools.defaultFontPointSize
font.family: ScreenTools.normalFontFamily
property bool _showHighlight: (pressed | hovered | checked) property bool _showHighlight: (pressed | hovered | checked)
QGCPalette { id: qgcPalDisabled; colorGroupEnabled: false }
background: Rectangle { QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
color: enabled ? (_showHighlight ? qgcPal.buttonHighlight : qgcPal.button) : qgcPalDisabled.button
} contentItem: IconLabel {
contentItem: QGCLabel { spacing: control.spacing
mirrored: control.mirrored
display: control.display
icon: control.icon
text: control.text text: control.text
color: enabled ? (_showHighlight ? qgcPal.buttonHighlightText : qgcPal.buttonText) : qgcPalDisabled.buttonText font: control.font
horizontalAlignment: Text.AlignHCenter color: _showHighlight ? qgcPal.buttonHighlightText : qgcPal.buttonText
verticalAlignment: Text.AlignVCenter }
elide: Text.ElideRight
background: Rectangle {
color: _showHighlight ? qgcPal.buttonHighlight : qgcPal.button
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment