mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
better layout in widescreen mode
This commit is contained in:
parent
5be8125c62
commit
b675eeb635
3 changed files with 16 additions and 20 deletions
|
|
@ -30,8 +30,8 @@ NanoShell.FullScreenOverlay {
|
|||
property int offset: 0
|
||||
property int openThreshold
|
||||
property bool userInteracting: false
|
||||
readonly property bool wideScreen: width > units.gridUnit * 45
|
||||
readonly property int drawerWidth: wideScreen ? units.gridUnit * 25 : width
|
||||
readonly property bool wideScreen: width > height || width > units.gridUnit * 45
|
||||
readonly property int drawerWidth: wideScreen ? contentItem.implicitWidth : width
|
||||
property int drawerX: 0
|
||||
property alias fixedArea: mainScope
|
||||
property alias flickable: mainFlickable
|
||||
|
|
|
|||
|
|
@ -280,15 +280,19 @@ Item {
|
|||
|
||||
onClosed: quickSettings.closed()
|
||||
|
||||
contentItem: Item {
|
||||
contentItem: GridLayout {
|
||||
id: panelContents
|
||||
anchors.fill: parent
|
||||
implicitWidth: quickSettingsParent.implicitWidth
|
||||
implicitHeight: quickSettingsParent.implicitHeight
|
||||
implicitHeight: MAth.min(slidingPanel.height, quickSettingsParent.implicitHeight)
|
||||
|
||||
columns: slidingPanel.wideScreen ? 2 : 1
|
||||
rows: slidingPanel.wideScreen ? 1 : 2
|
||||
DrawerBackground {
|
||||
id: quickSettingsParent
|
||||
anchors.fill: parent
|
||||
//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
|
||||
|
|
@ -302,15 +306,14 @@ Item {
|
|||
ListView {
|
||||
id: fullRepresentationView
|
||||
z: 1
|
||||
parent: slidingPanel.wideScreen ? slidingPanel.flickable.contentItem : panelContents
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
y: quickSettingsParent.height - height * (1-opacity)
|
||||
opacity: fullRepresentationModel.count > 0 && slidingPanel.offset/panelContents.height
|
||||
//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
|
||||
//leftMargin: slidingPanel.drawerX
|
||||
preferredHighlightBegin: slidingPanel.drawerX
|
||||
|
||||
implicitHeight: units.gridUnit * 20
|
||||
|
|
|
|||
|
|
@ -251,13 +251,6 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
move: Transition {
|
||||
NumberAnimation {
|
||||
duration: units.shortDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
properties: "x,y"
|
||||
}
|
||||
}
|
||||
|
||||
BrightnessItem {
|
||||
id: brightnessSlider
|
||||
|
|
|
|||
Loading…
Reference in a new issue