Commit 4900b606 authored by Gus Grubba's avatar Gus Grubba

Forgot to customize TabBar and TabButton

parent 7321cef6
...@@ -125,6 +125,8 @@ ...@@ -125,6 +125,8 @@
<file alias="QGroundControl/Controls/QGCRadioButton.qml">src/QmlControls/QGCRadioButton.qml</file> <file alias="QGroundControl/Controls/QGCRadioButton.qml">src/QmlControls/QGCRadioButton.qml</file>
<file alias="QGroundControl/Controls/QGCSlider.qml">src/QmlControls/QGCSlider.qml</file> <file alias="QGroundControl/Controls/QGCSlider.qml">src/QmlControls/QGCSlider.qml</file>
<file alias="QGroundControl/Controls/QGCSwitch.qml">src/QmlControls/QGCSwitch.qml</file> <file alias="QGroundControl/Controls/QGCSwitch.qml">src/QmlControls/QGCSwitch.qml</file>
<file alias="QGroundControl/Controls/QGCTabBar.qml">src/QmlControls/QGCTabBar.qml</file>
<file alias="QGroundControl/Controls/QGCTabButton.qml">src/QmlControls/QGCTabButton.qml</file>
<file alias="QGroundControl/Controls/QGCTextField.qml">src/QmlControls/QGCTextField.qml</file> <file alias="QGroundControl/Controls/QGCTextField.qml">src/QmlControls/QGCTextField.qml</file>
<file alias="QGroundControl/Controls/QGCToolBarButton.qml">src/QmlControls/QGCToolBarButton.qml</file> <file alias="QGroundControl/Controls/QGCToolBarButton.qml">src/QmlControls/QGCToolBarButton.qml</file>
<file alias="QGroundControl/Controls/QGCViewDialog.qml">src/QmlControls/QGCViewDialog.qml</file> <file alias="QGroundControl/Controls/QGCViewDialog.qml">src/QmlControls/QGCViewDialog.qml</file>
......
import QtQuick 2.11
import QtQuick.Controls 2.4
import QGroundControl 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
TabBar {
background: Rectangle {
color: qgcPal.window
}
}
import QtQuick 2.11
import QtQuick.Controls 2.4
import QGroundControl 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
TabButton {
id: control
property bool _showHighlight: (pressed | hovered | checked)
background: Rectangle {
color: _showHighlight ? qgcPal.buttonHighlight : qgcPal.button
}
contentItem: QGCLabel {
text: control.text
color: _showHighlight ? qgcPal.buttonHighlightText : qgcPal.buttonText
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
}
...@@ -60,6 +60,8 @@ QGCPipable 1.0 QGCPipable.qml ...@@ -60,6 +60,8 @@ QGCPipable 1.0 QGCPipable.qml
QGCRadioButton 1.0 QGCRadioButton.qml QGCRadioButton 1.0 QGCRadioButton.qml
QGCSlider 1.0 QGCSlider.qml QGCSlider 1.0 QGCSlider.qml
QGCSwitch 1.0 QGCSwitch.qml QGCSwitch 1.0 QGCSwitch.qml
QGCTabBar 1.0 QGCTabBar.qml
QGCTabButton 1.0 QGCTabButton.qml
QGCTextField 1.0 QGCTextField.qml QGCTextField 1.0 QGCTextField.qml
QGCToolBarButton 1.0 QGCToolBarButton.qml QGCToolBarButton 1.0 QGCToolBarButton.qml
QGCViewDialog 1.0 QGCViewDialog.qml QGCViewDialog 1.0 QGCViewDialog.qml
......
...@@ -58,20 +58,20 @@ SetupPage { ...@@ -58,20 +58,20 @@ SetupPage {
id: controller id: controller
} }
TabBar { QGCTabBar {
id: bar id: bar
width: parent.width width: parent.width
anchors.top: parent.top anchors.top: parent.top
TabButton { QGCTabButton {
text: qsTr("General") text: qsTr("General")
} }
TabButton { QGCTabButton {
text: qsTr("Button Assigment") text: qsTr("Button Assigment")
} }
TabButton { QGCTabButton {
text: qsTr("Calibration") text: qsTr("Calibration")
} }
TabButton { QGCTabButton {
text: qsTr("Advanced") text: qsTr("Advanced")
} }
} }
......
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