Skip to content

Commit

Permalink
Flow settings OSD -> Widgets first, remove record widget (merged into…
Browse files Browse the repository at this point in the history
… video widget), add categorizer and re-order osd widget on / off settings
  • Loading branch information
Consti10 committed Nov 6, 2023
1 parent 4906a66 commit c330b72
Show file tree
Hide file tree
Showing 8 changed files with 437 additions and 836 deletions.
3 changes: 2 additions & 1 deletion qml/qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@
<file>video/SecondaryVideoGStreamer.qml</file>
<file>video/MainVideoQSG.qml</file>
<file>ui/widgets/VideoBitrateWidgetSecondary.qml</file>
<file>ui/widgets/RecordVideoWidget.qml</file>
<file>ui/widgets/RCRssiWidget.qml</file>
<file>video/ExpMainVideoAndroid.qml</file>
<file>ui/elements/WorkaroundMessageBox.qml</file>
Expand Down Expand Up @@ -260,5 +259,7 @@
<file>ui/configpopup/status/StatusCardsColumn.qml</file>
<file>ui/elements/SimpleLeftRightText.qml</file>
<file>video/SecondaryVideoGstreamerPane.qml</file>
<file>ui/elements/SettingsHeaderElement.qml</file>
<file>ui/configpopup/qopenhd_settings/AppWidgetStyleSettingsView.qml</file>
</qresource>
</RCC>
30 changes: 13 additions & 17 deletions qml/ui/HUDOverlayGrid.qml
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,19 @@ Item {
var ret=downlink
if(index==0)return settingsButtonHighlight;
if(index==1)return downlink;
if(index==2)return record_video_widget;
if(index==3)return wBLinkRateControlWidget;
if(index==4)return qRenderStatsWidget;
if(index==5)return bitrate1;
if(index==6)return bitrate2;
if(index==7)return air_status;
if(index==8)return ground_status;
if(index==9)return uplink;
if(index==10)return air_battery;
if(index==11)return flight_mode;
if(index==12)return throttleWidget;
if(index==13)return missionWidget;
if(index==14)return gps;
if(index==15)return home_distance;
if(index==2)return wBLinkRateControlWidget;
if(index==3)return qRenderStatsWidget;
if(index==4)return bitrate1;
if(index==5)return bitrate2;
if(index==6)return air_status;
if(index==7)return ground_status;
if(index==8)return uplink;
if(index==9)return air_battery;
if(index==10)return flight_mode;
if(index==11)return throttleWidget;
if(index==12)return missionWidget;
if(index==13)return gps;
if(index==14)return home_distance;
//if(index==13)return uplink;
console.log("Invalid index");
return ret;
Expand Down Expand Up @@ -272,9 +271,6 @@ Item {
id: downlink
m_next_item: record_video_widget
}
RecordVideoWidget {
id: record_video_widget
}
WBLinkRateControlWidget{
id: wBLinkRateControlWidget
}
Expand Down
50 changes: 50 additions & 0 deletions qml/ui/configpopup/qopenhd_settings/AppGeneralSettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,56 @@ ScrollView {
}
}

Rectangle {
width: parent.width
height: rowHeight
color: (Positioner.index % 2 == 0) ? "#8cbfd7f3" : "#00000000"

Text {
text: qsTr("Animation Smoothing,0 to disable")
font.weight: Font.Bold
font.pixelSize: 13
anchors.leftMargin: 8
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
width: 224
height: elementHeight
anchors.left: parent.left
}

Text {
text: Number(settings.smoothing).toLocaleString(Qt.locale(), 'f', 0) + "ms";
font.pixelSize: 16
anchors.right: smoothing_Slider.left
anchors.rightMargin: 12
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
width: 32
height: elementHeight

}

Slider {
id: smoothing_Slider
height: elementHeight
width: 210
font.pixelSize: 14
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
to : 1000
from : 0
stepSize: 25
anchors.rightMargin: Qt.inputMethod.visible ? 78 : 18
value: settings.smoothing

// @disable-check M223
onValueChanged: {
// @disable-check M222
settings.smoothing = smoothing_Slider.value
}
}
}

Rectangle {

width: parent.width
Expand Down
10 changes: 10 additions & 0 deletions qml/ui/configpopup/qopenhd_settings/AppSettingsPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ Rectangle {
font.pixelSize: 13
}

TabButton {
text: qsTr("Style")
width: implicitWidth
height: 48
font.pixelSize: 13
}

TabButton {
y: 0
text: qsTr("General")
Expand Down Expand Up @@ -109,6 +116,9 @@ Rectangle {
AppWidgetSettingsView{
id: appWidgetSettingsView
}
AppWidgetStyleSettingsView{
id: appWidgetStyleSettingsView
}
AppGeneralSettingsView{
id: appGeneralSettingsView
}
Expand Down
Loading

0 comments on commit c330b72

Please sign in to comment.