mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 22:23:31 +00:00
Fix grid view margins and scroll bar positioning on Qt 5.9
This commit is contained in:
+5
-7
@@ -12,10 +12,10 @@ GridView {
|
|||||||
id: appGrid
|
id: appGrid
|
||||||
focus: true
|
focus: true
|
||||||
activeFocusOnTab: true
|
activeFocusOnTab: true
|
||||||
leftMargin: (parent.width % (cellWidth + rightMargin)) / 2
|
|
||||||
topMargin: 20
|
topMargin: 20
|
||||||
rightMargin: 5
|
|
||||||
bottomMargin: 5
|
bottomMargin: 5
|
||||||
|
leftMargin: contentHeight > cellHeight && parent.width > cellWidth ? (parent.width % cellWidth) / 2 : 10
|
||||||
|
rightMargin: leftMargin
|
||||||
cellWidth: 230; cellHeight: 297;
|
cellWidth: 230; cellHeight: 297;
|
||||||
|
|
||||||
function computerLost()
|
function computerLost()
|
||||||
@@ -268,11 +268,9 @@ GridView {
|
|||||||
|
|
||||||
parent: appGrid.parent
|
parent: appGrid.parent
|
||||||
anchors {
|
anchors {
|
||||||
top: appGrid.top
|
top: parent.top
|
||||||
left: appGrid.right
|
right: parent.right
|
||||||
bottom: appGrid.bottom
|
bottom: parent.bottom
|
||||||
|
|
||||||
leftMargin: -10
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-8
@@ -12,11 +12,11 @@ GridView {
|
|||||||
id: pcGrid
|
id: pcGrid
|
||||||
focus: true
|
focus: true
|
||||||
activeFocusOnTab: true
|
activeFocusOnTab: true
|
||||||
leftMargin: (parent.width % (cellWidth + rightMargin)) / 2
|
|
||||||
topMargin: 20
|
topMargin: 20
|
||||||
rightMargin: 5
|
|
||||||
bottomMargin: 5
|
bottomMargin: 5
|
||||||
cellWidth: 350; cellHeight: 350;
|
leftMargin: contentHeight > cellHeight && parent.width > cellWidth ? (parent.width % cellWidth) / 2 : 10
|
||||||
|
rightMargin: leftMargin
|
||||||
|
cellWidth: 310; cellHeight: 350;
|
||||||
objectName: "Computers"
|
objectName: "Computers"
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
@@ -263,11 +263,9 @@ GridView {
|
|||||||
ScrollBar.vertical: ScrollBar {
|
ScrollBar.vertical: ScrollBar {
|
||||||
parent: pcGrid.parent
|
parent: pcGrid.parent
|
||||||
anchors {
|
anchors {
|
||||||
top: pcGrid.top
|
top: parent.top
|
||||||
left: pcGrid.right
|
right: parent.right
|
||||||
bottom: pcGrid.bottom
|
bottom: parent.bottom
|
||||||
|
|
||||||
leftMargin: -10
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user