Skip to content
GitLab
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
ba8317f6
Commit
ba8317f6
authored
Apr 12, 2010
by
Jörg Schummer
Committed by
Kai Koehne
Apr 12, 2010
Browse files
QmlDesigner.ItemLibrary: Updated scroll bar style
parent
fac5b921
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidgets.cpp
View file @
ba8317f6
...
...
@@ -104,7 +104,7 @@ ItemLibraryTreeView::ItemLibraryTreeView(QWidget *parent) :
connect
(
this
,
SIGNAL
(
clicked
(
const
QModelIndex
&
)),
this
,
SLOT
(
activateItem
(
const
QModelIndex
&
)));
setHeaderHidden
(
true
);
setIndentation
(
20
);
setVerticalScrollBarPolicy
(
Qt
::
ScrollBarA
lwaysOn
);
setVerticalScrollBarPolicy
(
Qt
::
ScrollBarA
sNeeded
);
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
setAttribute
(
Qt
::
WA_MacShowFocusRect
,
false
);
...
...
src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml
View file @
ba8317f6
...
...
@@ -181,7 +181,7 @@ reasons and then passed to the section views */
anchors.topMargin
:
3
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
scrollbar
.
left
anchors.right
:
scrollbar
Frame
.
left
overShoot
:
false
interactive
:
false
...
...
@@ -211,17 +211,25 @@ content position out of scope regarding the scrollbar. */
}
}
Scrollbar
{
id
:
scrollbar
Item
{
id
:
scrollbar
Frame
anchors.top
:
parent
.
top
anchors.topMargin
:
2
anchors.bottom
:
parent
.
bottom
anchors.bottomMargin
:
2
anchors.left
:
parent
.
right
anchors.leftMargin
:
-
10
anchors.bottomMargin
:
1
anchors.right
:
parent
.
right
// The next line unfortunately introduces a cyclic property binding (strangely,
// in SectionView)
// width: (itemsFlickable.contentHeight > itemsFlickable.height)? 11:0
width
:
11
flickable
:
itemsFlickable
Scrollbar
{
id
:
scrollbar
anchors.fill
:
parent
anchors.leftMargin
:
1
flickable
:
itemsFlickable
}
}
}
src/plugins/qmldesigner/components/itemlibrary/qml/ItemsViewStyle.qml
View file @
ba8317f6
...
...
@@ -35,9 +35,11 @@ Item {
property
string
backgroundColor
:
"
#4f4f4f
"
property
string
raisedBackgroundColor
:
"
#e0e0e0
"
property
string
scrollbarBorderColor
:
"
#8F8F8F
"
property
string
scrollbarGradientStartColor
:
"
#7E7E7E
"
property
string
scrollbarGradientEndColor
:
"
#C6C6C6
"
property
string
scrollbarColor
:
"
#444444
"
property
string
scrollbarBorderColor
:
"
#333333
"
property
string
scrollbarGradientStartColor
:
"
#393939
"
property
string
scrollbarGradientMiddleColor
:
"
#656565
"
property
string
scrollbarGradientEndColor
:
"
#888888
"
property
int
scrollbarClickScrollAmount
:
40
property
string
itemNameTextColor
:
"
#FFFFFF
"
...
...
src/plugins/qmldesigner/components/itemlibrary/qml/Scrollbar.qml
View file @
ba8317f6
...
...
@@ -50,11 +50,17 @@ Item {
property
int
scrollHeight
:
height
-
handle
.
height
clip
:
true
Rectangle
{
anchors.fill
:
parent
;
anchors.rightMargin
:
1
anchors.bottomMargin
:
1
color
:
"
transparent
"
anchors.top
:
parent
.
top
anchors.topMargin
:
2
anchors.bottom
:
parent
.
bottom
anchors.bottomMargin
:
3
anchors.horizontalCenter
:
parent
.
horizontalCenter
width
:
6
radius
:
3
color
:
style
.
scrollbarColor
border.width
:
1
border.color
:
style
.
scrollbarBorderColor
}
...
...
@@ -101,9 +107,7 @@ Item {
id
:
handle
anchors.left
:
parent
.
left
anchors.leftMargin
:
1
anchors.right
:
parent
.
right
// anchors.rightMargin: 1
height
:
Math
.
max
(
width
,
bar
.
height
*
Math
.
min
(
1
,
flickable
.
height
/
flickable
.
contentHeight
))
property
bool
updateFlickable
:
true
...
...
@@ -113,29 +117,25 @@ Item {
flickable
.
contentY
=
Math
.
max
(
0
,
flickable
.
contentHeight
*
y
/
bar
.
height
)
}
Rectangle
{
width
:
parent
.
height
-
1
height
:
parent
.
width
-
1
y
:
1
-
height
rotation
:
90
transformOrigin
:
Item
.
BottomLeft
Rectangle
{
width
:
parent
.
height
height
:
parent
.
width
y
:
-
height
-
2
x
:
-
2
color
:
"
black
"
rotation
:
90
transformOrigin
:
Item
.
BottomLeft
Rectangle
{
width
:
parent
.
width
-
2
height
:
parent
.
height
-
2
y
:
1
x
:
1
border.color
:
style
.
scrollbarBorderColor
border.width
:
1
radius
:
3
gradient
:
Gradient
{
GradientStop
{
position
:
0.0
;
color
:
style
.
scrollbarGradientStartColor
}
GradientStop
{
position
:
1.0
;
color
:
style
.
scrollbarGradientEndColor
}
GradientStop
{
position
:
0.15
;
color
:
style
.
scrollbarGradientStartColor
}
GradientStop
{
position
:
0.78
;
color
:
style
.
scrollbarGradientMiddleColor
}
GradientStop
{
position
:
0.80
;
color
:
style
.
scrollbarGradientEndColor
}
}
}
}
MouseArea
{
anchors.fill
:
parent
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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