fix: hide scrollbar highlights in overlay window (#5769)
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
## Unversioned
|
||||
|
||||
- Bugfix: Fixed scrollbar highlights being visible in overlay windows. (#5769)
|
||||
|
||||
## 2.5.2-beta.1
|
||||
|
||||
- Major: Add option to show pronouns in user card. (#5442, #5583)
|
||||
|
||||
@@ -127,6 +127,7 @@ OverlayWindow::OverlayWindow(IndirectChannel channel,
|
||||
this->channelView_.setChannel(this->channel_.get());
|
||||
});
|
||||
this->channelView_.scrollbar()->setHideThumb(true);
|
||||
this->channelView_.scrollbar()->setHideHighlights(true);
|
||||
|
||||
this->setAutoFillBackground(false);
|
||||
this->resize(300, 500);
|
||||
|
||||
@@ -495,9 +495,20 @@ bool Scrollbar::shouldShowThumb() const
|
||||
return !(this->hideThumb || this->settingHideThumb);
|
||||
}
|
||||
|
||||
void Scrollbar::setHideHighlights(bool hideHighlights)
|
||||
{
|
||||
if (this->hideHighlights == hideHighlights)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this->hideHighlights = hideHighlights;
|
||||
this->update();
|
||||
}
|
||||
|
||||
bool Scrollbar::shouldShowHighlights() const
|
||||
{
|
||||
return !this->settingHideHighlights;
|
||||
return !(this->hideHighlights || this->settingHideHighlights);
|
||||
}
|
||||
|
||||
bool Scrollbar::shouldHandleMouseEvents() const
|
||||
|
||||
@@ -133,6 +133,8 @@ public:
|
||||
/// Returns true if we should show the thumb (the handle you can drag)
|
||||
bool shouldShowThumb() const;
|
||||
|
||||
void setHideHighlights(bool hideHighlights);
|
||||
|
||||
/// Returns true if we should show the highlights
|
||||
bool shouldShowHighlights() const;
|
||||
|
||||
@@ -180,10 +182,13 @@ private:
|
||||
boost::circular_buffer<ScrollbarHighlight> highlights_;
|
||||
|
||||
bool atBottom_{true};
|
||||
/// This takes precedence over `settingHideThumb`
|
||||
bool hideThumb{false};
|
||||
/// Controlled by the "Hide scrollbar thumb" setting
|
||||
bool settingHideThumb{false};
|
||||
|
||||
/// This takes precedence over `settingHideHighlights`
|
||||
bool hideHighlights = false;
|
||||
/// Controlled by the "Hide scrollbar highlights" setting
|
||||
bool settingHideHighlights{false};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user