mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 11:35:24 +01:00
Don't show the slider popup when the slider is disabled, and remove some window flags
This commit is contained in:
parent
a9a8b849ca
commit
5b4b4a98c7
@ -28,15 +28,9 @@ TrackSliderPopup::TrackSliderPopup(QWidget* parent)
|
||||
visibility_timer_(new QTimer(this))
|
||||
{
|
||||
setWindowFlags(Qt::ToolTip | Qt::FramelessWindowHint |
|
||||
Qt::WindowStaysOnTopHint);
|
||||
Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
|
||||
setAttribute(Qt::WA_NoSystemBackground);
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
#ifndef Q_OS_DARWIN
|
||||
// Paints the whole rect with a white background on Mac.
|
||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
// Creates flicker on Mac.
|
||||
setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
#endif
|
||||
setMouseTracking(true);
|
||||
|
||||
visibility_timer_->setSingleShot(true);
|
||||
|
@ -82,7 +82,9 @@ void TrackSliderSlider::mouseMoveEvent(QMouseEvent* e) {
|
||||
|
||||
void TrackSliderSlider::enterEvent(QEvent* e) {
|
||||
QSlider::enterEvent(e);
|
||||
popup_->SetMouseOverSlider(true);
|
||||
if (isEnabled()) {
|
||||
popup_->SetMouseOverSlider(true);
|
||||
}
|
||||
}
|
||||
|
||||
void TrackSliderSlider::leaveEvent(QEvent* e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user