mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-28 09:32:56 +00:00
Creating MediaView after the main window. That way the main window is
created with the right size even with FullScreen flag for MediaView. Using FullScreen flag only on Windows (or Dock auto hides on OS X).
This commit is contained in:
parent
cbde6e1ee9
commit
8fc38d9ac2
@ -455,7 +455,7 @@ void MainWindow::firstShow() {
|
||||
#else
|
||||
trayIconMenu = new QMenu(this);
|
||||
#endif
|
||||
QString notificationItem = lang(cDesktopNotify()
|
||||
auto notificationItem = lang(cDesktopNotify()
|
||||
? lng_disable_notifications_from_tray : lng_enable_notifications_from_tray);
|
||||
|
||||
if (cPlatform() == dbipWindows || cPlatform() == dbipMac || cPlatform() == dbipMacOld) {
|
||||
@ -469,9 +469,10 @@ void MainWindow::firstShow() {
|
||||
trayIconMenu->addAction(lang(lng_quit_from_tray), this, SLOT(quitFromTray()))->setEnabled(true);
|
||||
}
|
||||
psUpdateWorkmode();
|
||||
|
||||
psFirstShow();
|
||||
updateTrayMenu();
|
||||
|
||||
_mediaView = new MediaView();
|
||||
}
|
||||
|
||||
QWidget *MainWindow::filedialogParent() {
|
||||
@ -667,8 +668,6 @@ void MainWindow::setupMain(bool anim, const MTPUser *self) {
|
||||
fixOrder();
|
||||
|
||||
updateTitleStatus();
|
||||
|
||||
_mediaView = new MediaView();
|
||||
}
|
||||
|
||||
void MainWindow::updateUnreadCounter() {
|
||||
|
@ -80,8 +80,7 @@ MediaView::MediaView() : TWidget(App::wnd())
|
||||
, _radial(animation(this, &MediaView::step_radial))
|
||||
, _lastAction(-st::mvDeltaFromLastAction, -st::mvDeltaFromLastAction)
|
||||
, _a_state(animation(this, &MediaView::step_state))
|
||||
, _dropdown(this, st::mvDropdown)
|
||||
, _saveMsgOpacity(0) {
|
||||
, _dropdown(this, st::mvDropdown) {
|
||||
TextCustomTagsMap custom;
|
||||
custom.insert(QChar('c'), qMakePair(textcmdStartLink(1), textcmdStopLink()));
|
||||
_saveMsgText.setRichText(st::medviewSaveMsgFont, lang(lng_mediaview_saved), _textDlgOptions, custom);
|
||||
@ -100,7 +99,9 @@ MediaView::MediaView() : TWidget(App::wnd())
|
||||
|
||||
hide();
|
||||
createWinId();
|
||||
setWindowState(Qt::WindowFullScreen);
|
||||
if (cPlatform() == dbipWindows) {
|
||||
setWindowState(Qt::WindowFullScreen);
|
||||
}
|
||||
|
||||
_saveMsgUpdater.setSingleShot(true);
|
||||
connect(&_saveMsgUpdater, SIGNAL(timeout()), this, SLOT(updateImage()));
|
||||
|
@ -258,7 +258,7 @@ private:
|
||||
|
||||
QString _saveMsgFilename;
|
||||
uint64 _saveMsgStarted = 0;
|
||||
anim::fvalue _saveMsgOpacity;
|
||||
anim::fvalue _saveMsgOpacity = { 0 };
|
||||
QRect _saveMsg;
|
||||
QTimer _saveMsgUpdater;
|
||||
Text _saveMsgText;
|
||||
|
Loading…
Reference in New Issue
Block a user