Compare commits
5 Commits
8f56f27d77
...
0738e33d58
| Author | SHA1 | Date | |
|---|---|---|---|
| 0738e33d58 | |||
| 8db1e8d4a0 | |||
| e0a40ca3cf | |||
| 38cd9875a8 | |||
| 6e74013afe |
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
## Key Singletons
|
## Key Singletons
|
||||||
- `GlobalStates.qml`: Manages global UI visibility (e.g., `mediaControlsOpen`, `notificationPanelOpen`).
|
- `GlobalStates.qml`: Manages global UI visibility (e.g., `mediaControlsOpen`, `notificationPanelOpen`).
|
||||||
- `common/Config.qml`: Manages JSON configuration and watches for file changes.
|
- `common/Config.qml`: Manages JSON configuration at `${XDG_CONFIG_HOME}/hydro-os/config.json` and watches for file changes.
|
||||||
- `common/Directories.qml`: Defines XDG and repository-specific file paths.
|
- `common/Directories.qml`: Defines XDG and repository-specific file paths (e.g., `${XDG_CONFIG_HOME}/hydro-os/color.json`).
|
||||||
- `common/Appearance.qml`: Handles theme, colors, and transparency.
|
- `common/Appearance.qml`: Handles theme, colors, and transparency.
|
||||||
|
|
||||||
## Component Structure
|
## Component Structure
|
||||||
@@ -20,5 +20,5 @@
|
|||||||
- `settings.qml`: Settings view entry point.
|
- `settings.qml`: Settings view entry point.
|
||||||
|
|
||||||
## Development Workflow
|
## Development Workflow
|
||||||
- *TBD*: Check for build/lint/test commands (e.g., `npm`, `make`, or direct `quickshell` execution).
|
- **Logs**: Run `quickshell log` and read only after the last "INFO: Reloading configuration..."
|
||||||
- Logs: Run `quickshell log` and read only after the last "INFO: Reloading configuration..."
|
- **Config**: Configuration files are located in `${XDG_CONFIG_HOME}/hydro-os/` and may be auto-created by the application.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Item {
|
|||||||
property bool borderless: Config.options.bar.borderless
|
property bool borderless: Config.options.bar.borderless
|
||||||
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
|
implicitWidth: mediaLabel.implicitWidth
|
||||||
implicitHeight: Appearance.sizes.barHeight
|
implicitHeight: Appearance.sizes.barHeight
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
@@ -37,45 +37,13 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
StyledText {
|
||||||
RowLayout {
|
id: mediaLabel
|
||||||
id: rowLayout
|
visible: Config.options.bar.verbose
|
||||||
|
anchors.top: parent.top
|
||||||
spacing: 4
|
anchors.bottom: parent.bottom
|
||||||
anchors.fill: parent
|
horizontalAlignment: Text.AlignHCenter
|
||||||
visible: MprisController.hasPlayers
|
color: Appearance.colors.colOnLayer1
|
||||||
CircularProgress {
|
text: `${MprisController.activePlayer()?.trackTitle}${MprisController.activePlayer()?.trackArtist ? ' • ' + MprisController.activePlayer().trackArtist : ''}`
|
||||||
id: circularProgress
|
|
||||||
visible: false && MprisController.hasPlayers && MprisController.activePlayer().lengthSupported
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
|
||||||
Layout.leftMargin: rowLayout.spacing
|
|
||||||
lineWidth: 2
|
|
||||||
value: MprisController.activePlayer().lengthSupported ? MprisController.activePlayer()?.position / MprisController.activePlayer()?.length : 0
|
|
||||||
implicitSize: 26
|
|
||||||
colSecondary: Appearance.colors.colSecondaryContainer
|
|
||||||
colPrimary: Appearance.m3colors.m3onSecondaryContainer
|
|
||||||
enableAnimation: false
|
|
||||||
|
|
||||||
MaterialSymbol {
|
|
||||||
visible: MprisController.hasPlayers && MprisController.activePlayer().lengthSupported
|
|
||||||
anchors.centerIn: parent
|
|
||||||
fill: 1
|
|
||||||
text: MprisController.activePlayer()?.isPlaying ? "music_note" : "pause"
|
|
||||||
iconSize: Appearance.font.pixelSize.normal
|
|
||||||
color: Appearance.m3colors.m3onSecondaryContainer
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
visible: Config.options.bar.verbose
|
|
||||||
width: rowLayout.width - (circularProgress.size + rowLayout.spacing * 2)
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.rightMargin: rowLayout.spacing
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
elide: Text.ElideRight
|
|
||||||
color: Appearance.colors.colOnLayer1
|
|
||||||
text: `${MprisController.activePlayer()?.trackTitle}${MprisController.activePlayer()?.trackArtist ? ' • ' + MprisController.activePlayer().trackArtist : ''}`
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,15 +79,15 @@ Scope {
|
|||||||
target: "mediaControls"
|
target: "mediaControls"
|
||||||
|
|
||||||
function toggle(): void {
|
function toggle(): void {
|
||||||
mediaControlsLoader.active = !mediaControlsLoader.active;
|
GlobalStates.mediaControlsOpen = !GlobalStates.mediaControlsOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
function close(): void {
|
function close(): void {
|
||||||
mediaControls.loader.active = false;
|
GlobalStates.mediaControlsOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function open(): void {
|
function open(): void {
|
||||||
mediaControlsLoader.active = true;
|
GlobalStates.mediaControlsOpen = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ Item {
|
|||||||
property string artFilePath: `${artDownloadLocation}/${artFileName}`
|
property string artFilePath: `${artDownloadLocation}/${artFileName}`
|
||||||
property color artDominantColor: ColorUtils.mix((colorQuantizer?.colors[0] ?? Appearance.colors.colPrimary), Appearance.colors.colPrimaryContainer, 0.8) || Appearance.m3colors.m3secondaryContainer
|
property color artDominantColor: ColorUtils.mix((colorQuantizer?.colors[0] ?? Appearance.colors.colPrimary), Appearance.colors.colPrimaryContainer, 0.8) || Appearance.m3colors.m3secondaryContainer
|
||||||
property bool downloaded: false
|
property bool downloaded: false
|
||||||
|
|
||||||
implicitWidth: widgetWidth
|
implicitWidth: widgetWidth
|
||||||
implicitHeight: widgetHeight
|
implicitHeight: widgetHeight
|
||||||
|
|
||||||
@@ -101,7 +101,6 @@ Item {
|
|||||||
radius: background.radius
|
radius: background.radius
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
Image {
|
Image {
|
||||||
id: blurredArt
|
id: blurredArt
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -122,7 +121,6 @@ Item {
|
|||||||
blur: 1
|
blur: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -190,9 +188,54 @@ Item {
|
|||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: playerController.player?.trackArtist
|
text: playerController.player?.trackArtist
|
||||||
}
|
}
|
||||||
Item { // spacing
|
RowLayout {
|
||||||
Layout.fillHeight: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 32
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
RippleButton {
|
||||||
|
implicitWidth: 32
|
||||||
|
implicitHeight: 32
|
||||||
|
onClicked: playerController.player?.previous()
|
||||||
|
contentItem: MaterialSymbol {
|
||||||
|
text: "skip_previous"
|
||||||
|
iconSize: 24
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: blendedColors.colOnLayer1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RippleButton {
|
||||||
|
id: playPauseButton
|
||||||
|
implicitWidth: 32
|
||||||
|
implicitHeight: 32
|
||||||
|
onClicked: {
|
||||||
|
if (playerController.player?.playbackState == MprisPlaybackState.Playing) {
|
||||||
|
playerController.player?.pause()
|
||||||
|
} else {
|
||||||
|
playerController.player?.play()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentItem: MaterialSymbol {
|
||||||
|
text: playerController.player?.playbackState == MprisPlaybackState.Playing ? "pause" : "play_arrow"
|
||||||
|
iconSize: 24
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: blendedColors.colOnLayer1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RippleButton {
|
||||||
|
implicitWidth: 32
|
||||||
|
implicitHeight: 32
|
||||||
|
onClicked: playerController.player?.next()
|
||||||
|
contentItem: MaterialSymbol {
|
||||||
|
text: "skip_next"
|
||||||
|
iconSize: 24
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: blendedColors.colOnLayer1
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user