several changes to cleaner code
This commit is contained in:
+18
-11
@@ -38,7 +38,7 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: tabBar.tabHeight
|
||||
|
||||
color: stack.currentIndex === 0 ? DynamicColors.tPalette.m3primaryContainer : "transparent"
|
||||
color: stack.currentIndex === 0 ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
|
||||
|
||||
StateLayer {
|
||||
|
||||
@@ -49,6 +49,7 @@ Item {
|
||||
CustomText {
|
||||
text: qsTr("Volumes")
|
||||
anchors.centerIn: parent
|
||||
color: stack.currentIndex === 0 ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3primary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,7 +59,7 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: tabBar.tabHeight
|
||||
|
||||
color: stack.currentIndex === 1 ? DynamicColors.tPalette.m3primaryContainer : "transparent"
|
||||
color: stack.currentIndex === 1 ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
|
||||
|
||||
StateLayer {
|
||||
|
||||
@@ -69,6 +70,7 @@ Item {
|
||||
CustomText {
|
||||
text: qsTr("Devices")
|
||||
anchors.centerIn: parent
|
||||
color: stack.currentIndex === 1 ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3primary
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,11 +135,11 @@ Item {
|
||||
Layout.preferredWidth: 40
|
||||
Layout.preferredHeight: 40
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: DynamicColors.tPalette.m3primaryContainer
|
||||
color: DynamicColors.palette.m3primary
|
||||
radius: 1000
|
||||
MaterialIcon {
|
||||
anchors.centerIn: parent
|
||||
color: DynamicColors.palette.m3onPrimaryContainer
|
||||
color: DynamicColors.palette.m3onPrimary
|
||||
text: "volume_up"
|
||||
font.pointSize: 22
|
||||
}
|
||||
@@ -167,7 +169,9 @@ Item {
|
||||
Layout.bottomMargin: 5
|
||||
|
||||
CustomSlider {
|
||||
anchors.fill: parent
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
implicitHeight: 10
|
||||
value: Audio.volume
|
||||
onMoved: Audio.setVolume(value)
|
||||
|
||||
@@ -185,12 +189,12 @@ Item {
|
||||
Layout.preferredWidth: 40
|
||||
Layout.preferredHeight: 40
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: DynamicColors.tPalette.m3primaryContainer
|
||||
color: DynamicColors.palette.m3primary
|
||||
radius: 1000
|
||||
MaterialIcon {
|
||||
anchors.centerIn: parent
|
||||
anchors.alignWhenCentered: false
|
||||
color: DynamicColors.palette.m3onPrimaryContainer
|
||||
color: DynamicColors.palette.m3onPrimary
|
||||
text: "mic"
|
||||
font.pointSize: 22
|
||||
}
|
||||
@@ -221,7 +225,9 @@ Item {
|
||||
implicitHeight: 10
|
||||
|
||||
CustomSlider {
|
||||
anchors.fill: parent
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
implicitHeight: 10
|
||||
value: Audio.sourceVolume
|
||||
onMoved: Audio.setSourceVolume(value)
|
||||
|
||||
@@ -421,10 +427,11 @@ Item {
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
|
||||
Layout.bottomMargin: 5
|
||||
implicitHeight: 10
|
||||
CustomAudioSlider {
|
||||
anchors.fill: parent
|
||||
CustomSlider {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
implicitHeight: 10
|
||||
value: appBox.modelData.audio.volume
|
||||
peak: peak.peak
|
||||
onMoved: {
|
||||
Audio.setAppAudioVolume(appBox.modelData, value)
|
||||
console.log(icon.iconPath1, icon.iconPath2)
|
||||
|
||||
+1
-9
@@ -7,6 +7,7 @@ import qs.Helpers as Helpers
|
||||
import qs.Components
|
||||
|
||||
Item {
|
||||
id: root
|
||||
required property PersistentProperties visibilities
|
||||
required property Wrapper popouts
|
||||
required property RowLayout loader
|
||||
@@ -38,15 +39,6 @@ Item {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onClicked: {
|
||||
root.visibilities.dashboard = !root.visibilities.dashboard;
|
||||
if ( root.visibilities.sidebar || root.popouts.hasCurrent ) {
|
||||
// Helpers.Calendar.displayYear = new Date().getFullYear();
|
||||
// Helpers.Calendar.displayMonth = new Date().getMonth();
|
||||
// root.popouts.currentName = "calendar";
|
||||
// root.popouts.currentCenter = Qt.binding( () => item.mapToItem( root.loader, root.implicitWidth / 2, 0 ).x );
|
||||
// root.popouts.hasCurrent = true;
|
||||
root.popouts.hasCurrent = false;
|
||||
root.visibilities.sidebar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,10 +42,6 @@ Item {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
root.visibilities.sidebar = !root.visibilities.sidebar;
|
||||
if ( root.visibilities.dashboard || root.popouts.hasCurrent ) {
|
||||
root.popouts.hasCurrent = false;
|
||||
root.visibilities.dashboard = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,15 @@ Item {
|
||||
|
||||
icon: `brightness_${(Math.round(value * 6) + 1)}`
|
||||
value: root.brightness
|
||||
onMoved: root.monitor?.setBrightness(value)
|
||||
onMoved: {
|
||||
if ( Config.osd.allMonBrightness ) {
|
||||
root.monitor?.setBrightness(value)
|
||||
} else {
|
||||
for (const mon of Brightness.monitors) {
|
||||
mon.setBrightness(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user