From 72fb76280997fd55e728e23b96ada4aff1f9b3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Schummer?= <ext-jorg.2.schummer@nokia.com> Date: Thu, 18 Feb 2010 23:57:13 +0200 Subject: [PATCH] QmlDesigner.ItemLibrary: corrected layout margins and spacing among others, the scrollbars of the Items and Resources views have the same size and position now --- .../components/itemlibrary/itemlibrary.cpp | 4 ++-- .../components/itemlibrary/qml/ItemsView.qml | 5 ++++- .../components/itemlibrary/qml/Scrollbar.qml | 17 ++++++++--------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp index bae0b556e89..df7e2bbaf9f 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp @@ -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); diff --git a/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml b/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml index b0f6093f1cc..2adb1899344 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml +++ b/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml @@ -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 diff --git a/src/plugins/qmldesigner/components/itemlibrary/qml/Scrollbar.qml b/src/plugins/qmldesigner/components/itemlibrary/qml/Scrollbar.qml index 862ee4e1895..47dce94f293 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/qml/Scrollbar.qml +++ b/src/plugins/qmldesigner/components/itemlibrary/qml/Scrollbar.qml @@ -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" } } } -- GitLab