Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
d835b769
Commit
d835b769
authored
May 17, 2011
by
Christiaan Janssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QmlProfiler: removed fixed height
parent
b8393270
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
5 deletions
+119
-5
src/plugins/qmlprofiler/qml/MainView.qml
src/plugins/qmlprofiler/qml/MainView.qml
+19
-3
src/plugins/qmlprofiler/qml/VerticalScrollbar.qml
src/plugins/qmlprofiler/qml/VerticalScrollbar.qml
+96
-0
src/plugins/qmlprofiler/qml/qml.qrc
src/plugins/qmlprofiler/qml/qml.qrc
+1
-0
src/plugins/qmlprofiler/qmlprofiler.pro
src/plugins/qmlprofiler/qmlprofiler.pro
+2
-1
src/plugins/qmlprofiler/tracewindow.cpp
src/plugins/qmlprofiler/tracewindow.cpp
+1
-1
No files found.
src/plugins/qmlprofiler/qml/MainView.qml
View file @
d835b769
...
...
@@ -153,11 +153,13 @@ Rectangle {
anchors.bottom
:
canvas
.
top
contentWidth
:
view
.
totalWidth
contentHeight
:
view
.
height
flickableDirection
:
Flickable
.
HorizontalFlick
TimelineView
{
id
:
view
width
:
flick
.
width
;
height
:
flick
.
height
width
:
flick
.
width
;
height
:
50
*
5
;
startX
:
flick
.
contentX
onStartXChanged
:
{
...
...
@@ -239,6 +241,20 @@ Rectangle {
}
}
VerticalScrollbar
{
id
:
verticalScrollbar
flickable
:
flick
anchors.top
:
parent
.
top
anchors.right
:
flick
.
right
anchors.bottom
:
canvas
.
top
anchors.topMargin
:
1
anchors.bottomMargin
:
1
anchors.rightMargin
:
0
anchors.leftMargin
:
0
width
:
10
}
//popup showing the details for the hovered range
RangeDetails
{
id
:
rangeDetails
...
...
@@ -248,8 +264,8 @@ Rectangle {
id
:
labels
width
:
150
color
:
"
#dcdcdc
"
anchors.top
:
root
.
top
anchors.bottom
:
canvas
.
top
y
:
-
flick
.
contentY
height
:
flick
.
contentHeight
Column
{
//### change to use Repeater + Plotter.names?
...
...
src/plugins/qmlprofiler/qml/VerticalScrollbar.qml
0 → 100644
View file @
d835b769
import
QtQuick
1.0
Item
{
property
variant
flickable
:
this
;
property
int
viewPosition
:
0
;
property
int
viewSize
:
(
flickable
.
height
>=
0
?
flickable
.
height
:
0
);
property
int
contentSize
:
(
flickable
.
contentHeight
>=
0
?
flickable
.
contentHeight
:
0
);
id
:
verticalScrollbar
onViewPositionChanged
:
flickable
.
contentY
=
viewPosition
;
onViewSizeChanged
:
{
if
((
contentSize
>
viewSize
)
&&
(
viewPosition
>
contentSize
-
viewSize
))
viewPosition
=
contentSize
-
viewSize
;
}
onContentSizeChanged
:
{
contentSizeDecreased
();
}
function
contentSizeDecreased
()
{
if
((
contentSize
>
viewSize
)
&&
(
viewPosition
>
contentSize
-
viewSize
))
viewPosition
=
contentSize
-
viewSize
;
}
Rectangle
{
id
:
groove
height
:
parent
.
height
-
4
width
:
6
color
:
"
#FFFFFF
"
radius
:
3
border.width
:
1
border.color
:
"
#666666
"
anchors.top
:
parent
.
top
anchors.topMargin
:
2
anchors.bottom
:
parent
.
bottom
anchors.bottomMargin
:
2
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
2
}
// the scrollbar
Item
{
id
:
bar
height
:
parent
.
height
width
:
parent
.
width
y
:
Math
.
floor
(
(
verticalScrollbar
.
contentSize
>
0
?
verticalScrollbar
.
viewPosition
*
verticalScrollbar
.
height
/
verticalScrollbar
.
contentSize
:
0
));
Rectangle
{
id
:
handle
height
:
{
if
(
verticalScrollbar
.
contentSize
>
0
)
{
if
(
verticalScrollbar
.
viewSize
>
verticalScrollbar
.
contentSize
||
parent
.
height
<
0
)
{
verticalScrollbar
.
visible
=
false
;
return
parent
.
height
;
}
else
{
verticalScrollbar
.
visible
=
true
;
return
Math
.
floor
(
verticalScrollbar
.
viewSize
/
verticalScrollbar
.
contentSize
*
parent
.
height
);
}
}
else
{
return
0
;
}
}
width
:
parent
.
width
y
:
0
border.color
:
"
#666666
"
border.width
:
1
radius
:
3
gradient
:
Gradient
{
GradientStop
{
position
:
0.20
;
color
:
"
#CCCCCC
"
}
GradientStop
{
position
:
0.23
;
color
:
"
#AAAAAA
"
}
GradientStop
{
position
:
0.85
;
color
:
"
#888888
"
}
}
MouseArea
{
property
int
dragging
:
0
;
property
int
originalY
:
0
;
anchors.fill
:
parent
onPressed
:
{
dragging
=
1
;
originalY
=
mouse
.
y
;
}
onReleased
:
{
dragging
=
0
;
}
onPositionChanged
:
{
if
(
dragging
)
{
var
newY
=
mouse
.
y
-
originalY
+
bar
.
y
;
if
(
newY
<
0
)
newY
=
0
;
if
(
newY
>
verticalScrollbar
.
height
-
handle
.
height
)
newY
=
verticalScrollbar
.
height
-
handle
.
height
;
verticalScrollbar
.
viewPosition
=
(
newY
*
verticalScrollbar
.
contentSize
/
verticalScrollbar
.
height
);
}
}
}
}
}
}
src/plugins/qmlprofiler/qml/qml.qrc
View file @
d835b769
...
...
@@ -12,5 +12,6 @@
<file>RecordButton.qml</file>
<file>ToolButton.qml</file>
<file>analyzer_category_small.png</file>
<file>VerticalScrollbar.qml</file>
</qresource>
</RCC>
src/plugins/qmlprofiler/qmlprofiler.pro
View file @
d835b769
...
...
@@ -50,7 +50,8 @@ OTHER_FILES += \
qml
/
RangeMover
.
qml
\
qml
/
RecordButton
.
qml
\
qml
/
ToolButton
.
qml
\
qml
/
MainView
.
js
qml
/
MainView
.
js
\
qml
/
VerticalScrollbar
.
qml
FORMS
+=
\
qmlprofilerattachdialog
.
ui
src/plugins/qmlprofiler/tracewindow.cpp
View file @
d835b769
...
...
@@ -289,7 +289,7 @@ TraceWindow::TraceWindow(QWidget *parent)
setLayout
(
groupLayout
);
// Maximum height: 5 rows of 50 pixels + scrollbar of 50 pixels
setFixedHeight
(
300
);
//
setFixedHeight(300);
}
TraceWindow
::~
TraceWindow
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment