Commit 08f1e2e1 authored by Jens Bache-Wiig's avatar Jens Bache-Wiig Committed by Daniel Molkentin
Browse files

Fix tooltip and prettified Develop tab

Change-Id: I422a15558305a805af5a037f7537daaddd866a92
Reviewed-on: http://codereview.qt.nokia.com/1651

Reviewed-by: default avatarDaniel Molkentin <daniel.molkentin@nokia.com>
parent 3d8fdcf0
......@@ -36,26 +36,37 @@ import components 1.0 as Components
Item {
id: root
property int margin: 8
Components.ScrollArea {
id: scrollArea
anchors.fill: parent
anchors.margins: -8
anchors.fill: parent
anchors.margins: - margin
frame: false
Components.SplitterRow: {
height: Math.max(root.height,
Math.max(recentSessions.height,
recentProjects.height))
Item {
id: baseitem
height: Math.max(recentSessions.height, recentProjects.height)
width: root.width
Widgets.RecentProjects {
id: recentSessions
property bool expanding: true
}
Widgets.RecentSessions {
id: recentProjects
width: 200
}
Widgets.RecentProjects {
id: recentProjects
anchors.left: parent.left
width: Math.floor(root.width / 2)
}
Widgets.RecentSessions {
id: recentSessions
anchors.left: recentProjects.right
anchors.right: parent.right
anchors.rightMargin: scrollArea.height >= baseitem.height ?
-scrollArea.verticalScrollBar.width : 0
}
}
}
Rectangle {
anchors.top: scrollArea.top
height: root.height + 2 * margin
width: 1
color: "#ccc"
x: recentSessions.x - margin
}
}
......@@ -75,7 +75,7 @@ Rectangle {
}
Rectangle {
color:"#eee"
color: "#eee"
id: news
opacity: 0.7
anchors.top: navigationAndDevLinks.bottom
......
......@@ -70,7 +70,7 @@ Item {
onCheckedChanged: examplesModel.showTutorialsOnly = !checked;
}
Components.Button {
Button {
id: tagFilterButton
property string tag
Behavior on opacity { NumberAnimation{} }
......
......@@ -34,6 +34,13 @@ import QtQuick 1.0
import components 1.0 as Components
Item {
Rectangle {
height: 1
color: "#ccc"
anchors.top: parent.top
width: parent.width
}
InsetText {
id: text
anchors.left: parent.left
......
......@@ -78,6 +78,7 @@ Rectangle {
Components.Button {
id: openProjectButton
text: qsTr("Open Project...")
focus: false
iconSource: _hasDesktopTheme ? "image://desktoptheme/document-open" : ""
onClicked: welcomeMode.openProject();
anchors.right: createProjectButton.left
......
......@@ -39,13 +39,19 @@ Item {
property QtObject model
property Component delegate
Rectangle {
color: "#ececec"
anchors.top: parent.top
anchors.bottom: dataSection.top
width: parent.width
}
Text {
id: titleText
text: root.header
width: parent.width
font.bold: true
font.pointSize: 16
color: "#777"
color: "#444"
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
......@@ -53,6 +59,18 @@ Item {
anchors.topMargin: 10
anchors.leftMargin: 10
}
Rectangle {
height: 1
color: "#ccc"
anchors.bottom: dataSection.top
width: parent.width
}
Rectangle {
height: 1
color: "#ccc"
anchors.top: parent.top
width: parent.width
}
Column {
id: dataSection
......
......@@ -30,7 +30,7 @@
**
**************************************************************************/
import QtQuick 1.0
import QtQuick 1.1
import components 1.0 as Components
HeaderItemView {
......@@ -44,7 +44,7 @@ HeaderItemView {
Rectangle {
height: 1
color: "#eee"
anchors.top: parent.top
anchors.bottom: parent.bottom
width: parent.width
}
color: mousearea.containsMouse ? "#f9f9f9" : "white"
......@@ -58,6 +58,9 @@ HeaderItemView {
}
Column {
spacing: 4
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
Text {
id: nameText
......@@ -66,23 +69,31 @@ HeaderItemView {
width: parent.width
anchors.left: parent.left
anchors.leftMargin: 10
anchors.rightMargin: 10
anchors.right: arrowImage.left
anchors.rightMargin: arrowImage.width + 10
anchors.right: parent.right
elide: Text.ElideRight
}
Text {
id: filepath
text: prettyFilePath
elide: Text.ElideMiddle
color: "grey"
anchors.left: parent.left
anchors.right: arrowImage.left
anchors.right: parent.right
anchors.leftMargin: 10
anchors.rightMargin: 10
anchors.rightMargin: arrowImage.width + 14
}
}
Timer { id: timer; interval: 500; onTriggered: styleItem.showToolTip(filePath) }
Timer {
id: timer
interval: 1000
onTriggered: {
if (filepath.truncated)
styleItem.showToolTip(sessionName)
}
}
MouseArea {
id: mousearea
......
......@@ -34,7 +34,6 @@ import QtQuick 1.0
import components 1.0 as Components
HeaderItemView {
clip: true
header: qsTr("Recently Used Sessions")
model: sessionList
......@@ -45,9 +44,10 @@ HeaderItemView {
Rectangle {
height: 1
color: "#eee"
anchors.top: parent.top
anchors.bottom: parent.bottom
width: parent.width
}
color: mousearea.containsMouse ? "#f9f9f9" : "white"
function fullSessionName()
......@@ -58,35 +58,44 @@ HeaderItemView {
return newSessionName;
}
Image{
Image {
id: arrowImage;
source: "qrc:welcome/images/list_bullet_arrow.png";
anchors.verticalCenter: parent.verticalCenter;
anchors.left: parent.left
source: "qrc:welcome/images/list_bullet_arrow.png"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 10
}
Text {
Components.QStyleItem { id: styleItem; cursor: "pointinghandcursor"; anchors.fill: parent }
id: fileNameText
text: parent.fullSessionName()
font.italic: model.defaultSession
elide: Text.ElideMiddle
anchors.left: arrowImage.right
anchors.right: parent.right
anchors.left: parent.left
anchors.right: arrowImage.right
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 10
elide: Text.ElideRight
anchors.rightMargin: 20
}
Timer { id: timer; interval: 500; onTriggered: styleItem.showToolTip(sessionName) }
Timer {
id: timer
interval: 1000
repeat: false
onTriggered: {
if (fileNameText.truncated)
styleItem.showToolTip(sessionName)
}
}
MouseArea {
id: mouseare
id: mousearea
anchors.fill: parent
onClicked: projectWelcomePage.requestSession(sessionName)
hoverEnabled: true
onEntered:timer.start()
onEntered: timer.start()
onExited: timer.stop()
Components.QStyleItem { id: styleItem; cursor: "pointinghandcursor"; anchors.fill: parent }
}
}
}
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