Fix some bits in the Plasma style
Use properties that exist Remove unused warningy code Make sure we don't call null objects Reviewed by Marco
This commit is contained in:
parent
e4e1613b0f
commit
2649878108
@ -53,13 +53,13 @@ QtObject {
|
||||
|
||||
property color selectionTextColor: theme.highlightedTextColor
|
||||
property color selectionBackgroundColor: theme.highlightColor
|
||||
property color selectionAlternateBackgroundColor: Qt.darker(theme.selectionBackgroundColor, 1.05)
|
||||
property color selectionAlternateBackgroundColor: Qt.darker(theme.highlightColor, 1.05)
|
||||
property color selectionHoverColor: theme.buttonHoverColor
|
||||
property color selectionFocusColor: theme.buttonFocusColor
|
||||
|
||||
property color tooltipTextColor: theme.complementaryTextColor
|
||||
property color tooltipBackgroundColor: theme.complementaryBackgroundColor
|
||||
property color tooltipAlternateBackgroundColor: Qt.darker(theme.tooltipBackgroundColor, 1.05)
|
||||
property color tooltipAlternateBackgroundColor: Qt.darker(theme.complementaryBackgroundColor, 1.05)
|
||||
property color tooltipHoverColor: theme.complementaryHoverColor
|
||||
property color tooltipFocusColor: theme.complementaryFocusColor
|
||||
|
||||
|
@ -70,11 +70,5 @@ T.ProgressBar {
|
||||
imagePath: "widgets/bar_meter_horizontal"
|
||||
prefix: "bar-inactive"
|
||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||
onRepaintNeeded: {
|
||||
implicitHeight = barSvg.elementSize("hint-bar-size").height
|
||||
if (implicitHeight == 0) {
|
||||
implicitHeight = barSvg.elementSize("bar-inactive-top").height + barSvg.elementSize("bar-inactive-bottom").height
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,18 +35,18 @@ Popup {
|
||||
closePolicy: Popup.NoAutoClose
|
||||
property bool shouldBeVisible: false
|
||||
|
||||
x: controlRoot ? Math.min(Math.max(0, controlRoot.mapToItem(root.parent, controlRoot.positionToRectangle(controlRoot.selectionStart).x, 0).x - root.width/2), controlRoot.Window.contentItem.width - root.width) : 0
|
||||
x: parent ? Math.min(Math.max(0, controlRoot.mapToItem(root.parent, controlRoot.positionToRectangle(controlRoot.selectionStart).x, 0).x - root.width/2), parent.width - root.width) : 0
|
||||
|
||||
y: {
|
||||
if (!controlRoot) {
|
||||
if (!parent) {
|
||||
return false;
|
||||
}
|
||||
var desiredY = controlRoot.mapToItem(root.parent, 0, controlRoot.positionToRectangle(controlRoot.selectionStart).y).y - root.height;
|
||||
|
||||
if (desiredY >= 0) {
|
||||
return Math.min(desiredY, controlRoot.Window.contentItem.height - root.height);
|
||||
return Math.min(desiredY, parent.height - root.height);
|
||||
} else {
|
||||
return Math.min(Math.max(0, controlRoot.mapToItem(root.parent, 0, controlRoot.positionToRectangle(controlRoot.selectionEnd).y + Math.round(units.gridUnit*1.5)).y), controlRoot.Window.contentItem.height - root.height);
|
||||
return Math.min(Math.max(0, controlRoot.mapToItem(root.parent, 0, controlRoot.positionToRectangle(controlRoot.selectionEnd).y + Math.round(units.gridUnit*1.5)).y), parent.height - root.height);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user