1
0
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:
David Sansome 2010-12-29 14:32:16 +00:00
parent a9a8b849ca
commit 5b4b4a98c7
2 changed files with 4 additions and 8 deletions

View File

@ -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);

View File

@ -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) {