diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 076561bf3aff8c0e1991079d212fb8550297c213..148e3fa81f0656f24069cc7b43b58aa672f4e2fa 100644 --- a/qgroundcontrol.qrc +++ b/qgroundcontrol.qrc @@ -125,6 +125,8 @@ src/QmlControls/QGCRadioButton.qml src/QmlControls/QGCSlider.qml src/QmlControls/QGCSwitch.qml + src/QmlControls/QGCTabBar.qml + src/QmlControls/QGCTabButton.qml src/QmlControls/QGCTextField.qml src/QmlControls/QGCToolBarButton.qml src/QmlControls/QGCViewDialog.qml diff --git a/src/QmlControls/QGCTabBar.qml b/src/QmlControls/QGCTabBar.qml new file mode 100644 index 0000000000000000000000000000000000000000..e7189fbfc8d6936daf3e1b179212837f0b0f7294 --- /dev/null +++ b/src/QmlControls/QGCTabBar.qml @@ -0,0 +1,13 @@ +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 + } +} diff --git a/src/QmlControls/QGCTabButton.qml b/src/QmlControls/QGCTabButton.qml new file mode 100644 index 0000000000000000000000000000000000000000..da72e0e2849568e313466c8c69670ac6264e355a --- /dev/null +++ b/src/QmlControls/QGCTabButton.qml @@ -0,0 +1,22 @@ +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 + } +} diff --git a/src/QmlControls/QGroundControl/Controls/qmldir b/src/QmlControls/QGroundControl/Controls/qmldir index 2d079c6765bb7ff04404f09ecd26d3157017e082..219191864f612881c12937076ce87739b793584f 100644 --- a/src/QmlControls/QGroundControl/Controls/qmldir +++ b/src/QmlControls/QGroundControl/Controls/qmldir @@ -60,6 +60,8 @@ QGCPipable 1.0 QGCPipable.qml QGCRadioButton 1.0 QGCRadioButton.qml QGCSlider 1.0 QGCSlider.qml QGCSwitch 1.0 QGCSwitch.qml +QGCTabBar 1.0 QGCTabBar.qml +QGCTabButton 1.0 QGCTabButton.qml QGCTextField 1.0 QGCTextField.qml QGCToolBarButton 1.0 QGCToolBarButton.qml QGCViewDialog 1.0 QGCViewDialog.qml diff --git a/src/VehicleSetup/JoystickConfig.qml b/src/VehicleSetup/JoystickConfig.qml index c141ab434fb48afca41f9561dd0b61e51518e981..4f3dd9dab4ba864b02bec3b313cae537499d3d5b 100644 --- a/src/VehicleSetup/JoystickConfig.qml +++ b/src/VehicleSetup/JoystickConfig.qml @@ -58,20 +58,20 @@ SetupPage { id: controller } - TabBar { + QGCTabBar { id: bar width: parent.width anchors.top: parent.top - TabButton { + QGCTabButton { text: qsTr("General") } - TabButton { + QGCTabButton { text: qsTr("Button Assigment") } - TabButton { + QGCTabButton { text: qsTr("Calibration") } - TabButton { + QGCTabButton { text: qsTr("Advanced") } }