Add transparent overlay window (#4746)
This commit is contained in:
+25
-11
@@ -285,18 +285,21 @@ void Scrollbar::paintEvent(QPaintEvent * /*event*/)
|
||||
bool enableElevatedMessageHighlights =
|
||||
getSettings()->enableElevatedMessageHighlight;
|
||||
|
||||
this->thumbRect_.setX(xOffset);
|
||||
if (this->showThumb_)
|
||||
{
|
||||
this->thumbRect_.setX(xOffset);
|
||||
|
||||
// mouse over thumb
|
||||
if (this->mouseDownLocation_ == MouseLocation::InsideThumb)
|
||||
{
|
||||
painter.fillRect(this->thumbRect_,
|
||||
this->theme->scrollbars.thumbSelected);
|
||||
}
|
||||
// mouse not over thumb
|
||||
else
|
||||
{
|
||||
painter.fillRect(this->thumbRect_, this->theme->scrollbars.thumb);
|
||||
// mouse over thumb
|
||||
if (this->mouseDownLocation_ == MouseLocation::InsideThumb)
|
||||
{
|
||||
painter.fillRect(this->thumbRect_,
|
||||
this->theme->scrollbars.thumbSelected);
|
||||
}
|
||||
// mouse not over thumb
|
||||
else
|
||||
{
|
||||
painter.fillRect(this->thumbRect_, this->theme->scrollbars.thumb);
|
||||
}
|
||||
}
|
||||
|
||||
// draw highlights
|
||||
@@ -449,6 +452,17 @@ void Scrollbar::updateScroll()
|
||||
this->update();
|
||||
}
|
||||
|
||||
void Scrollbar::setShowThumb(bool showThumb)
|
||||
{
|
||||
if (this->showThumb_ == showThumb)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this->showThumb_ = showThumb;
|
||||
this->update();
|
||||
}
|
||||
|
||||
Scrollbar::MouseLocation Scrollbar::locationOfMouseEvent(
|
||||
QMouseEvent *event) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user