Merge branch 'master' into plasma/mart/PageRow
This commit is contained in:
commit
533902e9d4
@ -87,6 +87,7 @@ Item {
|
|||||||
id: contents
|
id: contents
|
||||||
|
|
||||||
property bool _isVertical: orientation == Qt.Vertical
|
property bool _isVertical: orientation == Qt.Vertical
|
||||||
|
property int _tileWidth: width
|
||||||
|
|
||||||
width: _isVertical ? progressBar.height : progressBar.width
|
width: _isVertical ? progressBar.height : progressBar.width
|
||||||
height: _isVertical ? progressBar.width : progressBar.height
|
height: _isVertical ? progressBar.width : progressBar.height
|
||||||
@ -99,17 +100,20 @@ Item {
|
|||||||
interval: 0
|
interval: 0
|
||||||
running: false
|
running: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
contents._tileWidth = Math.floor(contents.width/(Math.floor(contents.width/(contents.height/1.6))))
|
||||||
|
|
||||||
|
|
||||||
if (barFrameSvg.hasElement("hint-bar-stretch")) {
|
if (barFrameSvg.hasElement("hint-bar-stretch")) {
|
||||||
barFrameSvg.resizeFrame(Qt.size(barPixmapItem.width, barPixmapItem.height))
|
barFrameSvg.resizeFrame(Qt.size(barPixmapItem.width, barPixmapItem.height))
|
||||||
} else {
|
} else {
|
||||||
barFrameSvg.resizeFrame(Qt.size(Math.floor(contents.height/1.6), contents.height))
|
barFrameSvg.resizeFrame(Qt.size(contents._tileWidth, contents.height))
|
||||||
}
|
}
|
||||||
barPixmapItem.pixmap = barFrameSvg.framePixmap()
|
barPixmapItem.pixmap = barFrameSvg.framePixmap()
|
||||||
|
|
||||||
if (backgroundFrameSvg.hasElement("hint-bar-stretch")) {
|
if (backgroundFrameSvg.hasElement("hint-bar-stretch")) {
|
||||||
backgroundFrameSvg.resizeFrame(Qt.size(backgroundPixmapItem.width, backgroundPixmapItem.height))
|
backgroundFrameSvg.resizeFrame(Qt.size(backgroundPixmapItem.width, backgroundPixmapItem.height))
|
||||||
} else {
|
} else {
|
||||||
backgroundFrameSvg.resizeFrame(Qt.size(Math.floor(contents.height/1.6), contents.height))
|
backgroundFrameSvg.resizeFrame(Qt.size(contents._tileWidth, contents.height))
|
||||||
}
|
}
|
||||||
backgroundPixmapItem.pixmap = backgroundFrameSvg.framePixmap()
|
backgroundPixmapItem.pixmap = backgroundFrameSvg.framePixmap()
|
||||||
}
|
}
|
||||||
@ -132,9 +136,8 @@ Item {
|
|||||||
}
|
}
|
||||||
QPixmapItem {
|
QPixmapItem {
|
||||||
id: backgroundPixmapItem
|
id: backgroundPixmapItem
|
||||||
fillMode: QPixmapItem.Tile
|
anchors.fill: parent
|
||||||
width: Math.floor(parent.width/(height/1.6))*Math.floor(height/1.6)
|
fillMode: QPixmapItem.TileHorizontally
|
||||||
height: parent.height
|
|
||||||
onWidthChanged: resizeTimer.restart()
|
onWidthChanged: resizeTimer.restart()
|
||||||
onHeightChanged: resizeTimer.restart()
|
onHeightChanged: resizeTimer.restart()
|
||||||
}
|
}
|
||||||
@ -142,11 +145,12 @@ Item {
|
|||||||
|
|
||||||
QPixmapItem {
|
QPixmapItem {
|
||||||
id: barPixmapItem
|
id: barPixmapItem
|
||||||
fillMode: QPixmapItem.Tile
|
fillMode: QPixmapItem.TileHorizontally
|
||||||
width: indeterminate ? Math.floor(height/1.6)*2 : range.position
|
width: indeterminate ? contents._tileWidth*2 : range.position
|
||||||
height: contents.height
|
height: contents.height
|
||||||
|
|
||||||
visible: indeterminate || value > 0
|
visible: indeterminate || value > 0
|
||||||
|
onWidthChanged: resizeTimer.restart()
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: indeterminateAnimation
|
id: indeterminateAnimation
|
||||||
|
Loading…
Reference in New Issue
Block a user