Skip to content

Commit

Permalink
Merge Lunkes UI improvements nr.1 (#644)
Browse files Browse the repository at this point in the history
* Refacter Controls for googles and custom

* Refactored Switch

* Refactor SpinBox

* Refactor Slider

* Switch Refactor

* Update PopupTxPowerEditor.qml

* Merge Lukes UI Improvements

Co-authored-by: Raphael <[email protected]>

---------

Co-authored-by: pilotnbr1 <[email protected]>
Co-authored-by: Luke <[email protected]>
Co-authored-by: Raphael <[email protected]>
  • Loading branch information
4 people authored Dec 15, 2023
1 parent 81e3623 commit 8ff20c3
Show file tree
Hide file tree
Showing 74 changed files with 893 additions and 274 deletions.
22 changes: 13 additions & 9 deletions qml/qml.qrc
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<RCC>
<qresource prefix="/translations" lang="en">
<qresource lang="en" prefix="/translations">
<file alias="QOpenHD.qm">../translations/QOpenHD_en.qm</file>
<file>resources/cursors/arrow_512_green.png</file>
<file>resources/cursors/arrow_512_transparent.png</file>
<file>resources/cursors/arrow_512_white.png</file>
<file>resources/cursors/hand_white.png</file>
</qresource>
<qresource prefix="/translations" lang="de">
<qresource lang="de" prefix="/translations">
<file alias="QOpenHD.qm">../translations/QOpenHD_de.qm</file>
</qresource>
<qresource prefix="/translations" lang="ru">
<qresource lang="ru" prefix="/translations">
<file alias="QOpenHD.qm">../translations/QOpenHD_ru.qm</file>
</qresource>
<qresource prefix="/translations" lang="es">
<qresource lang="es" prefix="/translations">
<file alias="QOpenHD.qm">../translations/QOpenHD_es.qm</file>
</qresource>
<qresource prefix="/translations" lang="fr">
<qresource lang="fr" prefix="/translations">
<file alias="QOpenHD.qm">../translations/QOpenHD_fr.qm</file>
</qresource>
<qresource prefix="/translations" lang="nl">
<qresource lang="nl" prefix="/translations">
<file alias="QOpenHD.qm">../translations/QOpenHD_nl.qm</file>
</qresource>
<qresource prefix="/translations" lang="ro">
<qresource lang="ro" prefix="/translations">
<file alias="QOpenHD.qm">../translations/QOpenHD_ro.qm</file>
</qresource>
<qresource prefix="/translations" lang="it">
<qresource lang="it" prefix="/translations">
<file alias="QOpenHD.qm">../translations/QOpenHD_it.qm</file>
</qresource>
<qresource prefix="/translations" lang="zh">
<qresource lang="zh" prefix="/translations">
<file alias="QOpenHD.qm">../translations/QOpenHD_zh.qm</file>
</qresource>
<qresource prefix="/">
Expand Down Expand Up @@ -187,6 +187,10 @@
<file>ui/elements/SettingBaseElement.qml</file>
<file>ui/widgets/WBLinkRateControlWidget.qml</file>
<file>ui/widgets/BaseWidgetDefaultUiControlElements.qml</file>
<file>ui/elements/NewSlider.qml</file>
<file>ui/elements/NewComboBox.qml</file>
<file>ui/elements/NewSwitch.qml</file>
<file>ui/elements/NewSpinBox.qml</file>
<file>resources/cursors/arrow_512_transparent.png</file>
<file>resources/cursors/arrow_512_green.png</file>
<file>resources/cursors/arrow_512_white.png</file>
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/connect/PaneConnectionMode.qml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Rectangle{
horizontalAlignment: Qt.AlignHCenter
font.pixelSize: settings.qopenhd_general_font_pixel_size
}
ComboBox {
NewComboBox {
Layout.fillWidth: false
Layout.fillHeight: true;
Layout.preferredWidth: 200
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/openhd_settings/LinkQuickPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Rectangle{
Row{
anchors.horizontalCenter: parent.horizontalCenter
spacing: 8
ComboBox {
NewComboBox {
width: elementComboBoxWidth
id: comboBoxFreq
model: frequencies_model
Expand Down
8 changes: 4 additions & 4 deletions qml/ui/configpopup/openhd_settings/MavlinkParamEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,10 @@ Rectangle{
// Value edit part begin

// Type int only begin --------------------------
// For int values that do not have an enum mapping, we use a SpinBox such that the user can either
// For int values that do not have an enum mapping, we use a NewSpinBox such that the user can either
// use the +/- to edit the value (for touch screen users) but also allows the user to
// type in an int value directly with the keyboard.
SpinBox {
NewSpinBox {
id: spinBoxInputParamtypeInt
height: customHeight
font.pixelSize: 14
Expand All @@ -352,7 +352,7 @@ Rectangle{
id: intEnumDynamicListModel
ListElement {title: "I SHOULD NEVER APPEAR"; value: 0}
}
ComboBox {
NewComboBox {
id: intEnumDynamicComboBox
height: customHeight
font.pixelSize: 14
Expand All @@ -373,7 +373,7 @@ Rectangle{
ListElement {title: "I SHOULD NEVER APPEAR"; value:"ERROR"}
}

ComboBox {
NewComboBox {
id: stringEnumDynamicComboBox
height: customHeight
font.pixelSize: 14
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/openhd_settings/MavlinkParamPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Rectangle {
_messageBoxInstance.set_text_and_show(text)
}
}
Switch{
NewSwitch{
checked: settings.screen_settings_openhd_parameters_transparent
onCheckedChanged: settings.screen_settings_openhd_parameters_transparent = checked
}
Expand Down
4 changes: 2 additions & 2 deletions qml/ui/configpopup/openhd_settings/PopupAnalyzeChannels.qml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Rectangle{
}
enabled: _ohdSystemGround.is_alive && _ohdSystemGround.wb_gnd_operating_mode==0
}
ComboBox {
NewComboBox {
Layout.preferredWidth: 150
Layout.minimumWidth: 50
id: comboBoxWhichFrequencyToAnalyze
Expand All @@ -124,7 +124,7 @@ Rectangle{
pollution_chart.update_pollution_graph();
}
}
Switch{
NewSwitch{
id:normalize_sw
checked: m_normalize_data
onCheckedChanged: {
Expand Down
4 changes: 2 additions & 2 deletions qml/ui/configpopup/openhd_settings/PopupEnableSTBCLDPC.qml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Rectangle{
}
}

ComboBox {
NewComboBox {
id: comboBoxNAntennasAir
Layout.minimumWidth: 100
Layout.preferredWidth: 450
Expand All @@ -91,7 +91,7 @@ Rectangle{
}
}
}
ComboBox {
NewComboBox {
id: comboBoxNAntennasGnd
Layout.minimumWidth: 100
Layout.preferredWidth: 450
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/openhd_settings/PopupScanChannels.qml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Rectangle{
}
}

ComboBox {
NewComboBox {
Layout.preferredWidth: 400
Layout.minimumWidth: 100
id: comboBoxWhichFrequencyToScan
Expand Down
16 changes: 8 additions & 8 deletions qml/ui/configpopup/qopenhd_settings/AppDevSettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ScrollView {
SettingBaseElement{
m_short_description: "DEV_SHOW_WHITELISTED_PARAMS"
m_long_description: "Enabling this gives you full controll over the mavlink parameters set openhd exposes (both air and ground) BUT BE WARNED yu can easily break things!"
Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand All @@ -46,7 +46,7 @@ ScrollView {
SettingBaseElement{
m_short_description:"DEV_SHOW_ADVANCED_BUTTON"
m_long_description: "Allows more customization of the mavlink parameters set than what openhd exposes, BE WARNED you can easily break things this way !"
Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand All @@ -60,7 +60,7 @@ ScrollView {
SettingBaseElement{
m_short_description:"dev_allow_freq_change_when_armed"
m_long_description: "Allows changing the frequency and channel width while armed, THIS CAN BREAK YOUR LINK DURING FLIGHT !"
Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand Down Expand Up @@ -142,7 +142,7 @@ ScrollView {
m_short_description: "Enable audio playback"
m_long_description: "Enable live audio playback in QOpenHD, NOTE: audio streaming is not supported in OpenHD yet. Requires restart of QOpenHD."

Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand All @@ -157,7 +157,7 @@ ScrollView {
m_short_description: "dirty_enable_inav_hacks"
m_long_description: "NEVER ENABLE UNLESS YOU HAVE TO. INAV mavlink support is quirky in some ways to say the least."

Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand All @@ -172,7 +172,7 @@ ScrollView {
m_short_description: "dirty_enable_mavlink_fc_sys_id_check"
m_long_description: "Only accept FCs that explicitly expose themselves as autopilot - can fix issues with FC discovery in QOpenHD."

Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand All @@ -187,7 +187,7 @@ ScrollView {
SettingBaseElement{
m_short_description: "dev_mavlink_via_tcp"
m_long_description: "Requires full restart. Connect via TCP instead of UDP. Requires matching server IP."
Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand Down Expand Up @@ -216,7 +216,7 @@ ScrollView {
SettingBaseElement{
m_short_description: "dev_wb_show_no_stbc_enabled_warning"
m_long_description: "Do not show the STBC recommended enabled message"
Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand Down
14 changes: 7 additions & 7 deletions qml/ui/configpopup/qopenhd_settings/AppGeneralSettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ScrollView {
m_short_description: "Enable speech"
m_long_description: "Enable text to speech - events like flight mode change are given as audio messages"

Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand Down Expand Up @@ -60,7 +60,7 @@ ScrollView {
anchors.left: parent.left
}

Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand Down Expand Up @@ -101,7 +101,7 @@ ScrollView {

}

Slider {
NewSlider {
id: smoothing_Slider
height: elementHeight
width: 210
Expand Down Expand Up @@ -141,7 +141,7 @@ ScrollView {
anchors.left: parent.left
}

SpinBox {
NewSpinBox {
id: gndBatteryCellspinBox
height: elementHeight
width: 210
Expand Down Expand Up @@ -204,7 +204,7 @@ ScrollView {
anchors.left: parent.left
}

SpinBox {
NewSpinBox {
id: dev_qopenhd_n_cameras_spinbox
height: elementHeight
width: 210
Expand All @@ -230,7 +230,7 @@ ScrollView {
m_short_description: "Mavlink sys id"
m_long_description: "Mavlink sys id of QOpenHD (this Ground control station application). Leave default (255) ! . Change requires restart."

SpinBox {
NewSpinBox {
id: mavlinkSysIDSpinBox
height: elementHeight
width: 210
Expand All @@ -256,7 +256,7 @@ ScrollView {
m_short_description: "Hide identity offset lattitude"
m_long_description: "Set this to a random value only you know to hide lat identity"

/*SpinBox {
/*NewSpinBox {
height: elementHeight
width: 210
font.pixelSize: 14
Expand Down
22 changes: 11 additions & 11 deletions qml/ui/configpopup/qopenhd_settings/AppScreenSettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ScrollView {

}

Slider {
NewSlider {
id: screenScaleSpinBox
height: elementHeight
width: 210
Expand All @@ -70,7 +70,7 @@ ScrollView {
m_short_description: "Cursor AutoHide"
m_long_description: "Automatically hide cursor on inactivity"

Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand All @@ -89,7 +89,7 @@ ScrollView {
SettingBaseElement{
m_short_description: "Custom cursor"
m_long_description: "Customize cursor for high visibility in the field"
SpinBox {
NewSpinBox {
width: 210
font.pixelSize: 14
height: elementHeight
Expand All @@ -111,7 +111,7 @@ ScrollView {
m_short_description: "Custom cursor scale"
m_long_description: "Scale of your custom cursor. NOTE: Only works if custom cursor is not 0 !"

SpinBox {
NewSpinBox {
width: 210
font.pixelSize: 14
height: elementHeight
Expand All @@ -137,7 +137,7 @@ ScrollView {
m_short_description: "Screen rotation"
m_long_description: "Rotate QOpenHD, can be usefull if your screen is installed the wrong way around. Might or might not work."
// anything other than 0 and 180 can breaks things
ComboBox {
NewComboBox {
height: elementHeight
anchors.right: parent.right
anchors.rightMargin: Qt.inputMethod.visible ? 78 : 18
Expand Down Expand Up @@ -169,7 +169,7 @@ ScrollView {
m_short_description: "Background transparent"
m_long_description: "Use a transparent surface, such that another application can play (hw composer accelerated) video behind the QOpenHD surface."

Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand All @@ -184,7 +184,7 @@ ScrollView {
m_short_description: "Force full screen"
m_long_description: "Force Full screen if QOpenHD is not already full screen"

Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand All @@ -199,7 +199,7 @@ ScrollView {
m_short_description: "Swap interval 0"
m_long_description: "Can decrease latency on x86 / laptop. Requires restart. Experimental."

Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand All @@ -215,7 +215,7 @@ ScrollView {
m_short_description: "Settings window size"
m_long_description: "Change the size of the settings window, such that you can view the live video while changing settings"

SpinBox {
NewSpinBox {
width: 210
font.pixelSize: 14
height: elementHeight
Expand All @@ -236,7 +236,7 @@ ScrollView {
m_short_description: "Settings window transparency"
m_long_description: "make the openhd parameters window semi-transparent"

Switch {
NewSwitch {
width: 32
height: elementHeight
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
Expand All @@ -250,7 +250,7 @@ ScrollView {
SettingBaseElement{
m_short_description: "Font DPI"
m_long_description: "Scale the text / line size of the artifical horizon / ladders, requires restart of QOpenHD."
ComboBox {
NewComboBox {
height: elementHeight
anchors.right: parent.right
anchors.rightMargin: Qt.inputMethod.visible ? 78 : 18
Expand Down
Loading

0 comments on commit 8ff20c3

Please sign in to comment.