Compare commits

...
4 changed files with 155 additions and 160 deletions

No files matched your search

+128 -131
View File
@@ -231,7 +231,6 @@ Item {
id: controlButtonBox
Layout.alignment: Qt.AlignHCenter
anchors.right: !isWidescreen? root.right:null
Layout.fillHeight: true
spacing: 2
@@ -466,51 +465,63 @@ Item {
onClosed: {
interactive = false
}
RowLayout {
id: contents
ColumnLayout {
width: volumeDrawer.width
ToolButton{
Layout.preferredHeight: Kirigami.Units.gridUnit * 2.5
Layout.maximumWidth: height
Layout.preferredWidth: height
Rectangle {
Layout.margins: 5
radius:50
Layout.alignment: Qt.AlignHCenter
color: Kirigami.Theme.textColor
opacity: 0.7
width: 40
height: 4
icon.name: muteButton.icon.name
checkable: true
checked: muteButton.checked
onClicked: {
if(audio.muted)
{
muteButton.unmuteAudio()
}
else
{
muteButton.muteAudio()
}
}
}
Slider {
value: volumeSlider.value
opacity: volumeSlider.opacity
wheelEnabled: true
RowLayout {
Layout.fillWidth: true
Layout.preferredHeight: Kirigami.Units.gridUnit * 2.5
Layout.fillHeight: true
id: contents
ToolButton{
Layout.preferredHeight: Kirigami.Units.gridUnit * 2.5
Layout.maximumWidth: height
Layout.preferredWidth: height
onMoved: {
volumeSlider.value = value
volumeSlider.valueChanged()
icon.name: muteButton.icon.name
checkable: true
checked: muteButton.checked
onClicked: {
if(audio.muted)
{
muteButton.unmuteAudio()
}
else
{
muteButton.muteAudio()
}
}
}
}
Label {
Layout.preferredHeight: Slider.height
Layout.preferredWidth: Kirigami.Units.gridUnit * 2.5
Slider {
value: volumeSlider.value
opacity: volumeSlider.opacity
wheelEnabled: true
text: volumeLabel.text
Layout.fillWidth: true
Layout.preferredHeight: Kirigami.Units.gridUnit * 2.5
onMoved: {
volumeSlider.value = value
volumeSlider.valueChanged()
}
}
Label {
Layout.preferredHeight: Slider.height
Layout.preferredWidth: Kirigami.Units.gridUnit * 2.5
text: volumeLabel.text
}
}
}
}
@@ -694,115 +705,108 @@ Item {
anchors.fill: parent
color: "white"
opacity: 0.2
}
ColumnLayout{
spacing:0
}
ScrollView {
anchors.fill: parent
ListView {
spacing: 5
rightMargin: 10
leftMargin:10
topMargin:10
bottomMargin: 10
clip: true
ScrollView {
Layout.fillWidth: true
Layout.fillHeight: true
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
Kirigami.Theme.inherit: false
ListView {
spacing: 5
rightMargin: 10
leftMargin:10
topMargin:10
bottomMargin: 10
clip: true
BusyIndicator {
anchors.centerIn: parent
visible: UserPlaylistModel.loading || UserPlaylistModel.loading
}
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
Kirigami.Theme.inherit: false
model: UserPlaylistModel
BusyIndicator {
anchors.centerIn: parent
visible: UserPlaylistModel.loading || UserPlaylistModel.loading
}
delegate: Kirigami.SwipeListItem {
id: delegateItem
required property string title
required property string videoId
required property string artists
required property bool isCurrent
required property int index
model: UserPlaylistModel
alwaysVisibleActions: true
delegate: Kirigami.SwipeListItem {
background: Rectangle{
radius: 7
color:
if (parent.down){
Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.hoverColor, "transparent", 0.3)
}else if(parent.hovered){
Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.hoverColor, "transparent", 0.7)
}else if(parent.highlighted){
Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.hoverColor, "transparent", 0.7)
}else{
Qt.rgba(0, 0, 0, 0.4)
}
id: delegateItem
required property string title
required property string videoId
required property string artists
required property bool isCurrent
required property int index
background: Rectangle{
radius: 7
color:
border.color:
if (parent.down){
Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.hoverColor, "transparent", 0.3)
Kirigami.Theme.hoverColor
}else if(parent.hovered){
Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.hoverColor, "transparent", 0.7)
}else if(parent.highlighted){
Kirigami.ColorUtils.linearInterpolation(Kirigami.Theme.hoverColor, "transparent", 0.7)
Kirigami.Theme.hoverColor
}else{
Qt.rgba(0, 0, 0, 0.4)
Qt.rgba(1, 1, 1, 0)
}
border.color:
if (parent.down){
Kirigami.Theme.hoverColor
}else if(parent.hovered){
Kirigami.Theme.hoverColor
}else{
Qt.rgba(1, 1, 1, 0)
}
border.width: 1
border.width: 1
}
highlighted: isCurrent
onClicked: UserPlaylistModel.skipTo(videoId)
contentItem: RowLayout{
ThumbnailSource {
id: delegateThumbnailSource
videoId: delegateItem.videoId
}
highlighted: isCurrent
onClicked: UserPlaylistModel.skipTo(videoId)
RowLayout{
RoundedImage {
source: delegateThumbnailSource.cachedPath
Layout.margins: 2.5
height: delegateItem.height
width: height
radius: 5
}
ColumnLayout {
Layout.margins: 5
Layout.fillWidth: true
ThumbnailSource {
id: delegateThumbnailSource
videoId: delegateItem.videoId
}
RoundedImage {
source: delegateThumbnailSource.cachedPath
Layout.margins: 2.5
height: delegateItem.height
width: height
radius: 5
}
ColumnLayout {
Layout.margins: 5
Layout.fillWidth: true
Kirigami.Heading {
Kirigami.Heading {
// Layout.leftMargin: 5
// Layout.rightMargin: 5
// Layout.topMargin: 5
elide: Text.ElideRight
Layout.fillWidth: true
level: 2
text: title
}
elide: Text.ElideRight
Layout.fillWidth: true
level: 2
text: title
}
Label {
Label {
elide: Text.ElideRight
Layout.fillWidth: true
color: Kirigami.Theme.disabledTextColor
text: artists
}
elide: Text.ElideRight
Layout.fillWidth: true
color: Kirigami.Theme.disabledTextColor
text: artists
}
}
actions: [
Kirigami.Action {
text: i18n("Remove Track")
icon.name: "list-remove"
icon.color: "white"
onTriggered: UserPlaylistModel.remove(delegateItem.videoId)
}
]
}
actions: [
Kirigami.Action {
text: i18n("Remove Track")
icon.name: "list-remove"
icon.color: "white"
onTriggered: UserPlaylistModel.remove(delegateItem.videoId)
}
]
}
}
}
@@ -823,9 +827,8 @@ Item {
color: Kirigami.Theme.backgroundColor
}
ColumnLayout{
contentItem: ColumnLayout{
spacing:0
anchors.fill: parent
Rectangle {
Layout.margins: 5
radius:50
@@ -880,13 +883,9 @@ Item {
}
ColumnLayout {
Layout.margins: 5
Layout.fillWidth: true
Kirigami.Heading {
Layout.leftMargin: 5
Layout.rightMargin: 5
Layout.topMargin: 5
elide: Text.ElideRight
Layout.fillWidth: true
level: 2
@@ -894,8 +893,6 @@ Item {
}
Label {
Layout.margins: 5
elide: Text.ElideRight
Layout.fillWidth: true
color: Kirigami.Theme.disabledTextColor
+1 -5
View File
@@ -176,7 +176,7 @@ Item {
? (Math.min(content.implicitHeight, Kirigami.Units.gridUnit * 20))+2*(popup.shadowSize+popup.expansion)
: (Kirigami.Units.gridUnit * 20)+2*(popup.shadowSize+popup.expansion)
duration: 100
to: searchField.heigth
to: searchField.height
}
NumberAnimation on width{
id: playCloseWidth
@@ -203,9 +203,6 @@ Item {
to: -0
}
contentItem: ColumnLayout{
id: content
width: parent.width
@@ -339,5 +336,4 @@ Item {
}
}
}
}
+10 -7
View File
@@ -58,13 +58,16 @@ Item {
videoId: drawer.videoId
}
// Kirigami.Icon {
// Layout.margins: Kirigami.Units.smallSpacing
// source: "arrow-down"
// implicitWidth: Kirigami.Units.gridUnit
// implicitHeight: Kirigami.Units.gridUnit
// Layout.alignment: Qt.AlignHCenter
// }
Rectangle {
Layout.margins: 5
radius:50
Layout.alignment: Qt.AlignHCenter
color: Kirigami.Theme.textColor
opacity: 0.7
width: 40
height: 4
}
RowLayout {
spacing: 10
Kirigami.ShadowedRectangle {
+16 -17
View File
@@ -62,24 +62,23 @@ Kirigami.ApplicationWindow {
}
contentItem: RowLayout {
spacing: 0
Row {
Layout.alignment: Qt.AlignLeft
Controls.ToolButton {
id: back
enabled: applicationWindow().pageStack.layers.depth > 1 || (applicationWindow().pageStack.depth > 1 && (applicationWindow().pageStack.currentIndex > 0 || applicationWindow().pageStack.contentItem.contentX > 0)) // Copied from https://invent.kde.org/frameworks/kirigami/-/blob/master/src/controls/templates/private/BackButton.qml#L16
icon.name: "draw-arrow-back"
onClicked: pageStack.goBack()
visible: wideScreen
}
Controls.ToolButton {
icon.name: "draw-arrow-forward"
enabled: applicationWindow().pageStack.currentIndex < applicationWindow().pageStack.depth-1
onClicked: pageStack.goForward()
anchors.left: back.right
visible: wideScreen
Controls.ToolButton {
id: back
enabled: applicationWindow().pageStack.layers.depth > 1 || (applicationWindow().pageStack.depth > 1 && (applicationWindow().pageStack.currentIndex > 0 || applicationWindow().pageStack.contentItem.contentX > 0)) // Copied from https://invent.kde.org/frameworks/kirigami/-/blob/master/src/controls/templates/private/BackButton.qml#L16
icon.name: "draw-arrow-back"
onClicked: pageStack.goBack()
visible: wideScreen
}
Controls.ToolButton {
icon.name: "draw-arrow-forward"
enabled: applicationWindow().pageStack.currentIndex < applicationWindow().pageStack.depth-1
onClicked: pageStack.goForward()
visible: wideScreen
}
}
// spacer