2
0
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:
John Preston
2016-10-18 18:19:13 +03:00
parent b33b59b8b9
commit 48a20f0e71
18 changed files with 132 additions and 62 deletions

View File

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

View File

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