forked from qt-creator/qt-creator
Fixes and UI-Changes:
- Swap Recent Sessions and Recent Projects - Fix tooltip error - Change column width ratio in develop screen from 50/50 to 40/60 - reapply fix for off-by-one pixel error in the tab widget Change-Id: Ibbcea66262723fed1a54ac63b735bc25241d1846 Reviewed-on: http://codereview.qt.nokia.com/1891 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
This commit is contained in:
@@ -47,19 +47,19 @@ Item {
|
|||||||
id: baseitem
|
id: baseitem
|
||||||
height: Math.max(recentSessions.height, recentProjects.height)
|
height: Math.max(recentSessions.height, recentProjects.height)
|
||||||
width: root.width
|
width: root.width
|
||||||
|
|
||||||
Widgets.RecentProjects {
|
|
||||||
id: recentProjects
|
|
||||||
anchors.left: parent.left
|
|
||||||
width: Math.floor(root.width / 2)
|
|
||||||
}
|
|
||||||
Widgets.RecentSessions {
|
Widgets.RecentSessions {
|
||||||
id: recentSessions
|
id: recentSessions
|
||||||
anchors.left: recentProjects.right
|
width: Math.floor(root.width / 2.5)
|
||||||
anchors.right: parent.right
|
anchors.left: parent.left
|
||||||
anchors.rightMargin: scrollArea.height >= baseitem.height ?
|
|
||||||
-scrollArea.verticalScrollBar.width : 0
|
|
||||||
}
|
}
|
||||||
|
Widgets.RecentProjects {
|
||||||
|
id: recentProjects
|
||||||
|
anchors.left: recentSessions.right
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: scrollArea.verticalScrollBar.visible ? 0 :
|
||||||
|
-scrollArea.verticalScrollBar.width
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -67,6 +67,6 @@ Item {
|
|||||||
height: root.height + 2 * margin
|
height: root.height + 2 * margin
|
||||||
width: 1
|
width: 1
|
||||||
color: "#ccc"
|
color: "#ccc"
|
||||||
x: recentSessions.x - margin
|
x: recentProjects.x - margin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,16 +62,26 @@ Rectangle {
|
|||||||
border.bottom: 10
|
border.bottom: 10
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BorderImage {
|
||||||
|
id: deadArea
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: inner_background.bottom
|
||||||
|
anchors.topMargin: -2
|
||||||
|
width: news.width
|
||||||
|
height: navigationAndDevLinks.height
|
||||||
|
border { top: 1; bottom: 1}
|
||||||
|
source: "qrc:welcome/images/tab_inactive.png"
|
||||||
|
Rectangle { anchors.right: parent.right; height: parent.height; y:0; width: 1; color: "black"}
|
||||||
|
}
|
||||||
LinksBar {
|
LinksBar {
|
||||||
id: navigationAndDevLinks
|
id: navigationAndDevLinks
|
||||||
property alias current: root.current
|
property alias current: root.current
|
||||||
anchors.top: inner_background.bottom
|
anchors.top: inner_background.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: deadArea.right
|
||||||
|
anchors.right: parent.right
|
||||||
anchors.bottomMargin: 4
|
anchors.bottomMargin: 4
|
||||||
anchors.topMargin: -2
|
anchors.topMargin: -2
|
||||||
width: parent.width
|
|
||||||
model: tabs.model
|
model: tabs.model
|
||||||
tabBarWidth: width
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 1.0
|
||||||
import components 1.0 as Components
|
import components 1.0 as Components
|
||||||
|
import widgets 1.0 as Widgets
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: exampleBrowserRoot
|
id: exampleBrowserRoot
|
||||||
@@ -48,7 +49,7 @@ Item {
|
|||||||
anchors.leftMargin: - 8
|
anchors.leftMargin: - 8
|
||||||
anchors.rightMargin: scrollArea.verticalScrollBar.visible ? 0 : -8
|
anchors.rightMargin: scrollArea.verticalScrollBar.visible ? 0 : -8
|
||||||
|
|
||||||
LineEdit {
|
Widgets.LineEdit {
|
||||||
placeholderText: !checkBox.checked ? qsTr("Search in Tutorials") : qsTr("Search in Tutorials, Examples and Demos")
|
placeholderText: !checkBox.checked ? qsTr("Search in Tutorials") : qsTr("Search in Tutorials, Examples and Demos")
|
||||||
focus: true
|
focus: true
|
||||||
id: lineEdit
|
id: lineEdit
|
||||||
|
|||||||
@@ -38,23 +38,16 @@ Row {
|
|||||||
height: 25
|
height: 25
|
||||||
|
|
||||||
property alias model: tabs.model
|
property alias model: tabs.model
|
||||||
property int tabBarWidth
|
property int tabWidth: Math.floor(tabBar.width/tabs.count)
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: tabs
|
id: tabs
|
||||||
height: tabBar.height
|
height: tabBar.height
|
||||||
model: parent.model
|
model: parent.model
|
||||||
delegate:
|
delegate: Item {
|
||||||
Item {
|
|
||||||
Components.QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
|
Components.QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
|
||||||
width: tabBarWidth / tabs.count
|
|
||||||
height: tabBar.height
|
height: tabBar.height
|
||||||
|
|
||||||
Rectangle {
|
width: tabs.count-1 === index ? tabWidth : tabWidth + tabBar.width%tabs.count
|
||||||
width: parent.width; height: 1
|
|
||||||
anchors { bottom: parent.bottom; bottomMargin: 1 }
|
|
||||||
color: "#acb2c2"
|
|
||||||
}
|
|
||||||
BorderImage {
|
BorderImage {
|
||||||
id: tabBackground
|
id: tabBackground
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
@@ -53,13 +53,13 @@ HeaderItemView {
|
|||||||
id: arrowImage;
|
id: arrowImage;
|
||||||
source: "qrc:welcome/images/list_bullet_arrow.png";
|
source: "qrc:welcome/images/list_bullet_arrow.png";
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
anchors.right: parent.right
|
anchors.left: parent.left
|
||||||
anchors.rightMargin: 10
|
anchors.leftMargin: 10
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
spacing: 4
|
spacing: 4
|
||||||
anchors.left: parent.left
|
anchors.left: arrowImage.right
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Text {
|
Text {
|
||||||
@@ -91,7 +91,7 @@ HeaderItemView {
|
|||||||
interval: 1000
|
interval: 1000
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (filepath.truncated)
|
if (filepath.truncated)
|
||||||
styleItem.showToolTip(sessionName)
|
styleItem.showToolTip(filePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,16 +64,16 @@ HeaderItemView {
|
|||||||
id: arrowImage;
|
id: arrowImage;
|
||||||
source: "qrc:welcome/images/list_bullet_arrow.png"
|
source: "qrc:welcome/images/list_bullet_arrow.png"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: parent.right
|
anchors.left: parent.left
|
||||||
anchors.rightMargin: 10
|
anchors.leftMargin: 10
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: fileNameText
|
id: fileNameText
|
||||||
text: parent.fullSessionName()
|
text: parent.fullSessionName()
|
||||||
elide: Text.ElideMiddle
|
elide: Text.ElideMiddle
|
||||||
anchors.left: parent.left
|
anchors.left: arrowImage.right
|
||||||
anchors.right: arrowImage.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.leftMargin: 10
|
anchors.leftMargin: 10
|
||||||
anchors.rightMargin: 20
|
anchors.rightMargin: 20
|
||||||
|
|||||||
Reference in New Issue
Block a user