mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Version 0.10.15 alpha: crash fix in new player, close button added.
Also some grammar improvements and pinned message bar hiding fixed.
This commit is contained in:
@@ -45,10 +45,9 @@ void ContinuousSlider::setDisabled(bool disabled) {
|
||||
}
|
||||
}
|
||||
|
||||
void ContinuousSlider::setMoveByWheel(bool moveByWheel) {
|
||||
if (_moveByWheel != moveByWheel) {
|
||||
_moveByWheel = moveByWheel;
|
||||
if (_moveByWheel) {
|
||||
void ContinuousSlider::setMoveByWheel(bool move) {
|
||||
if (move != moveByWheel()) {
|
||||
if (move) {
|
||||
_byWheelFinished = std_::make_unique<SingleTimer>();
|
||||
_byWheelFinished->setTimeoutHandler([this] {
|
||||
if (_changeFinishedCallback) {
|
||||
@@ -124,7 +123,7 @@ void ContinuousSlider::mouseReleaseEvent(QMouseEvent *e) {
|
||||
}
|
||||
|
||||
void ContinuousSlider::wheelEvent(QWheelEvent *e) {
|
||||
if (_mouseDown) {
|
||||
if (_mouseDown || !moveByWheel()) {
|
||||
return;
|
||||
}
|
||||
#ifdef OS_MAC_OLD
|
||||
|
@@ -54,7 +54,7 @@ public:
|
||||
return _mouseDown;
|
||||
}
|
||||
|
||||
void setMoveByWheel(bool moveByWheel);
|
||||
void setMoveByWheel(bool move);
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent(QMouseEvent *e) override;
|
||||
@@ -85,6 +85,10 @@ private:
|
||||
virtual QRect getSeekRect() const = 0;
|
||||
virtual float64 getOverDuration() const = 0;
|
||||
|
||||
bool moveByWheel() const {
|
||||
return _byWheelFinished != nullptr;
|
||||
}
|
||||
|
||||
void step_value(float64 ms, bool timer);
|
||||
void setOver(bool over);
|
||||
float64 computeValue(const QPoint &pos) const;
|
||||
@@ -93,7 +97,6 @@ private:
|
||||
Direction _direction = Direction::Horizontal;
|
||||
bool _disabled = false;
|
||||
|
||||
bool _moveByWheel = false;
|
||||
std_::unique_ptr<SingleTimer> _byWheelFinished;
|
||||
|
||||
Callback _changeProgressCallback;
|
||||
|
Reference in New Issue
Block a user