Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
f7a102db
Commit
f7a102db
authored
Mar 01, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.statesEditor: adept to qml syntax changes
parent
df88a536
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/stateseditor/stateslist.qml
View file @
f7a102db
...
...
@@ -16,16 +16,14 @@ Rectangle {
currentStateIndex
=
statesEditorModel
.
count
-
1
;
}
Connection
{
sender
:
statesEditorModel
signal
:
"
countChanged()
"
script
:
adjustCurrentStateIndex
();
Connections
{
target
:
statesEditorModel
onCountChanged
:
adjustCurrentStateIndex
()
}
Connection
{
sender
:
statesEditorModel
signal
:
"
changedToState(n)
"
script
:
root
.
currentStateIndex
=
n
;
Connections
{
target
:
statesEditorModel
onChangedToState
:
{
root
.
currentStateIndex
=
1
;
}
}
// TextInputs don't loose focus automatically when user clicks away, have to be done explicitly
...
...
@@ -52,8 +50,8 @@ Rectangle {
anchors.topMargin
:
-
1
;
anchors.leftMargin
:
-
1
;
viewpor
tHeight
:
height
viewpor
tWidth
:
statesRow
.
width
+
2
conten
tHeight
:
height
conten
tWidth
:
statesRow
.
width
+
2
Row
{
...
...
@@ -107,9 +105,9 @@ Rectangle {
id
:
scrollBarAdjuster
function
adjustScrollBar
()
{
if
(
parent
.
isCurrentState
)
{
if
(
container
.
x
+
container
.
width
>
listView
.
viewpor
tX
+
listView
.
width
)
if
(
container
.
x
+
container
.
width
>
listView
.
conten
tX
+
listView
.
width
)
horizontalScrollbar
.
viewPosition
=
container
.
x
+
container
.
width
-
listView
.
width
;
if
(
container
.
x
<
listView
.
viewpor
tX
)
if
(
container
.
x
<
listView
.
conten
tX
)
horizontalScrollbar
.
viewPosition
=
container
.
x
;
}
}
...
...
@@ -214,10 +212,9 @@ Rectangle {
}
}
Connection
{
sender
:
root
signal
:
"
unFocus()
"
script
:
stateNameEditor
.
unFocus
()
Connections
{
target
:
root
onUnFocus
:
stateNameEditor
.
unFocus
();
}
Item
{
...
...
@@ -354,7 +351,7 @@ Rectangle {
anchors.bottomMargin
:
1
anchors.rightMargin
:
1
visible
:(
newStateBoxLoader
.
x
+
newStateBoxLoader
.
width
/
2
-
11
>
listView
.
width
+
listView
.
viewpor
tX
);
visible
:(
newStateBoxLoader
.
x
+
newStateBoxLoader
.
width
/
2
-
11
>
listView
.
width
+
listView
.
conten
tX
);
Loader
{
...
...
@@ -424,13 +421,13 @@ Rectangle {
Item
{
id
:
horizontalScrollbar
// Current listView implementation sometimes has negative width or
viewpor
tWidth
// Current listView implementation sometimes has negative width or
conten
tWidth
property
int
viewPosition
:
0
;
property
int
viewLength
:
(
listView
.
width
>=
0
?
listView
.
width
:
0
);
property
int
totalLength
:
(
listView
.
viewpor
tWidth
>=
0
?
listView
.
viewpor
tWidth
:
0
);
property
int
totalLength
:
(
listView
.
conten
tWidth
>=
0
?
listView
.
conten
tWidth
:
0
);
onViewPositionChanged
:
listView
.
viewpor
tX
=
viewPosition
;
onViewPositionChanged
:
listView
.
conten
tX
=
viewPosition
;
onViewLengthChanged
:
{
if
((
totalLength
>
viewLength
)
&&
(
viewPosition
>
totalLength
-
viewLength
))
viewPosition
=
totalLength
-
viewLength
;
...
...
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