Changeset - abd420a32445
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2017-02-24 15:52:54
hy@ozderya.net
fill scale picker selection rectangle with transparent color
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/scalepicker.cpp
Show inline comments
 
@@ -163,16 +163,21 @@ bool ScalePicker::eventFilter(QObject* o
 
        return QObject::eventFilter(object, event);
 
    }
 
}
 

	
 
void ScalePicker::drawPlotOverlay(QPainter* painter)
 
{
 
    const double FILL_ALPHA = 0.2;
 

	
 
    if (started)
 
    {
 
        painter->save();
 
        painter->setPen(_pen);
 
        QColor color = _pen.color();
 
        color.setAlphaF(FILL_ALPHA);
 
        painter->setBrush(color);
 

	
 
        QRect rect;
 
        if (_scaleWidget->alignment() == QwtScaleDraw::BottomScale ||
 
            _scaleWidget->alignment() == QwtScaleDraw::TopScale)
 
        {
 
            int height = painter->device()->height();
0 comments (0 inline, 0 general)