forked from qt-creator/qt-creator
Tracing: Force alpha channel of RangeMove into a sane range
We want the range mover to be visible, but not completely opaque and we don't want to depend on the theme for this. Therefore if the alpha channel is < 0.3 or or > 0.7 just clamp it. Change-Id: I4e5ee32bd890dc8db2bc4b9bcd77b4687b23e22d Fixes: QTCREATORBUG-21402 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -48,7 +48,11 @@ Item {
|
|||||||
width: rightRange.x - leftRange.x
|
width: rightRange.x - leftRange.x
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
color: width > 1 ? (dragArea.pressed ? dragColor : rangeColor) : singleLineColor
|
function alphaColor(color) {
|
||||||
|
return Qt.rgba(color.r, color.g, color.b, Math.max(Math.min(color.a, 0.7), 0.3));
|
||||||
|
}
|
||||||
|
|
||||||
|
color: width > 1 ? alphaColor(dragArea.pressed ? dragColor : rangeColor) : singleLineColor
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
Reference in New Issue
Block a user