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
2 changes: 1 addition & 1 deletion resources/AdvancedTabComponents/AdvancedNetworkingTab.qml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Item {
Layout.preferredHeight: Constants.networking.refreshButtonHeight
Layout.fillWidth: true

SwiftButton {
Button {
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: Constants.networking.refreshButtonVerticalOffset
ToolTip.visible: hovered
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "../Constants"
import "../BaseComponents"
import QtCharts
import QtQuick
import QtQuick.Controls
Expand All @@ -22,7 +23,7 @@ RowLayout {
antialiasing: Globals.useAntiAliasing
}

ComboBox {
SwiftComboBox {
id: channelDropdown

Layout.preferredHeight: Constants.advancedSpectrumAnalyzer.dropdownHeight
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Item {
Layout.fillHeight: true
}

SwiftButton {
Button {
id: resetButton

Layout.preferredWidth: parent.width * 0.5
Expand Down
4 changes: 2 additions & 2 deletions resources/AdvancedTabComponents/MessageBroadcaster.qml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Item {
Layout.fillHeight: true
Layout.preferredWidth: parent.width / 2

SwiftButton {
Button {
id: startButton

width: parent.width
Expand Down Expand Up @@ -278,7 +278,7 @@ Item {
Layout.fillHeight: true
Layout.preferredWidth: parent.width / 2

SwiftButton {
Button {
id: stopButton

enabled: false
Expand Down
3 changes: 3 additions & 0 deletions resources/BaseComponents/SmallCheckBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import QtQuick.Templates as T
T.CheckBox {
id: control

property alias indicatorHeight: control.indicator.height
property alias indicatorWidth: control.indicator.width

spacing: 2
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,25 @@
**
****************************************************************************/
import QtQuick
import QtQuick.Controls.Material
import QtQuick.Controls.Material.impl
import QtQuick.Window
import QtQuick.Controls.impl
import QtQuick.Templates as T
import QtQuick.Window
import QtQuick.Controls.Material
import QtQuick.Controls.Material.impl

T.ComboBox {
id: control

implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding)

topInset: 6
bottomInset: 6

leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
Material.elevation: flat ? control.pressed || control.hovered ? 2 : 0 : control.pressed ? 8 : 2

Material.elevation: flat ? control.pressed || (enabled && control.hovered) ? 2 : 0 : control.pressed ? 8 : 2
Material.background: flat ? "transparent" : undefined
Material.foreground: flat ? undefined : Material.primaryTextColor

Expand All @@ -77,13 +80,16 @@ T.ComboBox {
padding: 6
leftPadding: control.editable ? 2 : control.mirrored ? 0 : 12
rightPadding: control.editable ? 2 : control.mirrored ? 12 : 0

text: control.editable ? control.editText : control.displayText

enabled: control.editable
autoScroll: control.editable
readOnly: control.down
inputMethodHints: control.inputMethodHints
validator: control.validator
selectByMouse: control.selectTextByMouse

font: control.font
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
selectionColor: control.Material.accentColor
Expand All @@ -97,9 +103,14 @@ T.ComboBox {
background: Rectangle {
implicitWidth: 120
implicitHeight: control.Material.buttonHeight

radius: control.flat ? 0 : 2
color: !control.editable ? control.Material.dialogColor : "transparent"

layer.enabled: control.enabled && !control.editable && control.Material.background.a > 0
layer.effect: ElevationEffect {
elevation: control.Material.elevation
}

Rectangle {
visible: control.editable
Expand All @@ -117,13 +128,9 @@ T.ComboBox {
height: parent.height
pressed: control.pressed
anchor: control.editable && control.indicator ? control.indicator : control
active: control.pressed || control.visualFocus || control.hovered
active: enabled && (control.pressed || control.visualFocus || control.hovered)
color: control.Material.rippleColor
}

layer.effect: ElevationEffect {
elevation: control.Material.elevation
}
}

popup: T.Popup {
Expand All @@ -133,6 +140,7 @@ T.ComboBox {
transformOrigin: Item.Top
topMargin: 12
bottomMargin: 12

Material.theme: control.Material.theme
Material.accent: control.Material.accent
Material.primary: control.Material.primary
Expand All @@ -145,10 +153,9 @@ T.ComboBox {
easing.type: Easing.OutQuint
duration: 220
}

NumberAnimation {
property: "opacity"
from: 0
from: 0.0
easing.type: Easing.OutCubic
duration: 150
}
Expand All @@ -162,10 +169,9 @@ T.ComboBox {
easing.type: Easing.OutQuint
duration: 220
}

NumberAnimation {
property: "opacity"
to: 0
to: 0.0
easing.type: Easing.OutCubic
duration: 150
}
Expand All @@ -185,8 +191,8 @@ T.ComboBox {
background: Rectangle {
radius: 2
color: parent.Material.dialogColor
layer.enabled: control.enabled

layer.enabled: control.enabled
layer.effect: ElevationEffect {
elevation: 8
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
import "../../Constants"
import "../Constants"
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.impl
import QtQuick.Templates as T

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,23 @@
** $QT_END_LICENSE$
**
****************************************************************************/
import "../Constants"
import QtQuick
import QtQuick.Templates as T
import QtQuick.Controls.Material
import QtQuick.Controls.Material.impl
import QtQuick.Templates as T

T.TabBar {
id: control

property var orientation: ListView.Horizontal

implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding)

contentItem: ListView {
model: control.contentModel
currentIndex: control.currentIndex
spacing: control.spacing
orientation: control.orientation
orientation: ListView.Horizontal
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.AutoFlickIfNeeded
snapMode: ListView.SnapToItem
Expand All @@ -79,7 +78,7 @@ T.TabBar {
background: Item {
Rectangle {
anchors.fill: parent
color: "white"
color: Constants.swiftWhite
layer.enabled: control.Material.elevation > 0

layer.effect: ElevationEffect {
Expand Down
60 changes: 60 additions & 0 deletions resources/BaseComponents/SwiftTabButton.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import "../Constants"
import QtQuick
import QtQuick.Controls.Material
import QtQuick.Controls.Material.impl
import QtQuick.Controls.impl
import QtQuick.Templates as T

T.TabButton {
id: control

property color labelColor: !control.enabled ? control.Material.hintTextColor : control.down || control.checked ? Constants.swiftWhite : Constants.tabButtonUnselectedTextColor
property color gradientStartColor: down || checked ? Qt.lighter(Constants.swiftGrey, 1.7) : hovered ? Qt.lighter(Constants.swiftControlBackground, 1.1) : Constants.swiftWhite
property color backgroundColor: down || checked ? Constants.swiftGrey : hovered ? Qt.darker(Constants.swiftControlBackground, 1.1) : Constants.swiftControlBackground
property bool border: true

implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding)
padding: 12
spacing: 6
icon.width: 24
icon.height: 24
icon.color: !enabled ? Material.hintTextColor : down || checked ? Constants.swiftWhite : Constants.tabButtonUnselectedTextColor

font {
family: "Roboto"
pixelSize: Constants.largePixelSize
bold: true
capitalization: Font.MixedCase
}

contentItem: IconLabel {
spacing: control.spacing
mirrored: control.mirrored
display: control.display
icon: control.icon
text: control.text
font: control.font
color: control.labelColor
}

background: Rectangle {
border.width: control.border ? 1 : 0
border.color: Constants.spacerColor
implicitHeight: control.Material.touchTarget
clip: true
color: backgroundColor

gradient: Gradient {
GradientStop {
position: 0
color: gradientStartColor
}

GradientStop {
position: 1
color: backgroundColor
}
}
}
}
10 changes: 5 additions & 5 deletions resources/BaselineTabComponents/BaselinePlot.qml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Item {
Layout.alignment: Qt.AlignLeft
Layout.leftMargin: Constants.baselinePlot.navBarMargin

SwiftButton {
Button {
id: baselinePauseButton

ButtonGroup.group: baselineButtonGroup
Expand All @@ -63,7 +63,7 @@ Item {
}
}

SwiftButton {
Button {
id: baselineClearButton

onPressed: backend_request_broker.baseline_plot([baselineButtonGroup.buttons[2].checked, baselineButtonGroup.buttons[1].pressed, baselineButtonGroup.buttons[0].pressed])
Expand All @@ -90,7 +90,7 @@ Item {
}
}

SwiftButton {
Button {
id: baselineZoomAllButton

onClicked: {
Expand All @@ -116,7 +116,7 @@ Item {
}
}

SwiftButton {
Button {
id: baselineCenterButton

onClicked: {
Expand All @@ -142,7 +142,7 @@ Item {
}
}

SwiftButton {
Button {
id: baselineResetFiltersButton

onPressed: backend_request_broker.baseline_plot([baselineButtonGroup.buttons[2].checked, baselineButtonGroup.buttons[1].pressed, baselineButtonGroup.buttons[0].pressed])
Expand Down
Loading