forked from qt-creator/qt-creator
QmlProfiler: Remove gradient borders
It just looks so much better with "clean" borders. Change-Id: I9aae0e6f24556042e23580e224abb696913fc989 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -1,40 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
|
||||||
** Contact: http://www.qt-project.org/legal
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and Digia. For licensing terms and
|
|
||||||
** conditions see http://qt.digia.com/licensing. For further information
|
|
||||||
** use the contact form at http://qt.digia.com/contact-us.
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Digia gives you certain additional
|
|
||||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
import QtQuick 2.1
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
property color topColor
|
|
||||||
property color bottomColor
|
|
||||||
height: 6
|
|
||||||
gradient: Gradient {
|
|
||||||
GradientStop { position: 0.0; color: bottomColor; }
|
|
||||||
GradientStop { position: 1.0; color: topColor; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -403,13 +403,13 @@ Rectangle {
|
|||||||
color: labels.color
|
color: labels.color
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gradient borders
|
// border between labels and timeline
|
||||||
VerticalGradientBorder {
|
Rectangle {
|
||||||
anchors.left: labels.right
|
anchors.left: labels.right
|
||||||
anchors.top: labels.top
|
anchors.top: labels.top
|
||||||
anchors.bottom: labelsTail.bottom
|
anchors.bottom: labelsTail.bottom
|
||||||
leftColor: "#00000000"
|
width: 1
|
||||||
rightColor: "#86000000"
|
color: "#858585"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,20 +484,4 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VerticalGradientBorder {
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.top: root.top
|
|
||||||
anchors.bottom: root.bottom
|
|
||||||
rightColor: "#00000000"
|
|
||||||
leftColor: "#86000000"
|
|
||||||
}
|
|
||||||
|
|
||||||
HorizontalGradientBorder {
|
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.right: root.right
|
|
||||||
bottomColor: "#00000000"
|
|
||||||
topColor: "#86000000"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,26 +92,9 @@ Canvas {
|
|||||||
context.lineTo(width, height-1);
|
context.lineTo(width, height-1);
|
||||||
context.stroke();
|
context.stroke();
|
||||||
|
|
||||||
// gradient borders
|
// left border
|
||||||
var gradientDark = "rgba(0, 0, 0, 0.53125)";
|
context.fillStyle = "#858585";
|
||||||
var gradientClear = "rgba(0, 0, 0, 0)";
|
context.fillRect(0, 0, 1, height);
|
||||||
var grad = context.createLinearGradient(0, 0, 0, 6);
|
|
||||||
grad.addColorStop(0,gradientDark);
|
|
||||||
grad.addColorStop(1,gradientClear);
|
|
||||||
context.fillStyle = grad;
|
|
||||||
context.fillRect(0, 0, width, 6);
|
|
||||||
|
|
||||||
grad = context.createLinearGradient(0, 0, 6, 0);
|
|
||||||
grad.addColorStop(0,gradientDark);
|
|
||||||
grad.addColorStop(1,gradientClear);
|
|
||||||
context.fillStyle = grad;
|
|
||||||
context.fillRect(0, 0, 6, height);
|
|
||||||
|
|
||||||
grad = context.createLinearGradient(width, 0, width-6, 0);
|
|
||||||
grad.addColorStop(0,gradientDark);
|
|
||||||
grad.addColorStop(1,gradientClear);
|
|
||||||
context.fillStyle = grad;
|
|
||||||
context.fillRect(width-6, 0, 6, height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function prettyPrintTime( t )
|
function prettyPrintTime( t )
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
|
||||||
** Contact: http://www.qt-project.org/legal
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and Digia. For licensing terms and
|
|
||||||
** conditions see http://qt.digia.com/licensing. For further information
|
|
||||||
** use the contact form at http://qt.digia.com/contact-us.
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Digia gives you certain additional
|
|
||||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
import QtQuick 2.1
|
|
||||||
|
|
||||||
Item {
|
|
||||||
property color leftColor
|
|
||||||
property color rightColor
|
|
||||||
width: 6
|
|
||||||
HorizontalGradientBorder {
|
|
||||||
anchors.left: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
transformOrigin: Item.TopLeft
|
|
||||||
rotation: 90
|
|
||||||
width: parent.height
|
|
||||||
topColor: rightColor
|
|
||||||
bottomColor: leftColor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -16,8 +16,6 @@
|
|||||||
<file>Overview.js</file>
|
<file>Overview.js</file>
|
||||||
<file>SelectionRange.qml</file>
|
<file>SelectionRange.qml</file>
|
||||||
<file>SelectionRangeDetails.qml</file>
|
<file>SelectionRangeDetails.qml</file>
|
||||||
<file>HorizontalGradientBorder.qml</file>
|
|
||||||
<file>VerticalGradientBorder.qml</file>
|
|
||||||
<file>arrow_down.png</file>
|
<file>arrow_down.png</file>
|
||||||
<file>arrow_right.png</file>
|
<file>arrow_right.png</file>
|
||||||
<file>dialog_shadow.png</file>
|
<file>dialog_shadow.png</file>
|
||||||
|
|||||||
@@ -83,6 +83,4 @@ OTHER_FILES += \
|
|||||||
qml/TimeMarks.qml \
|
qml/TimeMarks.qml \
|
||||||
qml/SelectionRange.qml \
|
qml/SelectionRange.qml \
|
||||||
qml/SelectionRangeDetails.qml \
|
qml/SelectionRangeDetails.qml \
|
||||||
qml/Overview.qml \
|
qml/Overview.qml
|
||||||
qml/VerticalGradientBorder.qml \
|
|
||||||
qml/HorizontalGradientBorder.qml
|
|
||||||
|
|||||||
@@ -73,8 +73,6 @@ QtcPlugin {
|
|||||||
"SelectionRangeDetails.qml",
|
"SelectionRangeDetails.qml",
|
||||||
"TimeDisplay.qml",
|
"TimeDisplay.qml",
|
||||||
"TimeMarks.qml",
|
"TimeMarks.qml",
|
||||||
"HorizontalGradientBorder.qml",
|
|
||||||
"VerticalGradientBorder.qml",
|
|
||||||
"qmlprofiler.qrc",
|
"qmlprofiler.qrc",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user