Skip to content
Snippets Groups Projects
Commit 72fb7628 authored by Jörg Schummer's avatar Jörg Schummer
Browse files

QmlDesigner.ItemLibrary: corrected layout margins and spacing

among others, the scrollbars of the Items and Resources views
have the same size and position now
parent ce41deff
No related branches found
No related tags found
No related merge requests found
......@@ -129,8 +129,8 @@ ItemLibrary::ItemLibrary(QWidget *parent) :
m_d(new ItemLibraryPrivate(this))
{
m_d->m_ui.setupUi(this);
layout()->setContentsMargins(3, 3, 3, 3);
layout()->setSpacing(3);
layout()->setContentsMargins(2, 2, 2, 0);
layout()->setSpacing(2);
m_d->m_resourcesDirModel = new QDirModel(this);
......
......@@ -124,10 +124,11 @@ Rectangle {
id: itemsFlickable
anchors.top: parent.top
anchors.topMargin: 2
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: scrollbar.left
anchors.rightMargin: 6
anchors.rightMargin: 2
clip: true
interactive: false
......@@ -161,7 +162,9 @@ Rectangle {
id: scrollbar
anchors.top: parent.top
anchors.topMargin: 2
anchors.bottom: parent.bottom
anchors.bottomMargin: 2
anchors.left: parent.right
anchors.leftMargin: -10
anchors.right: parent.right
......
......@@ -128,23 +128,22 @@ Item {
id: handle
anchors.left: parent.left
anchors.leftMargin: 1
anchors.right: parent.right
// anchors.rightMargin: 1
height: Math.max(width, bar.height * Math.min(1, scrollFlickable.visibleArea.heightRatio))
// radius: width / 2
// color: style.scrollbarHandleColor
Rectangle {
width: parent.height
width: parent.height - 1
height: parent.width
y: parent.height
y: 1 - height
rotation: -90
transformOrigin: Item.TopLeft
rotation: 90
transformOrigin: Item.BottomLeft
gradient: Gradient {
GradientStop { position: 0.0; color: "#C6C6C6" }
GradientStop { position: 1.0; color: "#7E7E7E" }
GradientStop { position: 0.0; color: "#7E7E7E" }
GradientStop { position: 1.0; color: "#C6C6C6" }
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment