diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 58d9cff247..57aeecb3b6 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -976,7 +976,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop was updated to version {version}\n\n{changes}\n\nFull version history is available here:\n{link}"; "lng_new_version_minor" = "— Bug fixes and other minor improvements"; -"lng_new_version_text" = "— New audio player design\n\nWindows and Linux:\n— Quick reply from notifications\n— Hide all notifications button added\n— Change notifications location and maximum count\n\nWindows 10:\n— Respecting quite hours for the notifications\n\nLinux:\n— You can enable native notifications in Settings"; +"lng_new_version_text" = "— New audio player design\n\nWindows and Linux:\n— Quick reply from notifications\n— Hide all notifications button added\n— Change notifications location and maximum count\n\nWindows 10:\n— Respecting quiet hours for the notifications\n\nLinux:\n— You can enable native notifications in Settings"; "lng_menu_insert_unicode" = "Insert Unicode control character"; diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 52710aff94..198cf231fb 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,10,14,0 - PRODUCTVERSION 0,10,14,0 + FILEVERSION 0,10,15,0 + PRODUCTVERSION 0,10,15,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.10.14.0" + VALUE "FileVersion", "0.10.15.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.10.14.0" + VALUE "ProductVersion", "0.10.15.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 5517bc98ff..cff5a016e0 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,10,14,0 - PRODUCTVERSION 0,10,14,0 + FILEVERSION 0,10,15,0 + PRODUCTVERSION 0,10,15,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -43,10 +43,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileDescription", "Telegram Updater" - VALUE "FileVersion", "0.10.14.0" + VALUE "FileVersion", "0.10.15.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.10.14.0" + VALUE "ProductVersion", "0.10.15.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index bb3df33882..cad0985788 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1087,7 +1087,7 @@ void AppClass::checkMapVersion() { if (Local::oldMapVersion()) { QString versionFeatures; if ((cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 10014) { - versionFeatures = QString::fromUtf8("\xe2\x80\x94 New audio player design\n\xe2\x80\x94 Moved to Qt library version 5.6.2\n\nWindows 10:\n\xe2\x80\x94 Respecting quite hours for the notifications"); + versionFeatures = QString::fromUtf8("\xe2\x80\x94 New audio player design\n\xe2\x80\x94 Moved to Qt library version 5.6.2\n\nWindows 10:\n\xe2\x80\x94 Respecting quiet hours for the notifications"); } else if (!(cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 10005) { versionFeatures = langNewVersionText(); } else { diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index 38d9eefad6..840ef0d5fb 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -24,7 +24,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #define BETA_VERSION_MACRO (0ULL) -constexpr int AppVersion = 10014; -constexpr str_const AppVersionStr = "0.10.14"; +constexpr int AppVersion = 10015; +constexpr str_const AppVersionStr = "0.10.15"; constexpr bool AppAlphaVersion = true; constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 1c3f1577b5..cfc2b8b235 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -4190,7 +4190,7 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re _history->showAtMsgId = _showAtMsgId; destroyUnreadBar(); - if (_pinnedBar) destroyPinnedBar(); + destroyPinnedBar(); _history = _migrated = nullptr; updateBotKeyboard(); } @@ -7560,6 +7560,11 @@ HistoryWidget::PinnedBar::PinnedBar(MsgId msgId, HistoryWidget *parent) , shadow(parent, st::shadowColor) { } +HistoryWidget::PinnedBar::~PinnedBar() { + cancel.destroyDelayed(); + shadow.destroyDelayed(); +} + void HistoryWidget::updatePinnedBar(bool force) { if (!_pinnedBar) { return; @@ -7603,7 +7608,7 @@ bool HistoryWidget::pinnedMsgVisibilityUpdated() { } if (pinnedMsgId) { if (!_pinnedBar) { - _pinnedBar = new PinnedBar(pinnedMsgId, this); + _pinnedBar = std_::make_unique(pinnedMsgId, this); if (_a_show.animating()) { _pinnedBar->cancel->hide(); _pinnedBar->shadow->hide(); @@ -7650,8 +7655,7 @@ bool HistoryWidget::pinnedMsgVisibilityUpdated() { } void HistoryWidget::destroyPinnedBar() { - delete _pinnedBar; - _pinnedBar = nullptr; + _pinnedBar.reset(); _inPinnedMsg = false; } @@ -8881,6 +8885,5 @@ bool HistoryWidget::touchScroll(const QPoint &delta) { } HistoryWidget::~HistoryWidget() { - delete base::take(_pinnedBar); delete base::take(_list); } diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index 0c2d1f6839..b2a364c2b0 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -886,6 +886,7 @@ private: struct PinnedBar { PinnedBar(MsgId msgId, HistoryWidget *parent); + ~PinnedBar(); MsgId msgId = 0; HistoryItem *msg = nullptr; @@ -893,7 +894,7 @@ private: ChildWidget cancel; ChildWidget shadow; }; - PinnedBar *_pinnedBar = nullptr; + std_::unique_ptr _pinnedBar; void updatePinnedBar(bool force = false); bool pinnedMsgVisibilityUpdated(); void destroyPinnedBar(); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 9c6e249fb9..ce9e06ba22 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -124,6 +124,7 @@ MainWidget::MainWidget(MainWindow *window) : TWidget(window) if (Media::Player::exists()) { _playerPanel->setPinCallback([this] { switchToFixedPlayer(); }); + _playerPanel->setCloseCallback([this] { closeBothPlayers(); }); subscribe(Media::Player::instance()->titleButtonOver(), [this](bool over) { if (over) { _playerPanel->showFromOther(); @@ -1578,8 +1579,10 @@ void MainWidget::handleAudioUpdate(const AudioMsgId &audioId) { } if (playing == audioId && audioId.type() == AudioMsgId::Type::Song) { - if (!_playerUsingPanel && !_player && Media::Player::exists()) { - createPlayer(); + if (!(playbackState.state & AudioPlayerStoppedMask) && playbackState.state != AudioPlayerFinishing) { + if (!_playerUsingPanel && !_player && Media::Player::exists()) { + createPlayer(); + } } } @@ -1623,6 +1626,22 @@ void MainWidget::switchToFixedPlayer() { _playerPanel->hideIgnoringEnterEvents(); } +void MainWidget::closeBothPlayers() { + _playerUsingPanel = false; + _player.destroyDelayed(); + _playerVolume.destroyDelayed(); + + if (Media::Player::exists()) { + Media::Player::instance()->usePanelPlayer().notify(false, true); + } + _playerPanel->hideIgnoringEnterEvents(); + _playerPlaylist->hideIgnoringEnterEvents(); + + if (Media::Player::exists()) { + Media::Player::instance()->stop(); + } +} + void MainWidget::createPlayer() { _player.create(this, [this] { playerHeightUpdated(); }); _player->entity()->setCloseCallback([this] { switchToPanelPlayer(); }); diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index cdf4d34094..69c8b4ddd8 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -491,6 +491,7 @@ private: void createPlayer(); void switchToPanelPlayer(); void switchToFixedPlayer(); + void closeBothPlayers(); void playerHeightUpdated(); void sendReadRequest(PeerData *peer, MsgId upTo); diff --git a/Telegram/SourceFiles/media/player/media_player.style b/Telegram/SourceFiles/media/player/media_player.style index 2e30490183..621173dd12 100644 --- a/Telegram/SourceFiles/media/player/media_player.style +++ b/Telegram/SourceFiles/media/player/media_player.style @@ -143,9 +143,7 @@ mediaPlayerPreviousDisabledIcon: icon { }; mediaPlayerClose: IconButton(mediaPlayerRepeatButton) { width: 37px; - icon: icon { - { "player_close", #c8c8c8, point(10px, 12px) }, - }; + icon: icon {{ "player_close", #c8c8c8, point(10px, 12px) }}; } mediaPlayerPlayback: FilledSlider { fullWidth: 6px; @@ -190,25 +188,27 @@ mediaPlayerPanelMarginBottom: 10px; mediaPlayerPanelWidth: 344px; mediaPlayerCoverHeight: 102px; +mediaPlayerPanelClose: IconButton(mediaPlayerClose) { + width: 43px; + height: 28px; + icon: icon {{ "player_close", #c8c8c8, point(16px, 14px) }}; +} + mediaPlayerPanelNextButton: IconButton(mediaPlayerRepeatButton) { width: 37px; - icon: icon { - { "player_panel_next", mediaPlayerActiveFg, point(10px, 10px) }, - }; + icon: icon {{ "player_panel_next", mediaPlayerActiveFg, point(10px, 10px) }}; } mediaPlayerPanelNextDisabledIcon: icon { { "player_panel_next", mediaPlayerInactiveFg, point(10px, 10px) }, }; mediaPlayerPanelPreviousButton: IconButton(mediaPlayerPanelNextButton) { - icon: icon { - { "player_panel_previous", mediaPlayerActiveFg, point(10px, 10px) }, - }; + icon: icon {{ "player_panel_previous", mediaPlayerActiveFg, point(10px, 10px) }}; } mediaPlayerPanelPreviousDisabledIcon: icon { { "player_panel_previous", mediaPlayerInactiveFg, point(10px, 10px) }, }; -mediaPlayerPanelPadding: 18px; +mediaPlayerPanelPadding: 16px; mediaPlayerPanelNameTop: 24px; mediaPlayerPanelPlayLeft: 9px; mediaPlayerPanelPlaySkip: 7px; diff --git a/Telegram/SourceFiles/media/player/media_player_cover.cpp b/Telegram/SourceFiles/media/player/media_player_cover.cpp index 68a9388828..6544a31ef4 100644 --- a/Telegram/SourceFiles/media/player/media_player_cover.cpp +++ b/Telegram/SourceFiles/media/player/media_player_cover.cpp @@ -73,6 +73,7 @@ void CoverWidget::PlayButton::paintEvent(QPaintEvent *e) { CoverWidget::CoverWidget(QWidget *parent) : TWidget(parent) , _nameLabel(this, st::mediaPlayerName) , _timeLabel(this, st::mediaPlayerTime) +, _close(this, st::mediaPlayerPanelClose) , _playback(new Ui::MediaSlider(this, st::mediaPlayerPanelPlayback)) , _playPause(this) , _volumeToggle(this, st::mediaPlayerVolumeToggle) @@ -82,6 +83,11 @@ CoverWidget::CoverWidget(QWidget *parent) : TWidget(parent) setAttribute(Qt::WA_OpaquePaintEvent); resize(width(), st::mediaPlayerCoverHeight); + _close->hide(); + _nameLabel->setAttribute(Qt::WA_TransparentForMouseEvents); + _timeLabel->setAttribute(Qt::WA_TransparentForMouseEvents); + setMouseTracking(true); + _playback->setChangeProgressCallback([this](float64 value) { handleSeekProgress(value); }); @@ -128,10 +134,14 @@ CoverWidget::CoverWidget(QWidget *parent) : TWidget(parent) } } -void CoverWidget::setPinCallback(PinCallback &&callback) { +void CoverWidget::setPinCallback(ButtonCallback &&callback) { _pinPlayer->setClickedCallback(std_::move(callback)); } +void CoverWidget::setCloseCallback(ButtonCallback &&callback) { + _close->setClickedCallback(std_::move(callback)); +} + void CoverWidget::handleSeekProgress(float64 progress) { if (!_lastDurationMs) return; @@ -167,6 +177,7 @@ void CoverWidget::resizeEvent(QResizeEvent *e) { widthForName -= _timeLabel->width() + 2 * st::normalFont->spacew; _nameLabel->resizeToWidth(widthForName); updateLabelPositions(); + _close->moveToRight(0, 0); int skip = (st::mediaPlayerPanelPlayback.seekSize.width() / 2); int length = (width() - 2 * st::mediaPlayerPanelPadding + st::mediaPlayerPanelPlayback.seekSize.width()); @@ -187,6 +198,25 @@ void CoverWidget::paintEvent(QPaintEvent *e) { p.fillRect(e->rect(), st::windowBg); } +void CoverWidget::mouseMoveEvent(QMouseEvent *e) { + auto closeAreaLeft = st::mediaPlayerPanelPadding + _nameLabel->width(); + auto closeAreaHeight = _nameLabel->y() + _nameLabel->height(); + auto closeArea = myrtlrect(closeAreaLeft, 0, width() - closeAreaLeft, closeAreaHeight); + auto closeVisible = closeArea.contains(e->pos()); + setCloseVisible(closeVisible); +} + +void CoverWidget::leaveEvent(QEvent *e) { + setCloseVisible(false); +} + +void CoverWidget::setCloseVisible(bool visible) { + if (visible == _close->isHidden()) { + _close->setVisible(visible); + _timeLabel->setVisible(!visible); + } +} + void CoverWidget::updatePlayPrevNextPositions() { auto left = st::mediaPlayerPanelPlayLeft; auto top = st::mediaPlayerPanelPlayTop; diff --git a/Telegram/SourceFiles/media/player/media_player_cover.h b/Telegram/SourceFiles/media/player/media_player_cover.h index 9275b33f79..bb1aa00548 100644 --- a/Telegram/SourceFiles/media/player/media_player_cover.h +++ b/Telegram/SourceFiles/media/player/media_player_cover.h @@ -42,14 +42,18 @@ class CoverWidget : public TWidget, private base::Subscriber { public: CoverWidget(QWidget *parent); - using PinCallback = base::lambda_unique; - void setPinCallback(PinCallback &&callback); + using ButtonCallback = base::lambda_unique; + void setPinCallback(ButtonCallback &&callback); + void setCloseCallback(ButtonCallback &&callback); protected: void resizeEvent(QResizeEvent *e) override; void paintEvent(QPaintEvent *e) override; + void mouseMoveEvent(QMouseEvent *e) override; + void leaveEvent(QEvent *e) override; private: + void setCloseVisible(bool visible); void handleSeekProgress(float64 progress); void handleSeekFinished(float64 progress); @@ -75,6 +79,7 @@ private: class PlayButton; ChildWidget _nameLabel; ChildWidget _timeLabel; + ChildWidget _close; ChildWidget _playback; ChildWidget _previousTrack = { nullptr }; ChildWidget _playPause; diff --git a/Telegram/SourceFiles/media/player/media_player_panel.cpp b/Telegram/SourceFiles/media/player/media_player_panel.cpp index 77cda54d4a..19bd4fc44f 100644 --- a/Telegram/SourceFiles/media/player/media_player_panel.cpp +++ b/Telegram/SourceFiles/media/player/media_player_panel.cpp @@ -221,6 +221,7 @@ void Panel::ensureCreated() { if (_layout == Layout::Full) { _cover.create(this); setPinCallback(std_::move(_pinCallback)); + setCloseCallback(std_::move(_closeCallback)); _scrollShadow.create(this, st::mediaPlayerScrollShadow); } @@ -254,10 +255,17 @@ void Panel::performDestroy() { } } -void Panel::setPinCallback(PinCallback &&callback) { +void Panel::setPinCallback(ButtonCallback &&callback) { _pinCallback = std_::move(callback); if (_cover) { - _cover->setPinCallback(PinCallback(_pinCallback)); + _cover->setPinCallback(ButtonCallback(_pinCallback)); + } +} + +void Panel::setCloseCallback(ButtonCallback &&callback) { + _closeCallback = std_::move(callback); + if (_cover) { + _cover->setCloseCallback(ButtonCallback(_closeCallback)); } } diff --git a/Telegram/SourceFiles/media/player/media_player_panel.h b/Telegram/SourceFiles/media/player/media_player_panel.h index b35d8d7a8e..aa87c59819 100644 --- a/Telegram/SourceFiles/media/player/media_player_panel.h +++ b/Telegram/SourceFiles/media/player/media_player_panel.h @@ -51,8 +51,9 @@ public: void showFromOther(); void hideFromOther(); - using PinCallback = base::lambda_wrap; - void setPinCallback(PinCallback &&callback); + using ButtonCallback = base::lambda_wrap; + void setPinCallback(ButtonCallback &&callback); + void setCloseCallback(ButtonCallback &&callback); void ui_repaintHistoryItem(const HistoryItem *item); @@ -107,7 +108,7 @@ private: QTimer _hideTimer, _showTimer; Ui::RectShadow _shadow; - PinCallback _pinCallback; + ButtonCallback _pinCallback, _closeCallback; ChildWidget _cover = { nullptr }; ChildWidget _scroll; ChildWidget _scrollShadow = { nullptr }; diff --git a/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp b/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp index 3a87d6ec3a..b9c8e24ea7 100644 --- a/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp +++ b/Telegram/SourceFiles/platform/win/notifications_manager_win.cpp @@ -537,10 +537,10 @@ void Manager::onAfterNotificationActivated(PeerId peerId, MsgId msgId) { namespace { -bool QuiteHoursEnabled = false; -DWORD QuiteHoursValue = 0; +bool QuietHoursEnabled = false; +DWORD QuietHoursValue = 0; -void queryQuiteHours() { +void queryQuietHours() { LPTSTR lpKeyName = L"Software\\Microsoft\\Windows\\CurrentVersion\\Notifications\\Settings"; LPTSTR lpValueName = L"NOC_GLOBAL_SETTING_TOASTS_ENABLED"; HKEY key; @@ -553,14 +553,14 @@ void queryQuiteHours() { result = RegQueryValueEx(key, lpValueName, 0, &type, (LPBYTE)&value, &size); RegCloseKey(key); - auto quiteHoursEnabled = (result == ERROR_SUCCESS); - if (QuiteHoursEnabled != quiteHoursEnabled) { - QuiteHoursEnabled = quiteHoursEnabled; - QuiteHoursValue = value; - LOG(("Quite hours changed, entry value: %1").arg(value)); - } else if (QuiteHoursValue != value) { - QuiteHoursValue = value; - LOG(("Quite hours value changed, was value: %1, entry value: %2").arg(QuiteHoursValue).arg(value)); + auto quietHoursEnabled = (result == ERROR_SUCCESS); + if (QuietHoursEnabled != quietHoursEnabled) { + QuietHoursEnabled = quietHoursEnabled; + QuietHoursValue = value; + LOG(("Quiet hours changed, entry value: %1").arg(value)); + } else if (QuietHoursValue != value) { + QuietHoursValue = value; + LOG(("Quiet hours value changed, was value: %1, entry value: %2").arg(QuietHoursValue).arg(value)); } } @@ -584,7 +584,7 @@ void querySystemNotificationSettings() { return; } LastSettingsQueryMs = ms; - queryQuiteHours(); + queryQuietHours(); queryUserNotificationState(); } @@ -596,7 +596,7 @@ bool skipAudio() { if (UserNotificationState == QUNS_NOT_PRESENT || UserNotificationState == QUNS_PRESENTATION_MODE) { return true; } - if (QuiteHoursEnabled) { + if (QuietHoursEnabled) { return true; } if (EventFilter::getInstance()->sessionLoggedOff()) { @@ -611,7 +611,7 @@ bool skipToast() { if (UserNotificationState == QUNS_PRESENTATION_MODE || UserNotificationState == QUNS_RUNNING_D3D_FULL_SCREEN/* || UserNotificationState == QUNS_BUSY*/) { return true; } - if (QuiteHoursEnabled) { + if (QuietHoursEnabled) { return true; } return false; diff --git a/Telegram/SourceFiles/ui/widgets/continuous_slider.cpp b/Telegram/SourceFiles/ui/widgets/continuous_slider.cpp index dbd31bef2c..1a3c6082c8 100644 --- a/Telegram/SourceFiles/ui/widgets/continuous_slider.cpp +++ b/Telegram/SourceFiles/ui/widgets/continuous_slider.cpp @@ -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(); _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 diff --git a/Telegram/SourceFiles/ui/widgets/continuous_slider.h b/Telegram/SourceFiles/ui/widgets/continuous_slider.h index cef44679c1..54b8f1f9af 100644 --- a/Telegram/SourceFiles/ui/widgets/continuous_slider.h +++ b/Telegram/SourceFiles/ui/widgets/continuous_slider.h @@ -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 _byWheelFinished; Callback _changeProgressCallback; diff --git a/Telegram/build/version b/Telegram/build/version index 68b0658d79..b4046780a2 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -1,6 +1,6 @@ -AppVersion 10014 +AppVersion 10015 AppVersionStrMajor 0.10 -AppVersionStrSmall 0.10.14 -AppVersionStr 0.10.14 +AppVersionStrSmall 0.10.15 +AppVersionStr 0.10.15 AlphaChannel 1 BetaVersion 0