merge main #11
@@ -66,13 +66,12 @@ Variants {
|
||||
y: Config.barConfig.autoHide && !visibilities.bar ? 4 : 34
|
||||
|
||||
property list<Region> nullRegions: []
|
||||
property bool hcurrent: ( panels.popouts.hasCurrent && panels.popouts.currentName.startsWith("traymenu") ) || visibilities.sidebar || visibilities.dashboard
|
||||
|
||||
width: hcurrent ? 0 : bar.width
|
||||
height: hcurrent ? 0 : bar.screen.height - backgroundRect.implicitHeight
|
||||
width: bar.width
|
||||
height: bar.screen.height - backgroundRect.implicitHeight
|
||||
intersection: Intersection.Xor
|
||||
|
||||
regions: hcurrent ? nullRegions : popoutRegions.instances
|
||||
regions: popoutRegions.instances
|
||||
}
|
||||
|
||||
Variants {
|
||||
@@ -93,13 +92,14 @@ Variants {
|
||||
HyprlandFocusGrab {
|
||||
id: focusGrab
|
||||
|
||||
active: visibilities.launcher || visibilities.sidebar
|
||||
active: visibilities.launcher || visibilities.sidebar || visibilities.dashboard || visibilities.osd || ( panels.popouts.hasCurrent && panels.popouts.currentName.startsWith( "traymenu" ))
|
||||
windows: [bar]
|
||||
onCleared: {
|
||||
visibilities.launcher = false;
|
||||
visibilities.sidebar = false;
|
||||
visibilities.dashboard = false;
|
||||
visibilities.osd = false;
|
||||
panels.popouts.hasCurrent = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ Slider {
|
||||
id: root
|
||||
|
||||
required property real peak
|
||||
property color nonPeakColor: DynamicColors.tPalette.m3primary
|
||||
property color peakColor: DynamicColors.palette.m3primary
|
||||
|
||||
background: Item {
|
||||
CustomRect {
|
||||
@@ -16,9 +18,9 @@ Slider {
|
||||
anchors.topMargin: root.implicitHeight / 3
|
||||
anchors.bottomMargin: root.implicitHeight / 3
|
||||
|
||||
implicitWidth: root.handle.x - root.implicitHeight / 6
|
||||
implicitWidth: root.handle.x - root.implicitHeight
|
||||
|
||||
color: DynamicColors.palette.m3primaryContainer
|
||||
color: root.nonPeakColor
|
||||
radius: 1000
|
||||
topRightRadius: root.implicitHeight / 15
|
||||
bottomRightRadius: root.implicitHeight / 15
|
||||
@@ -33,7 +35,7 @@ Slider {
|
||||
topRightRadius: root.implicitHeight / 15
|
||||
bottomRightRadius: root.implicitHeight / 15
|
||||
|
||||
color: DynamicColors.palette.m3primary
|
||||
color: root.peakColor
|
||||
|
||||
Behavior on implicitWidth {
|
||||
Anim { duration: 50 }
|
||||
@@ -48,7 +50,12 @@ Slider {
|
||||
anchors.topMargin: root.implicitHeight / 3
|
||||
anchors.bottomMargin: root.implicitHeight / 3
|
||||
|
||||
implicitWidth: parent.width - root.handle.x - root.handle.implicitWidth - root.implicitHeight / 6
|
||||
implicitWidth: root.implicitWidth - root.handle.x - root.handle.implicitWidth - root.implicitHeight
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log(root.handle.x, implicitWidth)
|
||||
}
|
||||
|
||||
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
radius: 1000
|
||||
|
||||
@@ -11,30 +11,26 @@ Slider {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.topMargin: root.implicitHeight / 3
|
||||
anchors.bottomMargin: root.implicitHeight / 3
|
||||
|
||||
implicitWidth: root.handle.x - root.implicitHeight / 6
|
||||
implicitWidth: root.handle.x - root.implicitHeight / 2
|
||||
|
||||
color: DynamicColors.palette.m3primary
|
||||
radius: 1000
|
||||
topRightRadius: root.implicitHeight / 15
|
||||
bottomRightRadius: root.implicitHeight / 15
|
||||
topRightRadius: root.implicitHeight / 6
|
||||
bottomRightRadius: root.implicitHeight / 6
|
||||
}
|
||||
|
||||
CustomRect {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: root.implicitHeight / 3
|
||||
anchors.bottomMargin: root.implicitHeight / 3
|
||||
|
||||
implicitWidth: parent.width - root.handle.x - root.handle.implicitWidth - root.implicitHeight / 6
|
||||
implicitWidth: parent.width - root.handle.x - root.handle.implicitWidth - root.implicitHeight / 2
|
||||
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
radius: 1000
|
||||
topLeftRadius: root.implicitHeight / 15
|
||||
bottomLeftRadius: root.implicitHeight / 15
|
||||
topLeftRadius: root.implicitHeight / 6
|
||||
bottomLeftRadius: root.implicitHeight / 6
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -239,6 +239,7 @@ Singleton {
|
||||
hideDelay: osd.hideDelay,
|
||||
enableBrightness: osd.enableBrightness,
|
||||
enableMicrophone: osd.enableMicrophone,
|
||||
allMonBrightness: osd.allMonBrightness,
|
||||
sizes: {
|
||||
sliderWidth: osd.sizes.sliderWidth,
|
||||
sliderHeight: osd.sizes.sliderHeight
|
||||
|
||||
@@ -5,6 +5,7 @@ JsonObject {
|
||||
property int hideDelay: 3000
|
||||
property bool enableBrightness: true
|
||||
property bool enableMicrophone: true
|
||||
property bool allMonBrightness: false
|
||||
property Sizes sizes: Sizes {}
|
||||
|
||||
component Sizes: JsonObject {
|
||||
|
||||
+18
-12
@@ -53,15 +53,15 @@ CustomMouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
|
||||
onPressed: event => {
|
||||
if ( root.popouts.hasCurrent && !inTopPanel( root.popouts, event.x, event.y )) {
|
||||
root.popouts.hasCurrent = false;
|
||||
} else if (root.visibilities.sidebar && !inRightPanel( panels.sidebar, event.x, event.y )) {
|
||||
root.visibilities.sidebar = false;
|
||||
} else if (root.visibilities.dashboard && !inTopPanel( panels.dashboard, event.x, event.y )) {
|
||||
root.visibilities.dashboard = false;
|
||||
}
|
||||
}
|
||||
// onPressed: event => {
|
||||
// if ( root.popouts.hasCurrent && !inTopPanel( root.popouts, event.x, event.y )) {
|
||||
// root.popouts.hasCurrent = false;
|
||||
// } else if (root.visibilities.sidebar && !inRightPanel( panels.sidebar, event.x, event.y )) {
|
||||
// root.visibilities.sidebar = false;
|
||||
// } else if (root.visibilities.dashboard && !inTopPanel( panels.dashboard, event.x, event.y )) {
|
||||
// root.visibilities.dashboard = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
onContainsMouseChanged: {
|
||||
if (!containsMouse) {
|
||||
@@ -71,7 +71,7 @@ CustomMouseArea {
|
||||
root.panels.osd.hovered = false;
|
||||
}
|
||||
|
||||
if (!popouts.currentName.startsWith("traymenu") || (popouts.current?.depth ?? 0) <= 1) {
|
||||
if (!popouts.currentName.startsWith("traymenu")) {
|
||||
popouts.hasCurrent = false;
|
||||
}
|
||||
|
||||
@@ -224,7 +224,10 @@ CustomMouseArea {
|
||||
}
|
||||
|
||||
function onSidebarChanged() {
|
||||
// root.visibilities.bar = root.visibilities.sidebar
|
||||
if ( root.visibilities.sidebar ) {
|
||||
root.visibilities.dashboard = false;
|
||||
root.popouts.hasCurrent = false;
|
||||
}
|
||||
}
|
||||
|
||||
function onDashboardChanged() {
|
||||
@@ -234,7 +237,10 @@ CustomMouseArea {
|
||||
if (!inDashboardArea) {
|
||||
root.dashboardShortcutActive = true;
|
||||
}
|
||||
// root.visibilities.bar = true;
|
||||
|
||||
root.visibilities.sidebar = false;
|
||||
root.popouts.hasCurrent = false;
|
||||
|
||||
} else {
|
||||
// Dashboard hidden, clear shortcut flag
|
||||
root.dashboardShortcutActive = false;
|
||||
|
||||
@@ -201,7 +201,7 @@ Singleton {
|
||||
if (isAppleDisplay)
|
||||
Quickshell.execDetached(["asdbctl", "set", rounded]);
|
||||
else if (isDdc)
|
||||
Quickshell.execDetached(["ddcutil", "-b", busNum, "setvcp", "10", rounded]);
|
||||
Quickshell.execDetached(["ddcutil", "--disable-dynamic-sleep", "--sleep-multiplier", ".1", "--skip-ddc-checks", "-b", busNum, "setvcp", "10", rounded]);
|
||||
else
|
||||
Quickshell.execDetached(["brightnessctl", "s", `${rounded}%`]);
|
||||
|
||||
|
||||
+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