Commit 9d58d449 authored by Alessandro Portale's avatar Alessandro Portale

WelcomeScreen: Improve hovering of recent project items

No gaps inbetween the items. The whole area is click-sensitive.

Change-Id: I269e657ef8940387d9844baf17741c1cb3a50dd9
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent cd90ddad
......@@ -31,60 +31,51 @@ import QtQuick 2.1
Item {
id: projectItem
width: childrenRect.width
height: 32
width: row.width + 8
height: text.height
Rectangle {
anchors.fill: parent
anchors.margins: -4
color: "#f9f9f9"
opacity: projectNameText.hovered ? 1 : 0
visible: mouseArea.containsMouse
}
property alias projectName: projectNameText.text
property alias projectPath: pathText.text
Image {
id: icon
source: "images/project.png"
anchors.verticalCenter: projectNameText.verticalCenter
width: 16
height: 16
}
LinkedText {
id: projectNameText
y: 2
anchors.left: parent.left
anchors.leftMargin: 5 + icon.width
Row {
id: row
spacing: 5
onClicked: projectWelcomePage.requestProject(filePath)
}
Image {
y: 3
source: "images/project.png"
}
NativeText {
id: pathText
y: 18
color: "#6b6b6b"
Column {
id: text
anchors.left: parent.left
anchors.leftMargin: projectNameText.anchors.leftMargin
font: fonts.smallPath
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: {
toolTip.show();
LinkedText {
id: projectNameText
height: 20
font.underline: mouseArea.containsMouse
font.pixelSize: fonts.linkFont.pixelSize
enlargeMouseArea: false
}
onExited: {
toolTip.hide()
NativeText {
id: pathText
height: 20
color: "#6b6b6b"
font: fonts.smallPath
}
}
ToolTip {
x: 10
y: 20
id: toolTip
text: pathText.text
}
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: projectWelcomePage.requestProject(filePath);
}
}
......@@ -45,7 +45,6 @@ Rectangle {
Column {
id: column
spacing: 6
Repeater {
id: repeater
......
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