Commit e7f82ab3 authored by Marco Martin's avatar Marco Martin

fix top panel sliding in vertical mode

encapsulate in an Item to force the proper implicitHeight, so
the top panel slide works on vertical screen also before it has been
rpotated to horizontal and back
parent 2fab1b0d
......@@ -213,8 +213,10 @@ NanoShell.FullScreenOverlay {
PlasmaComponents.Control {
id: contentArea
z: 1
y: 0
x: drawerX
width: drawerWidth
height: contentItem.height
}
}
}
......
......@@ -293,67 +293,69 @@ Item {
onClosed: quickSettings.closed()
contentItem: GridLayout {
id: panelContents
anchors.fill: parent
contentItem: Item {
implicitWidth: quickSettingsParent.implicitWidth
implicitHeight: Math.min(slidingPanel.height, quickSettingsParent.implicitHeight)
columns: slidingPanel.wideScreen ? 2 : 1
rows: slidingPanel.wideScreen ? 1 : 2
DrawerBackground {
id: quickSettingsParent
//anchors.fill: parent
Layout.alignment: Qt.AlignTop
Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, units.gridUnit * 25) : panelContents.width
z: 4
contentItem: QuickSettings {
id: quickSettings
onCloseRequested: {
slidingPanel.hide()
}
}
}
ListView {
id: fullRepresentationView
z: 1
interactive: width < contentWidth
//parent: slidingPanel.wideScreen ? slidingPanel.flickable.contentItem : panelContents
Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, quickSettingsParent.width*fullRepresentationModel.count) : panelContents.width
//Layout.fillWidth: true
clip: slidingPanel.wideScreen
y: slidingPanel.wideScreen ? 0 : quickSettingsParent.height - height * (1-opacity)
opacity: slidingPanel.wideScreen ? 1 : fullRepresentationModel.count > 0 && slidingPanel.offset/panelContents.height
height: Math.min(plasmoid.screenGeometry.height - slidingPanel.headerHeight - quickSettingsParent.height - bottomBar.height, implicitHeight)
//leftMargin: slidingPanel.drawerX
preferredHighlightBegin: slidingPanel.drawerX
GridLayout {
id: panelContents
anchors.fill: parent
implicitWidth: quickSettingsParent.implicitWidth
implicitHeight: Math.min(slidingPanel.height, quickSettingsParent.implicitHeight)
columns: slidingPanel.wideScreen ? 2 : 1
rows: slidingPanel.wideScreen ? 1 : 2
implicitHeight: units.gridUnit * 20
cacheBuffer: width * 100
highlightFollowsCurrentItem: true
highlightRangeMode: ListView.StrictlyEnforceRange
highlightMoveDuration: units.longDuration
snapMode: slidingPanel.wideScreen ? ListView.NoSnap : ListView.SnapOneItem
model: ObjectModel {
id: fullRepresentationModel
DrawerBackground {
id: quickSettingsParent
//anchors.fill: parent
Layout.alignment: Qt.AlignTop
Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, units.gridUnit * 25) : panelContents.width
z: 4
contentItem: QuickSettings {
id: quickSettings
onCloseRequested: {
slidingPanel.hide()
}
}
}
orientation: ListView.Horizontal
MouseArea {
parent: fullRepresentationView.contentItem
anchors.fill: parent
z: -1
ListView {
id: fullRepresentationView
z: 1
interactive: width < contentWidth
//parent: slidingPanel.wideScreen ? slidingPanel.flickable.contentItem : panelContents
Layout.preferredWidth: slidingPanel.wideScreen ? Math.min(slidingPanel.width/2, quickSettingsParent.width*fullRepresentationModel.count) : panelContents.width
//Layout.fillWidth: true
clip: slidingPanel.wideScreen
y: slidingPanel.wideScreen ? 0 : quickSettingsParent.height - height * (1-opacity)
opacity: slidingPanel.wideScreen ? 1 : fullRepresentationModel.count > 0 && slidingPanel.offset/panelContents.height
height: Math.min(plasmoid.screenGeometry.height - slidingPanel.headerHeight - quickSettingsParent.height - bottomBar.height, implicitHeight)
//leftMargin: slidingPanel.drawerX
preferredHighlightBegin: slidingPanel.drawerX
onClicked: slidingPanel.close()
}
implicitHeight: units.gridUnit * 20
cacheBuffer: width * 100
highlightFollowsCurrentItem: true
highlightRangeMode: ListView.StrictlyEnforceRange
highlightMoveDuration: units.longDuration
snapMode: slidingPanel.wideScreen ? ListView.NoSnap : ListView.SnapOneItem
model: ObjectModel {
id: fullRepresentationModel
}
orientation: ListView.Horizontal
//implicitHeight: fullRepresentationLayout.implicitHeight
//clip: true
MouseArea {
parent: fullRepresentationView.contentItem
anchors.fill: parent
z: -1
onClicked: slidingPanel.close()
}
//implicitHeight: fullRepresentationLayout.implicitHeight
//clip: true
}
}
}
DrawerBackground {
id: bottomBar
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment