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
df88a536
Commit
df88a536
authored
Mar 01, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.itemLibrary: adept to qml syntax changes
parent
e2f5a873
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml
View file @
df88a536
...
...
@@ -81,10 +81,9 @@ Rectangle {
onItemSelected
:
itemsView
.
itemSelected
(
itemLibId
)
onItemDragged
:
itemsView
.
itemDragged
(
itemLibId
)
Connection
{
sender
:
itemsView
signal
:
"
expandAllEntries()
"
script
:
section
.
expand
()
Connections
{
target
:
itemsView
onExpandAllEntries
:
section
.
expand
();
}
}
}
...
...
@@ -101,7 +100,7 @@ Rectangle {
clip
:
true
interactive
:
false
viewpor
tHeight
:
col
.
height
conten
tHeight
:
col
.
height
Column
{
id
:
col
...
...
src/plugins/qmldesigner/components/itemlibrary/qml/Scrollbar.qml
View file @
df88a536
...
...
@@ -51,12 +51,12 @@ Item {
border.color
:
style
.
scrollbarBorderColor
;
}
function
moveHandle
(
viewpor
tPos
,
updateFlickable
)
{
function
moveHandle
(
conten
tPos
,
updateFlickable
)
{
handle
.
updateFlickable
=
updateFlickable
if
(
flickable
)
handle
.
y
=
scrollHeight
*
Math
.
min
(
viewpor
tPos
/
(
flickable
.
viewpor
tHeight
-
flickable
.
height
),
conten
tPos
/
(
flickable
.
conten
tHeight
-
flickable
.
height
),
1
);
else
handle
.
y
=
0
;
...
...
@@ -65,27 +65,24 @@ Item {
}
function
updateHandle
()
{
moveHandle
(
flickable
.
viewpor
tY
,
false
);
moveHandle
(
flickable
.
conten
tY
,
false
);
}
onFlickableChanged
:
moveHandle
(
0
,
true
)
Connection
{
sender
:
flickable
signal
:
"
heightChanged
"
script
:
moveHandle
(
0
,
true
)
Connections
{
target
:
flickable
onHeightChanged
:
moveHandle
(
0
,
true
)
}
Connection
{
sender
:
flickable
signal
:
"
viewportHeightChanged
"
script
:
updateHandle
()
Connections
{
target
:
flickable
onContentHeightChanged
:
updateHandle
()
}
Connection
{
sender
:
flickable
signal
:
"
positionYChanged
"
script
:
updateHandle
()
Connections
{
target
:
flickable
onContentYChanged
:
updateHandle
()
}
onHeightChanged
:
updateHandle
()
...
...
@@ -105,13 +102,13 @@ Item {
anchors.leftMargin
:
1
anchors.right
:
parent
.
right
// anchors.rightMargin: 1
height
:
Math
.
max
(
width
,
bar
.
height
*
Math
.
min
(
1
,
flickable
.
height
/
flickable
.
viewpor
tHeight
))
height
:
Math
.
max
(
width
,
bar
.
height
*
Math
.
min
(
1
,
flickable
.
height
/
flickable
.
conten
tHeight
))
property
bool
updateFlickable
:
true
onYChanged
:
{
if
(
updateFlickable
)
flickable
.
viewpor
tY
=
Math
.
max
(
0
,
flickable
.
viewpor
tHeight
*
y
/
bar
.
height
)
flickable
.
conten
tY
=
Math
.
max
(
0
,
flickable
.
conten
tHeight
*
y
/
bar
.
height
)
}
Rectangle
{
...
...
src/plugins/qmldesigner/components/itemlibrary/qml/SectionView.qml
View file @
df88a536
...
...
@@ -138,10 +138,9 @@ Column {
id
:
gridView
// workaround
Connection
{
sender
:
itemLibraryModel
signal
:
"
visibilityUpdated()
"
script
:
gridView
.
positionViewAtIndex
(
0
)
Connections
{
target
:
itemLibraryModel
onVisibilityUpdated
:
gridView
.
positionViewAtIndex
(
0
);
}
anchors.fill
:
parent
...
...
src/plugins/qmldesigner/components/itemlibrary/qml/Selector.qml
View file @
df88a536
...
...
@@ -50,10 +50,9 @@ Item {
x
:
(
section
&&
item
)?
(
section
.
x
+
item
.
x
+
sectionXOffset
):
0
;
y
:
(
section
&&
item
)?
(
section
.
y
+
style
.
selectionSectionOffset
+
item
.
y
+
sectionYOffset
):
0
;
Connection
{
sender
:
itemLibraryModel
signal
:
"
visibilityUpdated()
"
script
:
unselect
()
Connections
{
target
:
itemLibraryModel
onVisibilityUpdated
:
unselect
()
}
function
select
(
section
,
item
,
sectionXOffset
,
sectionYOffset
)
{
...
...
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