Revert "Hide TrackSliderPopup on exit from popup"
This reverts commit f629d3731530bdfd512a53887abb48b9756087d2.
This commit is contained in:
parent
f629d37315
commit
9929450cc2
@ -66,11 +66,6 @@ void TrackSliderPopup::paintEvent(QPaintEvent*) {
|
|||||||
p.drawPixmap(0, 0, pixmap_);
|
p.drawPixmap(0, 0, pixmap_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackSliderPopup::leaveEvent(QEvent* e) {
|
|
||||||
QWidget::leaveEvent(e);
|
|
||||||
hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TrackSliderPopup::UpdatePixmap() {
|
void TrackSliderPopup::UpdatePixmap() {
|
||||||
const int text_width =
|
const int text_width =
|
||||||
qMax(font_metrics_.width(text_), small_font_metrics_.width(small_text_));
|
qMax(font_metrics_.width(text_), small_font_metrics_.width(small_text_));
|
||||||
|
@ -33,7 +33,6 @@ class TrackSliderPopup : public QWidget {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent*);
|
void paintEvent(QPaintEvent*);
|
||||||
void leaveEvent(QEvent*);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int kTextMargin;
|
static const int kTextMargin;
|
||||||
|
@ -103,6 +103,11 @@ void TrackSliderSlider::enterEvent(QEvent* e) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TrackSliderSlider::leaveEvent(QEvent* e) {
|
||||||
|
QSlider::leaveEvent(e);
|
||||||
|
popup_->hide();
|
||||||
|
}
|
||||||
|
|
||||||
void TrackSliderSlider::keyPressEvent(QKeyEvent* event) {
|
void TrackSliderSlider::keyPressEvent(QKeyEvent* event) {
|
||||||
if (event->key() == Qt::Key_Left || event->key() == Qt::Key_Down) {
|
if (event->key() == Qt::Key_Left || event->key() == Qt::Key_Down) {
|
||||||
emit SeekBackward();
|
emit SeekBackward();
|
||||||
|
@ -39,6 +39,7 @@ signals:
|
|||||||
void mouseMoveEvent(QMouseEvent* e);
|
void mouseMoveEvent(QMouseEvent* e);
|
||||||
void wheelEvent(QWheelEvent *e);
|
void wheelEvent(QWheelEvent *e);
|
||||||
void enterEvent(QEvent*);
|
void enterEvent(QEvent*);
|
||||||
|
void leaveEvent(QEvent*);
|
||||||
void keyPressEvent(QKeyEvent* event);
|
void keyPressEvent(QKeyEvent* event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user