Fix theme on native light mode, implement volume slider

This commit is contained in:
Dark Steveneq
2025-10-14 10:06:06 +02:00
parent 5ffbede5a0
commit def26f8fda
8 changed files with 46 additions and 41 deletions

1
.gitignore vendored
View File

@@ -87,4 +87,5 @@ out/
.direnv
dist
CMakePresets.json
CMakeUserPresets.json

17
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,17 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "cmake",
"label": "CMake: build",
"command": "build",
"options": {"cwd": "${workspaceFolder}/build"},
"targets": [
"all"
],
"group": "build",
"problemMatcher": [],
"detail": "CMake template build task"
}
]
}

View File

@@ -1,22 +0,0 @@
{
"version": 3,
"configurePresets": [
{
"hidden": true,
"name": "Qt",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "$env{QTDIR}"
},
"vendor": {
"qt-project.org/Qt": {
"checksum": "wVa86FgEkvdCTVp1/nxvrkaemJc="
}
}
}
],
"vendor": {
"qt-project.org/Presets": {
"checksum": "67SmY24ZeVbebyKD0fGfIzb/bGI="
}
}
}

View File

@@ -42,6 +42,9 @@ ApplicationWindow {
TabBar {
id: tabbar
spacing: 10
background: Item{}
TabButton {
text: qsTr("Autoradio")
}
@@ -95,7 +98,7 @@ ApplicationWindow {
visible: status == Loader.Ready
sourceComponent: ViewPlayer {
title: qsTr("Deep Bass")
streamURL: "https://youradio.nonamesoft.xyz/api/deepbass"
streamURL: "https://youradio.nonamesoft.xyz/api/bassboosted"
}
}
}

View File

@@ -5,6 +5,13 @@ pragma Singleton
MediaPlayer {
source: ""
audioOutput: AudioOutput {
id: output
volume: 0.4
}
property alias volume: output.volume
function startPlaying(url) {
if (playing) {
return;
@@ -20,10 +27,6 @@ MediaPlayer {
stop();
}
audioOutput: AudioOutput {
volume: 0.4
}
onErrorOccurred: function(error, errorString) {
stopPlaying();
}

View File

@@ -5,6 +5,7 @@ import QtQuick.Controls.Basic 6.8
Label {
property string heading: "base"
color: Colors.text
font.family: Colors.fontFamily
font.pixelSize: Colors.fontSize[heading]
}

View File

@@ -8,20 +8,20 @@ Slider {
implicitWidth: 130
implicitHeight: 20
// OpacityAnimator on opacity{
// from: 0.7
// to: 1
// duration: 200
// target: parent
// running: parent.hovered
// }
// OpacityAnimator on opacity{
// from: 1
// to: 0.7
// duration: 200
// target: parent
// running: !parent.hovered
// }
OpacityAnimator on opacity{
from: 0.7
to: 1
duration: 200
target: this
running: parent.hovered
}
OpacityAnimator on opacity{
from: 1
to: 0.7
duration: 200
target: this
running: !parent.hovered
}
background: Rectangle {
color: "#555"

View File

@@ -80,6 +80,8 @@ ColumnLayout {
from: 0.1
to: 1.1
stepSize: 0.1
value: Player.volume + 0.1
onMoved: Player.volume = value - 0.1
}
}