2014-08-06 14:40:21 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2014-12-01 10:47:38 +00:00
|
|
|
the official desktop version of Telegram messaging app, see https://telegram.org
|
2014-08-06 14:40:21 +00:00
|
|
|
|
|
|
|
Telegram Desktop is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
It is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
2015-10-03 13:16:42 +00:00
|
|
|
In addition, as a special exception, the copyright holders give permission
|
|
|
|
to link the code of portions of this program with the OpenSSL library.
|
|
|
|
|
2014-08-06 14:40:21 +00:00
|
|
|
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
2017-01-11 18:31:31 +00:00
|
|
|
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
2014-08-06 14:40:21 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2016-10-26 16:43:13 +00:00
|
|
|
#include "ui/widgets/dropdown_menu.h"
|
2016-09-28 10:15:03 +00:00
|
|
|
#include "ui/effects/radial_animation.h"
|
2015-04-11 10:04:10 +00:00
|
|
|
|
2016-07-11 18:05:46 +00:00
|
|
|
namespace Media {
|
2017-01-24 21:24:39 +00:00
|
|
|
namespace Player {
|
|
|
|
struct TrackState;
|
|
|
|
} // namespace Player
|
2016-07-11 18:05:46 +00:00
|
|
|
namespace Clip {
|
|
|
|
class Controller;
|
|
|
|
} // namespace Clip
|
|
|
|
} // namespace Media
|
|
|
|
|
2016-10-26 16:43:13 +00:00
|
|
|
namespace Ui {
|
2016-10-01 12:34:23 +00:00
|
|
|
class PopupMenu;
|
2016-11-11 13:46:04 +00:00
|
|
|
class LinkButton;
|
2016-12-23 13:21:01 +00:00
|
|
|
class RoundButton;
|
2016-10-26 16:43:13 +00:00
|
|
|
} // namespace Ui
|
2016-10-01 12:34:23 +00:00
|
|
|
|
2016-12-23 13:21:01 +00:00
|
|
|
namespace Window {
|
|
|
|
namespace Theme {
|
|
|
|
struct Preview;
|
|
|
|
} // namespace Theme
|
|
|
|
} // namespace Window
|
|
|
|
|
2017-01-01 16:45:20 +00:00
|
|
|
namespace Notify {
|
|
|
|
struct PeerUpdate;
|
|
|
|
} // namespace Notify
|
|
|
|
|
2016-10-02 13:54:27 +00:00
|
|
|
class MediaView : public TWidget, private base::Subscriber, public RPCSender, public ClickHandlerHost {
|
2014-08-06 14:40:21 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2016-12-31 15:19:22 +00:00
|
|
|
MediaView(QWidget*);
|
2014-08-06 14:40:21 +00:00
|
|
|
|
2016-07-24 08:53:09 +00:00
|
|
|
void setVisible(bool visible) override;
|
2014-08-15 11:19:32 +00:00
|
|
|
|
2015-04-19 19:01:45 +00:00
|
|
|
void updateOver(QPoint mpos);
|
2014-08-11 09:03:45 +00:00
|
|
|
|
|
|
|
void showPhoto(PhotoData *photo, HistoryItem *context);
|
|
|
|
void showPhoto(PhotoData *photo, PeerData *context);
|
2015-04-11 10:04:10 +00:00
|
|
|
void showDocument(DocumentData *doc, HistoryItem *context);
|
2014-08-06 14:40:21 +00:00
|
|
|
void moveToScreen();
|
2016-05-20 16:01:06 +00:00
|
|
|
bool moveToNext(int32 delta);
|
2015-04-11 10:04:10 +00:00
|
|
|
void preloadData(int32 delta);
|
|
|
|
|
2016-06-17 18:18:01 +00:00
|
|
|
void leaveToChildEvent(QEvent *e, QWidget *child) override { // e -- from enterEvent() of child TWidget
|
2015-04-11 10:04:10 +00:00
|
|
|
updateOverState(OverNone);
|
|
|
|
}
|
2016-06-17 18:18:01 +00:00
|
|
|
void enterFromChildEvent(QEvent *e, QWidget *child) override { // e -- from leaveEvent() of child TWidget
|
2015-04-11 10:04:10 +00:00
|
|
|
updateOver(mapFromGlobal(QCursor::pos()));
|
|
|
|
}
|
2014-08-11 09:03:45 +00:00
|
|
|
|
2017-01-01 16:45:20 +00:00
|
|
|
void mediaOverviewUpdated(const Notify::PeerUpdate &update);
|
2015-04-19 10:29:19 +00:00
|
|
|
void documentUpdated(DocumentData *doc);
|
2014-08-11 09:03:45 +00:00
|
|
|
void changingMsgId(HistoryItem *row, MsgId newId);
|
|
|
|
|
2015-04-11 10:04:10 +00:00
|
|
|
void close();
|
|
|
|
|
|
|
|
void activateControls();
|
2015-04-19 10:29:19 +00:00
|
|
|
void onDocClick();
|
2014-10-17 12:57:14 +00:00
|
|
|
|
2016-06-24 10:37:29 +00:00
|
|
|
void clipCallback(Media::Clip::Notification notification);
|
2016-03-29 17:17:00 +00:00
|
|
|
PeerData *ui_getPeerForMouseAction();
|
2015-12-22 08:01:02 +00:00
|
|
|
|
2016-06-26 15:37:47 +00:00
|
|
|
void clearData();
|
|
|
|
|
2014-08-11 09:03:45 +00:00
|
|
|
~MediaView();
|
|
|
|
|
2016-03-29 17:17:00 +00:00
|
|
|
// ClickHandlerHost interface
|
|
|
|
void clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) override;
|
|
|
|
void clickHandlerPressedChanged(const ClickHandlerPtr &p, bool pressed) override;
|
|
|
|
|
2016-11-05 08:36:24 +00:00
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *e) override;
|
|
|
|
|
|
|
|
void keyPressEvent(QKeyEvent *e) override;
|
|
|
|
void wheelEvent(QWheelEvent *e) override;
|
|
|
|
void mousePressEvent(QMouseEvent *e) override;
|
|
|
|
void mouseDoubleClickEvent(QMouseEvent *e) override;
|
|
|
|
void mouseMoveEvent(QMouseEvent *e) override;
|
|
|
|
void mouseReleaseEvent(QMouseEvent *e) override;
|
|
|
|
void contextMenuEvent(QContextMenuEvent *e) override;
|
|
|
|
void touchEvent(QTouchEvent *e);
|
|
|
|
|
|
|
|
bool event(QEvent *e) override;
|
|
|
|
bool eventFilter(QObject *obj, QEvent *e) override;
|
|
|
|
|
2016-10-26 16:43:13 +00:00
|
|
|
private slots:
|
2015-04-11 10:04:10 +00:00
|
|
|
void onHideControls(bool force = false);
|
|
|
|
|
2016-06-22 13:39:54 +00:00
|
|
|
void onScreenResized(int screen);
|
|
|
|
|
2015-04-11 10:04:10 +00:00
|
|
|
void onToMessage();
|
2015-04-19 10:29:19 +00:00
|
|
|
void onSaveAs();
|
2014-10-17 12:57:14 +00:00
|
|
|
void onDownload();
|
2015-04-19 10:29:19 +00:00
|
|
|
void onSaveCancel();
|
2014-10-07 17:57:57 +00:00
|
|
|
void onShowInFolder();
|
2014-08-11 09:03:45 +00:00
|
|
|
void onForward();
|
|
|
|
void onDelete();
|
2014-10-17 12:57:14 +00:00
|
|
|
void onOverview();
|
2014-08-11 09:03:45 +00:00
|
|
|
void onCopy();
|
|
|
|
void onMenuDestroy(QObject *obj);
|
|
|
|
void receiveMouse();
|
|
|
|
|
2015-04-11 10:04:10 +00:00
|
|
|
void onDropdown();
|
|
|
|
|
2014-08-11 09:03:45 +00:00
|
|
|
void onCheckActive();
|
|
|
|
void onTouchTimer();
|
2014-08-06 14:40:21 +00:00
|
|
|
|
2014-09-30 14:11:09 +00:00
|
|
|
void updateImage();
|
|
|
|
|
2016-07-13 11:24:31 +00:00
|
|
|
void onVideoPauseResume();
|
2016-12-01 19:20:33 +00:00
|
|
|
void onVideoSeekProgress(TimeMs positionMs);
|
|
|
|
void onVideoSeekFinished(TimeMs positionMs);
|
2016-07-11 18:05:46 +00:00
|
|
|
void onVideoVolumeChanged(float64 volume);
|
2016-07-14 11:20:46 +00:00
|
|
|
void onVideoToggleFullScreen();
|
2016-07-12 11:38:16 +00:00
|
|
|
void onVideoPlayProgress(const AudioMsgId &audioId);
|
2016-07-11 18:05:46 +00:00
|
|
|
|
2014-08-06 14:40:21 +00:00
|
|
|
private:
|
2016-12-23 13:21:01 +00:00
|
|
|
enum OverState {
|
|
|
|
OverNone,
|
|
|
|
OverLeftNav,
|
|
|
|
OverRightNav,
|
|
|
|
OverClose,
|
|
|
|
OverHeader,
|
|
|
|
OverName,
|
|
|
|
OverDate,
|
|
|
|
OverSave,
|
|
|
|
OverMore,
|
|
|
|
OverIcon,
|
|
|
|
OverVideo,
|
|
|
|
};
|
|
|
|
|
2016-11-16 10:44:06 +00:00
|
|
|
void showSaveMsgFile();
|
|
|
|
|
2016-11-05 08:36:24 +00:00
|
|
|
void dropdownHidden();
|
2016-10-26 16:43:13 +00:00
|
|
|
void updateDocSize();
|
|
|
|
void updateControls();
|
|
|
|
void updateActions();
|
|
|
|
|
2015-05-20 19:28:24 +00:00
|
|
|
void displayPhoto(PhotoData *photo, HistoryItem *item);
|
2015-04-11 10:04:10 +00:00
|
|
|
void displayDocument(DocumentData *doc, HistoryItem *item);
|
2016-10-19 13:31:18 +00:00
|
|
|
void displayFinished();
|
2015-04-11 10:04:10 +00:00
|
|
|
void findCurrent();
|
|
|
|
void loadBack();
|
2014-08-11 09:03:45 +00:00
|
|
|
|
2016-10-22 18:58:25 +00:00
|
|
|
void generateTransparentBrush();
|
|
|
|
|
2016-07-24 08:53:09 +00:00
|
|
|
void updateCursor();
|
2016-07-14 11:20:46 +00:00
|
|
|
void setZoomLevel(int newZoom);
|
|
|
|
|
2017-01-24 21:24:39 +00:00
|
|
|
void updateVideoPlaybackState(const Media::Player::TrackState &state);
|
2016-07-12 12:28:07 +00:00
|
|
|
void updateSilentVideoPlaybackState();
|
2016-12-01 19:20:33 +00:00
|
|
|
void restartVideoAtSeekPosition(TimeMs positionMs);
|
2016-07-12 12:28:07 +00:00
|
|
|
|
2016-07-11 18:05:46 +00:00
|
|
|
void createClipController();
|
|
|
|
void setClipControllerGeometry();
|
|
|
|
|
|
|
|
void initAnimation();
|
|
|
|
void createClipReader();
|
|
|
|
|
2016-12-23 13:21:01 +00:00
|
|
|
void initThemePreview();
|
|
|
|
void destroyThemePreview();
|
|
|
|
void updateThemePreviewGeometry();
|
|
|
|
|
2016-06-21 18:09:48 +00:00
|
|
|
// Radial animation interface.
|
|
|
|
float64 radialProgress() const;
|
|
|
|
bool radialLoading() const;
|
|
|
|
QRect radialRect() const;
|
|
|
|
void radialStart();
|
2016-12-01 19:20:33 +00:00
|
|
|
TimeMs radialTimeShift() const;
|
2016-06-21 18:09:48 +00:00
|
|
|
|
2016-05-20 16:01:06 +00:00
|
|
|
// Computes the last OverviewChatPhotos PhotoData* from _history or _migrated.
|
|
|
|
struct LastChatPhoto {
|
|
|
|
HistoryItem *item;
|
|
|
|
PhotoData *photo;
|
|
|
|
};
|
|
|
|
LastChatPhoto computeLastOverviewChatPhoto();
|
|
|
|
void computeAdditionalChatPhoto(PeerData *peer, PhotoData *lastOverviewPhoto);
|
|
|
|
|
2014-08-11 09:03:45 +00:00
|
|
|
void userPhotosLoaded(UserData *u, const MTPphotos_Photos &photos, mtpRequestId req);
|
2016-02-26 09:29:07 +00:00
|
|
|
|
|
|
|
void deletePhotosDone(const MTPVector<MTPlong> &result);
|
|
|
|
bool deletePhotosFail(const RPCError &error);
|
2014-08-11 09:03:45 +00:00
|
|
|
|
|
|
|
void updateHeader();
|
2014-10-07 17:57:57 +00:00
|
|
|
void snapXY();
|
2014-08-11 09:03:45 +00:00
|
|
|
|
2016-12-01 19:20:33 +00:00
|
|
|
void step_state(TimeMs ms, bool timer);
|
|
|
|
void step_radial(TimeMs ms, bool timer);
|
2015-12-24 19:26:28 +00:00
|
|
|
|
2016-08-18 15:35:39 +00:00
|
|
|
void zoomIn();
|
|
|
|
void zoomOut();
|
|
|
|
void zoomReset();
|
|
|
|
void zoomUpdate(int32 &newZoom);
|
|
|
|
|
2016-07-19 10:54:43 +00:00
|
|
|
void paintDocRadialLoading(Painter &p, bool radial, float64 radialOpacity);
|
2016-12-23 13:21:01 +00:00
|
|
|
void paintThemePreview(Painter &p, QRect clip);
|
|
|
|
|
|
|
|
void updateOverRect(OverState state);
|
|
|
|
bool updateOverState(OverState newState);
|
|
|
|
float64 overLevel(OverState control) const;
|
2016-07-19 10:54:43 +00:00
|
|
|
|
2014-12-15 15:55:45 +00:00
|
|
|
QBrush _transparentBrush;
|
|
|
|
|
2016-05-20 16:01:06 +00:00
|
|
|
PhotoData *_photo = nullptr;
|
|
|
|
DocumentData *_doc = nullptr;
|
|
|
|
MediaOverviewType _overview = OverviewCount;
|
2015-04-19 19:01:45 +00:00
|
|
|
QRect _closeNav, _closeNavIcon;
|
|
|
|
QRect _leftNav, _leftNavIcon, _rightNav, _rightNavIcon;
|
|
|
|
QRect _headerNav, _nameNav, _dateNav;
|
|
|
|
QRect _saveNav, _saveNavIcon, _moreNav, _moreNavIcon;
|
2016-05-20 16:01:06 +00:00
|
|
|
bool _leftNavVisible = false;
|
|
|
|
bool _rightNavVisible = false;
|
|
|
|
bool _saveVisible = false;
|
|
|
|
bool _headerHasLink = false;
|
2014-08-11 09:03:45 +00:00
|
|
|
QString _dateText;
|
2015-04-11 10:04:10 +00:00
|
|
|
QString _headerText;
|
2014-08-06 14:40:21 +00:00
|
|
|
|
2016-12-13 17:07:56 +00:00
|
|
|
object_ptr<Media::Clip::Controller> _clipController = { nullptr };
|
2016-07-13 11:24:31 +00:00
|
|
|
DocumentData *_autoplayVideoDocument = nullptr;
|
2016-07-14 11:20:46 +00:00
|
|
|
bool _fullScreenVideo = false;
|
|
|
|
int _fullScreenZoomCache = 0;
|
2016-07-11 18:05:46 +00:00
|
|
|
|
2015-05-20 19:28:24 +00:00
|
|
|
Text _caption;
|
|
|
|
QRect _captionRect;
|
|
|
|
|
2016-12-01 19:20:33 +00:00
|
|
|
TimeMs _animStarted;
|
2014-09-30 14:11:09 +00:00
|
|
|
|
2016-05-20 16:01:06 +00:00
|
|
|
int _width = 0;
|
|
|
|
int _x = 0, _y = 0, _w = 0, _h = 0;
|
|
|
|
int _xStart = 0, _yStart = 0;
|
|
|
|
int _zoom = 0; // < 0 - out, 0 - none, > 0 - in
|
|
|
|
float64 _zoomToScreen = 0.; // for documents
|
2014-10-07 17:57:57 +00:00
|
|
|
QPoint _mStart;
|
2016-05-20 16:01:06 +00:00
|
|
|
bool _pressed = false;
|
|
|
|
int32 _dragging = 0;
|
2014-08-11 09:03:45 +00:00
|
|
|
QPixmap _current;
|
2016-07-11 18:05:46 +00:00
|
|
|
std_::unique_ptr<Media::Clip::Reader> _gif;
|
2016-05-20 16:01:06 +00:00
|
|
|
int32 _full = -1; // -1 - thumb, 0 - medium, 1 - full
|
2014-08-11 09:03:45 +00:00
|
|
|
|
2016-07-12 12:28:07 +00:00
|
|
|
// Video without audio stream playback information.
|
|
|
|
bool _videoIsSilent = false;
|
|
|
|
bool _videoPaused = false;
|
2016-07-14 11:20:46 +00:00
|
|
|
bool _videoStopped = false;
|
2016-12-01 19:20:33 +00:00
|
|
|
TimeMs _videoPositionMs = 0;
|
|
|
|
TimeMs _videoDurationMs = 0;
|
2016-07-12 12:28:07 +00:00
|
|
|
int32 _videoFrequencyMs = 1000; // 1000 ms per second.
|
|
|
|
|
2015-12-22 08:01:02 +00:00
|
|
|
bool fileShown() const;
|
|
|
|
bool gifShown() const;
|
2016-12-23 13:21:01 +00:00
|
|
|
bool fileBubbleShown() const;
|
2015-12-23 19:23:14 +00:00
|
|
|
void stopGif();
|
2015-12-22 08:01:02 +00:00
|
|
|
|
2016-09-30 16:40:00 +00:00
|
|
|
const style::icon *_docIcon = nullptr;
|
2016-12-23 13:21:01 +00:00
|
|
|
style::color _docIconColor;
|
2015-04-19 10:29:19 +00:00
|
|
|
QString _docName, _docSize, _docExt;
|
2016-05-20 16:01:06 +00:00
|
|
|
int _docNameWidth = 0, _docSizeWidth = 0, _docExtWidth = 0;
|
2015-04-19 10:29:19 +00:00
|
|
|
QRect _docRect, _docIconRect;
|
2016-05-20 16:01:06 +00:00
|
|
|
int _docThumbx = 0, _docThumby = 0, _docThumbw = 0;
|
2016-12-13 17:07:56 +00:00
|
|
|
object_ptr<Ui::LinkButton> _docDownload;
|
|
|
|
object_ptr<Ui::LinkButton> _docSaveAs;
|
|
|
|
object_ptr<Ui::LinkButton> _docCancel;
|
2015-04-11 10:04:10 +00:00
|
|
|
|
2016-06-21 18:09:48 +00:00
|
|
|
QRect _photoRadialRect;
|
2016-09-28 10:15:03 +00:00
|
|
|
Ui::RadialAnimation _radial;
|
2016-06-21 18:09:48 +00:00
|
|
|
|
2016-05-20 16:01:06 +00:00
|
|
|
History *_migrated = nullptr;
|
|
|
|
History *_history = nullptr; // if conversation photos or files overview
|
|
|
|
PeerData *_peer = nullptr;
|
|
|
|
UserData *_user = nullptr; // if user profile photos overview
|
|
|
|
|
|
|
|
// There can be additional first photo in chat photos overview, that is not
|
|
|
|
// in the _history->overview[OverviewChatPhotos] (if the item was deleted).
|
|
|
|
PhotoData *_additionalChatPhoto = nullptr;
|
2016-03-29 17:17:00 +00:00
|
|
|
|
2016-06-22 13:39:54 +00:00
|
|
|
// We save the information about the reason of the current mediaview show:
|
|
|
|
// did we open a peer profile photo or a photo from some message.
|
|
|
|
// We use it when trying to delete a photo: if we've opened a peer photo,
|
|
|
|
// then we'll delete group photo instead of the corresponding message.
|
|
|
|
bool _firstOpenedPeerPhoto = false;
|
|
|
|
|
2016-05-20 16:01:06 +00:00
|
|
|
PeerData *_from = nullptr;
|
2014-10-17 12:57:14 +00:00
|
|
|
Text _fromName;
|
2014-08-11 09:03:45 +00:00
|
|
|
|
2016-05-20 16:01:06 +00:00
|
|
|
int _index = -1; // index in photos or files array, -1 if just photo
|
|
|
|
MsgId _msgid = 0; // msgId of current photo or file
|
|
|
|
bool _msgmigrated = false; // msgId is from _migrated history
|
|
|
|
ChannelId _channel = NoChannel;
|
|
|
|
bool _canForward = false;
|
|
|
|
bool _canDelete = false;
|
2014-08-11 09:03:45 +00:00
|
|
|
|
2016-05-20 16:01:06 +00:00
|
|
|
mtpRequestId _loadRequest = 0;
|
2014-08-11 09:03:45 +00:00
|
|
|
|
2016-05-20 16:01:06 +00:00
|
|
|
OverState _over = OverNone;
|
|
|
|
OverState _down = OverNone;
|
2015-04-11 10:04:10 +00:00
|
|
|
QPoint _lastAction, _lastMouseMovePos;
|
2016-05-20 16:01:06 +00:00
|
|
|
bool _ignoringDropdown = false;
|
2015-04-11 10:04:10 +00:00
|
|
|
|
2016-12-07 13:32:25 +00:00
|
|
|
BasicAnimation _a_state;
|
2015-12-08 12:33:37 +00:00
|
|
|
|
2015-04-11 10:04:10 +00:00
|
|
|
enum ControlsState {
|
|
|
|
ControlsShowing,
|
|
|
|
ControlsShown,
|
|
|
|
ControlsHiding,
|
|
|
|
ControlsHidden,
|
|
|
|
};
|
2016-05-20 16:01:06 +00:00
|
|
|
ControlsState _controlsState = ControlsShown;
|
2016-12-01 19:20:33 +00:00
|
|
|
TimeMs _controlsAnimStarted = 0;
|
2015-04-11 10:04:10 +00:00
|
|
|
QTimer _controlsHideTimer;
|
2016-12-05 11:01:08 +00:00
|
|
|
anim::value a_cOpacity;
|
2016-07-12 14:11:59 +00:00
|
|
|
bool _mousePressed = false;
|
2014-08-11 09:03:45 +00:00
|
|
|
|
2016-10-26 16:43:13 +00:00
|
|
|
Ui::PopupMenu *_menu = nullptr;
|
2016-12-13 17:07:56 +00:00
|
|
|
object_ptr<Ui::DropdownMenu> _dropdown;
|
2016-12-31 15:19:22 +00:00
|
|
|
object_ptr<QTimer> _dropdownShowTimer;
|
2016-10-26 16:43:13 +00:00
|
|
|
|
|
|
|
struct ActionData {
|
|
|
|
QString text;
|
|
|
|
const char *member;
|
|
|
|
};
|
|
|
|
QList<ActionData> _actions;
|
2015-04-11 10:04:10 +00:00
|
|
|
|
2016-05-20 16:01:06 +00:00
|
|
|
bool _receiveMouse = true;
|
2014-08-11 09:03:45 +00:00
|
|
|
|
2016-05-20 16:01:06 +00:00
|
|
|
bool _touchPress = false, _touchMove = false, _touchRightButton = false;
|
2014-08-11 09:03:45 +00:00
|
|
|
QTimer _touchTimer;
|
|
|
|
QPoint _touchStart;
|
2014-12-17 17:55:32 +00:00
|
|
|
QPoint _accumScroll;
|
2014-08-11 09:03:45 +00:00
|
|
|
|
2014-10-17 12:57:14 +00:00
|
|
|
QString _saveMsgFilename;
|
2016-12-01 19:20:33 +00:00
|
|
|
TimeMs _saveMsgStarted = 0;
|
2016-12-05 11:01:08 +00:00
|
|
|
anim::value _saveMsgOpacity;
|
2014-10-17 12:57:14 +00:00
|
|
|
QRect _saveMsg;
|
|
|
|
QTimer _saveMsgUpdater;
|
|
|
|
Text _saveMsgText;
|
|
|
|
|
2016-12-01 19:20:33 +00:00
|
|
|
typedef QMap<OverState, TimeMs> Showing;
|
2014-08-11 09:03:45 +00:00
|
|
|
Showing _animations;
|
2016-12-05 11:01:08 +00:00
|
|
|
typedef QMap<OverState, anim::value> ShowingOpacities;
|
2014-08-11 09:03:45 +00:00
|
|
|
ShowingOpacities _animOpacities;
|
2014-08-06 14:40:21 +00:00
|
|
|
|
2016-09-14 16:05:40 +00:00
|
|
|
int _verticalWheelDelta = 0;
|
|
|
|
|
2016-12-23 13:21:01 +00:00
|
|
|
bool _themePreviewShown = false;
|
|
|
|
uint64 _themePreviewId = 0;
|
|
|
|
QRect _themePreviewRect;
|
|
|
|
std_::unique_ptr<Window::Theme::Preview> _themePreview;
|
|
|
|
object_ptr<Ui::RoundButton> _themeApply = { nullptr };
|
|
|
|
object_ptr<Ui::RoundButton> _themeCancel = { nullptr };
|
2014-10-17 12:57:14 +00:00
|
|
|
|
2014-08-06 14:40:21 +00:00
|
|
|
};
|