Add hide()
This commit is contained in:
@@ -52,8 +52,8 @@ const qreal TrackSliderPopup::kBlurRadius = 20.0;
|
|||||||
TrackSliderPopup::TrackSliderPopup(QWidget* parent)
|
TrackSliderPopup::TrackSliderPopup(QWidget* parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
font_metrics_(fontMetrics()),
|
font_metrics_(fontMetrics()),
|
||||||
small_font_metrics_(fontMetrics())
|
small_font_metrics_(fontMetrics()) {
|
||||||
{
|
|
||||||
setAttribute(Qt::WA_TransparentForMouseEvents);
|
setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
setMouseTracking(true);
|
setMouseTracking(true);
|
||||||
|
|
||||||
@@ -62,6 +62,7 @@ TrackSliderPopup::TrackSliderPopup(QWidget* parent)
|
|||||||
small_font_.setPointSizeF(7.5);
|
small_font_.setPointSizeF(7.5);
|
||||||
font_metrics_ = QFontMetrics(font_);
|
font_metrics_ = QFontMetrics(font_);
|
||||||
small_font_metrics_ = QFontMetrics(small_font_);
|
small_font_metrics_ = QFontMetrics(small_font_);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackSliderPopup::SetText(const QString& text) {
|
void TrackSliderPopup::SetText(const QString& text) {
|
||||||
@@ -180,6 +181,5 @@ void TrackSliderPopup::UpdatePixmap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TrackSliderPopup::UpdatePosition() {
|
void TrackSliderPopup::UpdatePosition() {
|
||||||
move(pos_.x() - pixmap_.width() / 2,
|
move(pos_.x() - pixmap_.width() / 2, pos_.y() - pixmap_.height() + kBlurRadius);
|
||||||
pos_.y() - pixmap_.height() + kBlurRadius);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,9 +38,10 @@
|
|||||||
TrackSliderSlider::TrackSliderSlider(QWidget* parent)
|
TrackSliderSlider::TrackSliderSlider(QWidget* parent)
|
||||||
: QSlider(parent),
|
: QSlider(parent),
|
||||||
popup_(new TrackSliderPopup(window())),
|
popup_(new TrackSliderPopup(window())),
|
||||||
mouse_hover_seconds_(0)
|
mouse_hover_seconds_(0) {
|
||||||
{
|
|
||||||
setMouseTracking(true);
|
setMouseTracking(true);
|
||||||
|
popup_->hide();
|
||||||
|
|
||||||
connect(this, SIGNAL(valueChanged(int)), SLOT(UpdateDeltaTime()));
|
connect(this, SIGNAL(valueChanged(int)), SLOT(UpdateDeltaTime()));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user