forked from ghostfox/qyouradio
Prepare player and settings, create branding
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import QtQuick 6.8
|
||||
import QtQuick.Controls 6.8 as QC
|
||||
import QtQuick.Controls.Basic as QC
|
||||
import QtQuick.Controls 6.8
|
||||
import QtQuick.Controls.Basic 6.8
|
||||
|
||||
QC.ApplicationWindow {
|
||||
ApplicationWindow {
|
||||
visible: true
|
||||
|
||||
background: Rectangle {
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
import QtQuick 6.8
|
||||
import QtQuick.Controls 6.8 as QC
|
||||
import QtQuick.Controls.Basic as QC
|
||||
import QtQuick.Controls 6.8
|
||||
import QtQuick.Controls.Basic 6.8
|
||||
|
||||
QC.Button {
|
||||
// highlighted: true
|
||||
background: Rectangle {
|
||||
color: hovered ? Colors.primaryAlt : Colors.primary
|
||||
radius: 5
|
||||
}
|
||||
|
||||
// width: player.playing ? 60 : 56
|
||||
Button {
|
||||
implicitHeight: 36
|
||||
|
||||
contentItem: Text {
|
||||
text: parent.text
|
||||
font.family: Colors.fontFamily
|
||||
font.pointSize: Colors.fontSize.base
|
||||
opacity: enabled ? 1.0 : 0.3
|
||||
color: Colors.text;
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
contentItem.color = Colors.text;
|
||||
font.family = Colors.fontFamily;
|
||||
font.pointSize = Colors.fontSize.base;
|
||||
background: Rectangle {
|
||||
color: parent.hovered ? Colors.primaryAlt : Colors.primary
|
||||
opacity: enabled ? 1 : 0.3
|
||||
radius: 5
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ qt_add_qml_module(QYRComponents
|
||||
QML_FILES CheckBox.qml
|
||||
QML_FILES Slider.qml
|
||||
QML_FILES Label.qml
|
||||
QML_FILES TabButton.qml
|
||||
# SOURCES qyrcomponents.cpp qyrcomponents.h
|
||||
)
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import QtQuick 6.8
|
||||
import QtQuick.Controls 6.8 as QC
|
||||
import QtQuick.Controls.Basic as QC
|
||||
import QtQuick.Controls 6.8
|
||||
import QtQuick.Controls.Basic 6.8
|
||||
|
||||
QC.CheckBox {
|
||||
CheckBox {
|
||||
implicitWidth: 14
|
||||
implicitHeight: 14
|
||||
contentItem: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: 2
|
||||
color: parent.checked ? (parent.hovered ? Colors.primaryAlt : Colors.primary) : "#fff"
|
||||
border.color: parent.checked ? (parent.hovered ? Colors.primaryAlt : Colors.primary) : "#fff"
|
||||
border.color: parent.checked ? (parent.hovered ? Colors.primaryAlt : Colors.primary) : "#000"
|
||||
border.width: 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ Item {
|
||||
text: "#1f1f1f",
|
||||
primary: "#007bff",
|
||||
primaryAlt: "#0056b3",
|
||||
secondary: "#009eff",
|
||||
secondaryAlt: "#0076b3",
|
||||
surface1: "#323232",
|
||||
surface0: "#282828",
|
||||
background: "#f4f4f4"
|
||||
@@ -19,6 +21,8 @@ Item {
|
||||
text: "#f4f4f4",
|
||||
primary: "#007bff",
|
||||
primaryAlt: "#0056b3",
|
||||
secondary: "#009eff",
|
||||
secondaryAlt: "#0076b3",
|
||||
surface1: "#323232",
|
||||
surface0: "#282828",
|
||||
background: "#1f1f1f"
|
||||
@@ -43,6 +47,8 @@ Item {
|
||||
readonly property string text: currentTheme.text
|
||||
readonly property string primary: currentTheme.primary
|
||||
readonly property string primaryAlt: currentTheme.primaryAlt
|
||||
readonly property string secondary: currentTheme.secondary
|
||||
readonly property string secondaryAlt: currentTheme.secondaryAlt
|
||||
readonly property string surface1: currentTheme.surface1
|
||||
readonly property string surface0: currentTheme.surface0
|
||||
readonly property string background: currentTheme.background
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import QtQuick 6.8
|
||||
import QtQuick.Controls 6.8 as QC
|
||||
import QtQuick.Controls.Basic as QC
|
||||
import QtQuick.Controls 6.8
|
||||
import QtQuick.Controls.Basic 6.8
|
||||
|
||||
QC.Label {
|
||||
Label {
|
||||
property string heading: "base"
|
||||
|
||||
font.family: Colors.fontFamily
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import QtQuick 6.8
|
||||
import QtQuick.Controls 6.8 as QC
|
||||
import QtQuick.Controls.Basic as QC
|
||||
import QtQuick.Controls 6.8
|
||||
import QtQuick.Controls.Basic 6.8
|
||||
|
||||
QC.Slider {
|
||||
Slider {
|
||||
snapMode: Slider.SnapAlways
|
||||
|
||||
implicitWidth: 130
|
||||
|
||||
26
QYRComponents/TabButton.qml
Normal file
26
QYRComponents/TabButton.qml
Normal file
@@ -0,0 +1,26 @@
|
||||
import QtQuick 6.8
|
||||
import QtQuick.Controls 6.8
|
||||
import QtQuick.Controls.Basic 6.8
|
||||
|
||||
TabButton {
|
||||
leftPadding: 5
|
||||
rightPadding: 5
|
||||
implicitHeight: 36
|
||||
|
||||
contentItem: Text {
|
||||
text: parent.text
|
||||
font.family: Colors.fontFamily
|
||||
font.pointSize: Colors.fontSize.base
|
||||
opacity: enabled ? 1.0 : 0.3
|
||||
color: Colors.text;
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: checked ? (parent.hovered ? Colors.secondaryAlt : Colors.secondary) : (parent.hovered ? Colors.primaryAlt : Colors.primary)
|
||||
opacity: enabled ? 1 : 0.3
|
||||
radius: 5
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
module QYRComponents
|
||||
|
||||
Button 1.0 Button.qml
|
||||
singleton Colors 1.0 Colors.qml
|
||||
Reference in New Issue
Block a user