Commit 1707b49a authored by Jacopo De Simoi's avatar Jacopo De Simoi
Browse files

Reserve space for text and free space bar

Reserve the height for the text and the
free space bar while invisible, to avoid jumpyness

BUG:291676
FIXED-IN:4.9.1
parent 51471459
......@@ -122,32 +122,44 @@ Item {
height: paintedHeight
}
PlasmaComponents.Label {
id: deviceStatus
Item {
width:deviceStatus.width
height:deviceStatus.height
PlasmaComponents.Label {
id: deviceStatus
height: paintedHeight
// FIXME: state changes do not reach the plasmoid if the
// device was already attached when the plasmoid was
// initialized
text: deviceItem.state ==0 ? container.idleStatus() : (deviceItem.state==1 ? i18nc("Accessing is a less technical word for Mounting; translation should be short and mean \'Currently mounting this device\'", "Accessing...") : i18nc("Removing is a less technical word for Unmounting; translation shoud be short and mean \'Currently unmounting this device\'", "Removing..."))
font.pointSize: theme.smallestFont.pointSize
color: "#99"+(theme.textColor.toString().substr(1))
opacity: container.containsMouse || expanded ? 1 : 0;
height: paintedHeight
// FIXME: state changes do not reach the plasmoid if the
// device was already attached when the plasmoid was
// initialized
text: deviceItem.state ==0 ? container.idleStatus() : (deviceItem.state==1 ? i18nc("Accessing is a less technical word for Mounting; translation should be short and mean \'Currently mounting this device\'", "Accessing...") : i18nc("Removing is a less technical word for Unmounting; translation shoud be short and mean \'Currently unmounting this device\'", "Removing..."))
font.pointSize: theme.smallestFont.pointSize
color: "#99"+(theme.textColor.toString().substr(1))
opacity: container.containsMouse || expanded ? 1 : 0;
Behavior on opacity { NumberAnimation { duration: 150 } }
}
Behavior on opacity { NumberAnimation { duration: 150 } }
}
}
PlasmaComponents.ProgressBar {
id: freeSpaceBar
height: deviceStatus.height
Item {
height:freeSpaceBar.height
anchors {
left: parent.left
right: parent.right
}
opacity: mounted ? deviceStatus.opacity : 0
minimumValue: 0
maximumValue: 100
orientation: Qt.Horizontal
opacity: mounted ? 1 : 0
PlasmaComponents.ProgressBar {
id: freeSpaceBar
height: deviceStatus.height
anchors {
left: parent.left
right: parent.right
}
opacity: mounted ? deviceStatus.opacity : 0
minimumValue: 0
maximumValue: 100
orientation: Qt.Horizontal
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment