moved quickshell around
@@ -22,7 +22,7 @@ Item {
|
||||
IconImage {
|
||||
// anchors.centerIn: parent
|
||||
implicitSize: 27
|
||||
source: "root:Speaker.svg"
|
||||
source: "root:/assets/bar/Speaker.svg"
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Item {
|
||||
|
||||
IconImage {
|
||||
implicitSize: 26
|
||||
source: "root:Mic.svg"
|
||||
source: "root:/assets/bar/Mic.svg"
|
||||
}
|
||||
|
||||
Text {
|
||||
|
||||
@@ -39,8 +39,6 @@ import Quickshell.Widgets
|
||||
sourceComponent: Audio {}
|
||||
}
|
||||
RowLayout {
|
||||
id: aaaaa
|
||||
// If player disapear the seprator disapears with it
|
||||
visible: Player.activePlayer.isPlaying()
|
||||
VerticalSeprator {}
|
||||
PlayerText {
|
||||
@@ -54,6 +52,7 @@ import Quickshell.Widgets
|
||||
font.pointSize: 10.75
|
||||
}
|
||||
}
|
||||
SystemTray {}
|
||||
// VerticalSeprator {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
import QtQuick
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property bool fillWindowWidth: false;
|
||||
property real extraVerticalMargin: 0;
|
||||
|
||||
property alias mouseArea: mouseArea;
|
||||
property alias hoverEnabled: mouseArea.hoverEnabled;
|
||||
property alias acceptedButtons: mouseArea.acceptedButtons;
|
||||
property alias pressedButtons: mouseArea.pressedButtons;
|
||||
property alias containsMouse: mouseArea.containsMouse;
|
||||
property alias isPressed: mouseArea.pressed;
|
||||
|
||||
signal clicked(event: MouseEvent);
|
||||
signal entered();
|
||||
signal exited();
|
||||
signal pressed(event: MouseEvent);
|
||||
signal released(event: MouseEvent);
|
||||
signal wheel(event: WheelEvent);
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
// not much point in finding exact values
|
||||
leftMargin: root.fillWindowWidth ? -50 : 0
|
||||
rightMargin: root.fillWindowWidth ? -50 : 0
|
||||
topMargin: -root.extraVerticalMargin
|
||||
bottomMargin: -root.extraVerticalMargin
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
this.clicked.connect(root.clicked);
|
||||
//this.entered.connect(root.entered);
|
||||
//this.exited.connect(root.exited);
|
||||
//this.pressed.connect(root.pressed);
|
||||
this.released.connect(root.released);
|
||||
//this.wheel.connect(root.wheel);
|
||||
}
|
||||
|
||||
// for some reason MouseArea.pressed is both a prop and signal so connect doesn't work
|
||||
onPressed: event => root.pressed(event);
|
||||
|
||||
// connecting to onwheel seems to implicitly accept it. undo that.
|
||||
onWheel: event => {
|
||||
event.accepted = false;
|
||||
root.wheel(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,7 @@ import Quickshell
|
||||
import QtQuick.Layouts
|
||||
|
||||
PopupWindow {
|
||||
property PlayerControllerV2 playerController: null;
|
||||
|
||||
|
||||
property PlayerControllerV2 player: PlayerControllerV2;
|
||||
|
||||
id: audioPopup
|
||||
anchor {
|
||||
@@ -27,19 +25,19 @@ PopupWindow {
|
||||
Image {
|
||||
id: coverImg
|
||||
anchors.fill: parent
|
||||
source: Player.activePlayer.trackArtUrl;
|
||||
source: player.activePlayer.trackArtUrl;
|
||||
width: 275
|
||||
height: 275
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: Player.activePlayer.trackTitle
|
||||
text: player.activePlayer.trackTitle
|
||||
color: "white"
|
||||
font.pointSize: 10.75
|
||||
}
|
||||
Text {
|
||||
text: Player.activePlayer.trackArtist
|
||||
text: player.activePlayer.trackArtist
|
||||
color: "white"
|
||||
font.pointSize: 10.75
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ Item {
|
||||
implicitWidth: 30;
|
||||
IconImage {
|
||||
implicitSize: 30;
|
||||
source: "root:skip_next";
|
||||
source: "root:assets/media_player/skip_next.svg";
|
||||
scale: -1
|
||||
}
|
||||
MouseArea {
|
||||
@@ -58,7 +58,7 @@ Item {
|
||||
implicitWidth: 30;
|
||||
IconImage {
|
||||
implicitSize: 30;
|
||||
source: !Player.activePlayer.isPlaying ? "root:playbutton.svg" : "root:pausebutton.svg";
|
||||
source: !Player.activePlayer.isPlaying ? "root:/assets/media_player/playbutton.svg" : "root:/assets/media_player/pausebutton.svg";
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
@@ -76,7 +76,7 @@ Item {
|
||||
implicitWidth: 30;
|
||||
IconImage {
|
||||
implicitSize: 30;
|
||||
source: "root:skip_next";
|
||||
source: "root:assets/media_player/skip_next.svg";
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
@@ -86,44 +86,7 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
PopupWindow {
|
||||
PlayerPopup {
|
||||
id: audioPopup
|
||||
color: "transparent"
|
||||
anchor {
|
||||
item: root
|
||||
}
|
||||
anchor.rect.x: root.width / 2 - width / 2
|
||||
anchor.rect.y: root.height * 1.2
|
||||
height: 350
|
||||
width: 300
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "#919191"
|
||||
ColumnLayout {
|
||||
anchors.centerIn: parent
|
||||
Item {
|
||||
width: coverImg.width
|
||||
height: coverImg.height
|
||||
Image {
|
||||
id: coverImg
|
||||
anchors.fill: parent
|
||||
source: Player.activePlayer.trackArtUrl;
|
||||
width: 275
|
||||
height: 275
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: Player.activePlayer.trackTitle
|
||||
color: "white"
|
||||
font.pointSize: 10.75
|
||||
}
|
||||
Text {
|
||||
text: Player.activePlayer.trackArtist
|
||||
color: "white"
|
||||
font.pointSize: 10.75
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
25
quickshell/SystemTray.qml
Normal file
@@ -0,0 +1,25 @@
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Widgets
|
||||
import QtQuick.Effects
|
||||
|
||||
import Quickshell.Services.SystemTray
|
||||
|
||||
Item {
|
||||
width: layout.width
|
||||
height: layout.height
|
||||
RowLayout {
|
||||
id: layout
|
||||
Repeater {
|
||||
// id: repeater
|
||||
model: SystemTray.items
|
||||
required property int index
|
||||
Text {
|
||||
text: SystemTray.items.values[parent.index]
|
||||
font.pointSize: 10
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 492 B |
|
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 176 B |
|
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 155 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 179 B |