Skip to content

Commit

Permalink
fix: Fixed the issue that the scrollbar was blank
Browse files Browse the repository at this point in the history
Fixed the issue that the scrollbar was blank

Bug: https://pms.uniontech.com/bug-view-273487.html
Log: Fixed the issue that the scrollbar was blank
  • Loading branch information
pengfeixx committed Sep 12, 2024
1 parent 1062d25 commit ab76a57
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/music-player/musicbaseandsonglist/MusicBaselistview.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@ Rectangle {
focus: true
width: 220
height: 560
contentHeight: 220 + globalVariant.globalCustomPlaylistModel.count * 36

Column {
ColumnLayout {
id: colum
topPadding: 15
anchors.fill: parent
spacing: 30
ButtonGroup { id: paneListGroup }
SideBarItem{
id: musicbaseSidebar
Layout.alignment: Qt.AlignTop
Layout.topMargin: 15
height: 128
view.height: 108
title: qsTr("Library")
type: "library"
group: paneListGroup
Expand All @@ -46,6 +47,7 @@ Rectangle {
title: qsTr("Playlists")
type: "playlists"
group: paneListGroup
fillHeight: true
sideModel: globalVariant.globalCustomPlaylistModel //全局自定义歌单model
action: FloatingButton {
width: 21; height: 21
Expand Down
11 changes: 8 additions & 3 deletions src/music-player/musicbaseandsonglist/SideBarItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ import QtQuick.Controls 2.0
import org.deepin.dtk 1.0
import "../dialogs"

Column {
ColumnLayout {
property string title
property string type
property ListModel sideModel
property alias view: sideListView
property bool fillHeight: false
property Component action
signal itemClicked(string key, string text)
signal itemRightClicked(string key, string text)
property ButtonGroup group: ButtonGroup {}

id: control
spacing: 10
leftPadding: 10
Layout.leftMargin: 10

Rectangle {
id: siderTitle
Expand All @@ -48,10 +49,14 @@ Column {
ListView {
id: sideListView
width: 200
height: contentHeight

Layout.alignment: Qt.AlignLeft
Layout.fillHeight: fillHeight
Layout.leftMargin: 10
model: sideModel
clip: true
boundsBehavior: Flickable.StopAtBounds

delegate: SideBarItemDelegate{
id: sidebarItem
width: 200; height: 36
Expand Down

0 comments on commit ab76a57

Please sign in to comment.