forked from ghostfox/qyouradio
Fix theme on native light mode, implement volume slider
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -87,4 +87,5 @@ out/
|
|||||||
|
|
||||||
.direnv
|
.direnv
|
||||||
dist
|
dist
|
||||||
|
CMakePresets.json
|
||||||
CMakeUserPresets.json
|
CMakeUserPresets.json
|
||||||
17
.vscode/tasks.json
vendored
Normal file
17
.vscode/tasks.json
vendored
Normal 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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -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="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
5
Main.qml
5
Main.qml
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
Player.qml
11
Player.qml
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user