Commit dbe42bf0 authored by Alessandro Portale's avatar Alessandro Portale Committed by Thomas Hartmann

QmlDesigner: Avoid double borders between items in the item library

Change-Id: I09ecba996d269a63ab24668f7f8a1c0669d9a2af
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent 638279cc
......@@ -27,56 +27,58 @@ import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.0
Rectangle {
color: creatorTheme.QmlDesignerButtonColor
border.color: creatorTheme.QmlDesignerBorderColor
border.width: 1
Item {
Rectangle {
anchors.rightMargin: 1
anchors.topMargin: 1
anchors.fill: parent
color: creatorTheme.QmlDesignerButtonColor
Image {
id: itemIcon // to be set by model
Image {
id: itemIcon // to be set by model
anchors.top: parent.top
anchors.topMargin: styleConstants.cellVerticalMargin
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: styleConstants.cellVerticalMargin
anchors.horizontalCenter: parent.horizontalCenter
width: itemLibraryIconWidth // to be set in Qml context
height: itemLibraryIconHeight // to be set in Qml context
source: itemLibraryIconPath // to be set by model
}
width: itemLibraryIconWidth // to be set in Qml context
height: itemLibraryIconHeight // to be set in Qml context
source: itemLibraryIconPath // to be set by model
}
Text {
id: text
font.pixelSize: 9
elide: Text.ElideMiddle
wrapMode: Text.WordWrap
anchors.top: itemIcon.bottom
anchors.topMargin: styleConstants.cellVerticalSpacing
anchors.left: parent.left
anchors.leftMargin: styleConstants.cellHorizontalMargin
anchors.right: parent.right
anchors.rightMargin: styleConstants.cellHorizontalMargin
anchors.bottom: parent.bottom
anchors.bottomMargin: styleConstants.cellHorizontalMargin
Text {
id: text
font.pixelSize: 9
elide: Text.ElideMiddle
wrapMode: Text.WordWrap
anchors.top: itemIcon.bottom
anchors.topMargin: styleConstants.cellVerticalSpacing
anchors.left: parent.left
anchors.leftMargin: styleConstants.cellHorizontalMargin
anchors.right: parent.right
anchors.rightMargin: styleConstants.cellHorizontalMargin
anchors.bottom: parent.bottom
anchors.bottomMargin: styleConstants.cellHorizontalMargin
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignHCenter
text: itemName // to be set by model
color: creatorTheme.PanelTextColorLight
renderType: Text.NativeRendering
}
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignHCenter
text: itemName // to be set by model
color: creatorTheme.PanelTextColorLight
renderType: Text.NativeRendering
}
MouseArea {
id: mouseRegion
anchors.fill: parent
MouseArea {
id: mouseRegion
anchors.fill: parent
property bool reallyPressed: false
property int pressedX
property int pressedY
property bool reallyPressed: false
property int pressedX
property int pressedY
onPressed: {
rootView.startDragAndDrop(itemLibraryEntry)
onPressed: {
rootView.startDragAndDrop(itemLibraryEntry)
}
}
}
}
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