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 .direnv
dist dist
CMakePresets.json
CMakeUserPresets.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 { TabBar {
id: tabbar id: tabbar
spacing: 10 spacing: 10
background: Item{}
TabButton { TabButton {
text: qsTr("Autoradio") text: qsTr("Autoradio")
} }
@@ -95,7 +98,7 @@ ApplicationWindow {
visible: status == Loader.Ready visible: status == Loader.Ready
sourceComponent: ViewPlayer { sourceComponent: ViewPlayer {
title: qsTr("Deep Bass") 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 { MediaPlayer {
source: "" source: ""
audioOutput: AudioOutput {
id: output
volume: 0.4
}
property alias volume: output.volume
function startPlaying(url) { function startPlaying(url) {
if (playing) { if (playing) {
return; return;
@@ -20,10 +27,6 @@ MediaPlayer {
stop(); stop();
} }
audioOutput: AudioOutput {
volume: 0.4
}
onErrorOccurred: function(error, errorString) { onErrorOccurred: function(error, errorString) {
stopPlaying(); stopPlaying();
} }

View File

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

View File

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

View File

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