|
|
|
@ -1,5 +1,7 @@
@@ -1,5 +1,7 @@
|
|
|
|
|
import QtQuick 2.11 |
|
|
|
|
import QtQuick.Controls 2.4 |
|
|
|
|
import QtQuick 2.12 |
|
|
|
|
import QtQuick.Controls 2.12 |
|
|
|
|
import QtQuick.Controls.impl 2.12 |
|
|
|
|
import QtQml 2.12 |
|
|
|
|
|
|
|
|
|
import QGroundControl 1.0 |
|
|
|
|
import QGroundControl.Palette 1.0 |
|
|
|
@ -7,17 +9,25 @@ import QGroundControl.Controls 1.0
@@ -7,17 +9,25 @@ import QGroundControl.Controls 1.0
|
|
|
|
|
import QGroundControl.ScreenTools 1.0 |
|
|
|
|
|
|
|
|
|
TabButton { |
|
|
|
|
id: control |
|
|
|
|
id: control |
|
|
|
|
font.pointSize: ScreenTools.defaultFontPointSize |
|
|
|
|
font.family: ScreenTools.normalFontFamily |
|
|
|
|
|
|
|
|
|
property bool _showHighlight: (pressed | hovered | checked) |
|
|
|
|
QGCPalette { id: qgcPalDisabled; colorGroupEnabled: false } |
|
|
|
|
background: Rectangle { |
|
|
|
|
color: enabled ? (_showHighlight ? qgcPal.buttonHighlight : qgcPal.button) : qgcPalDisabled.button |
|
|
|
|
|
|
|
|
|
QGCPalette { id: qgcPal; colorGroupEnabled: enabled } |
|
|
|
|
|
|
|
|
|
contentItem: IconLabel { |
|
|
|
|
spacing: control.spacing |
|
|
|
|
mirrored: control.mirrored |
|
|
|
|
display: control.display |
|
|
|
|
icon: control.icon |
|
|
|
|
text: control.text |
|
|
|
|
font: control.font |
|
|
|
|
color: _showHighlight ? qgcPal.buttonHighlightText : qgcPal.buttonText |
|
|
|
|
} |
|
|
|
|
contentItem: QGCLabel { |
|
|
|
|
text: control.text |
|
|
|
|
color: enabled ? (_showHighlight ? qgcPal.buttonHighlightText : qgcPal.buttonText) : qgcPalDisabled.buttonText |
|
|
|
|
horizontalAlignment: Text.AlignHCenter |
|
|
|
|
verticalAlignment: Text.AlignVCenter |
|
|
|
|
elide: Text.ElideRight |
|
|
|
|
|
|
|
|
|
background: Rectangle { |
|
|
|
|
color: _showHighlight ? qgcPal.buttonHighlight : qgcPal.button |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|