Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions qgcresources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<file alias="clockwise-arrow.svg">resources/clockwise-arrow.svg</file>
<file alias="counter-clockwise-arrow.svg">resources/counter-clockwise-arrow.svg</file>
<file alias="chevron-down.svg">resources/chevron-down.svg</file>
<file alias="chevron-double-right.svg">resources/chevron-double-right.svg</file>
<file alias="chevron-up.svg">resources/chevron-up.svg</file>
<file alias="DropArrow.svg">resources/DropArrow.svg</file>
<file alias="gear-black.svg">resources/gear-black.svg</file>
Expand Down
2 changes: 2 additions & 0 deletions resources/chevron-double-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 14 additions & 13 deletions src/QmlControls/QGCDelayButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import QtQuick.Layouts
import QGroundControl
import QGroundControl.Controls


DelayButton {
id: control
hoverEnabled: !ScreenTools.isMobile
Expand Down Expand Up @@ -69,19 +68,21 @@ DelayButton {
border.width: showBorder ? 1 : 0
border.color: qgcPal.buttonBorder

gradient: Gradient {
orientation: Gradient.Horizontal

GradientStop { position: 0.0; color: qgcPal.buttonHighlight }
GradientStop { position: 0.15; color: qgcPal.button }
}
QGCColoredImage {
anchors.topMargin: _sliderIndicatorMargin
anchors.bottomMargin: _sliderIndicatorMargin
anchors.leftMargin: control.pressed ? (parent.width - width) * control.progress : 0
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: height
source: "qrc:/res/chevron-double-right.svg"
sourceSize.height: parent.height
fillMode: Image.PreserveAspectFit
color: qgcPal.buttonText
opacity: 0.2

Rectangle {
anchors.fill: parent
anchors.rightMargin: control.pressed ? parent.width * (1.0 - control.progress) : 0
color: qgcPal.buttonHighlight
opacity: _showHighlight ? 1 : control.enabled && control.hovered ? .2 : 0
radius: parent.radius
property real _sliderIndicatorMargin: ScreenTools.defaultFontPixelWidth * 0.5
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The property _sliderIndicatorMargin is defined at the bottom of the QGCColoredImage component (line 85), after all the other properties have been set. In QML, it's more conventional and readable to declare properties at the beginning of a component block, before they are used.

Consider moving this property declaration to the top of the QGCColoredImage block (after line 71) for better readability:

QGCColoredImage {
    property real _sliderIndicatorMargin: ScreenTools.defaultFontPixelWidth * 0.5
    
    anchors.topMargin:      _sliderIndicatorMargin
    anchors.bottomMargin:   _sliderIndicatorMargin
    // ... rest of properties
}

Copilot uses AI. Check for mistakes.
}

QGCLabel {
Expand Down
Loading