mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 16:15:13 +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:
@@ -455,7 +455,7 @@ void MainWindow::firstShow() {
|
|||||||
#else
|
#else
|
||||||
trayIconMenu = new QMenu(this);
|
trayIconMenu = new QMenu(this);
|
||||||
#endif
|
#endif
|
||||||
QString notificationItem = lang(cDesktopNotify()
|
auto notificationItem = lang(cDesktopNotify()
|
||||||
? lng_disable_notifications_from_tray : lng_enable_notifications_from_tray);
|
? lng_disable_notifications_from_tray : lng_enable_notifications_from_tray);
|
||||||
|
|
||||||
if (cPlatform() == dbipWindows || cPlatform() == dbipMac || cPlatform() == dbipMacOld) {
|
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);
|
trayIconMenu->addAction(lang(lng_quit_from_tray), this, SLOT(quitFromTray()))->setEnabled(true);
|
||||||
}
|
}
|
||||||
psUpdateWorkmode();
|
psUpdateWorkmode();
|
||||||
|
|
||||||
psFirstShow();
|
psFirstShow();
|
||||||
updateTrayMenu();
|
updateTrayMenu();
|
||||||
|
|
||||||
|
_mediaView = new MediaView();
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *MainWindow::filedialogParent() {
|
QWidget *MainWindow::filedialogParent() {
|
||||||
@@ -667,8 +668,6 @@ void MainWindow::setupMain(bool anim, const MTPUser *self) {
|
|||||||
fixOrder();
|
fixOrder();
|
||||||
|
|
||||||
updateTitleStatus();
|
updateTitleStatus();
|
||||||
|
|
||||||
_mediaView = new MediaView();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateUnreadCounter() {
|
void MainWindow::updateUnreadCounter() {
|
||||||
|
@@ -80,8 +80,7 @@ MediaView::MediaView() : TWidget(App::wnd())
|
|||||||
, _radial(animation(this, &MediaView::step_radial))
|
, _radial(animation(this, &MediaView::step_radial))
|
||||||
, _lastAction(-st::mvDeltaFromLastAction, -st::mvDeltaFromLastAction)
|
, _lastAction(-st::mvDeltaFromLastAction, -st::mvDeltaFromLastAction)
|
||||||
, _a_state(animation(this, &MediaView::step_state))
|
, _a_state(animation(this, &MediaView::step_state))
|
||||||
, _dropdown(this, st::mvDropdown)
|
, _dropdown(this, st::mvDropdown) {
|
||||||
, _saveMsgOpacity(0) {
|
|
||||||
TextCustomTagsMap custom;
|
TextCustomTagsMap custom;
|
||||||
custom.insert(QChar('c'), qMakePair(textcmdStartLink(1), textcmdStopLink()));
|
custom.insert(QChar('c'), qMakePair(textcmdStartLink(1), textcmdStopLink()));
|
||||||
_saveMsgText.setRichText(st::medviewSaveMsgFont, lang(lng_mediaview_saved), _textDlgOptions, custom);
|
_saveMsgText.setRichText(st::medviewSaveMsgFont, lang(lng_mediaview_saved), _textDlgOptions, custom);
|
||||||
@@ -100,7 +99,9 @@ MediaView::MediaView() : TWidget(App::wnd())
|
|||||||
|
|
||||||
hide();
|
hide();
|
||||||
createWinId();
|
createWinId();
|
||||||
|
if (cPlatform() == dbipWindows) {
|
||||||
setWindowState(Qt::WindowFullScreen);
|
setWindowState(Qt::WindowFullScreen);
|
||||||
|
}
|
||||||
|
|
||||||
_saveMsgUpdater.setSingleShot(true);
|
_saveMsgUpdater.setSingleShot(true);
|
||||||
connect(&_saveMsgUpdater, SIGNAL(timeout()), this, SLOT(updateImage()));
|
connect(&_saveMsgUpdater, SIGNAL(timeout()), this, SLOT(updateImage()));
|
||||||
|
@@ -258,7 +258,7 @@ private:
|
|||||||
|
|
||||||
QString _saveMsgFilename;
|
QString _saveMsgFilename;
|
||||||
uint64 _saveMsgStarted = 0;
|
uint64 _saveMsgStarted = 0;
|
||||||
anim::fvalue _saveMsgOpacity;
|
anim::fvalue _saveMsgOpacity = { 0 };
|
||||||
QRect _saveMsg;
|
QRect _saveMsg;
|
||||||
QTimer _saveMsgUpdater;
|
QTimer _saveMsgUpdater;
|
||||||
Text _saveMsgText;
|
Text _saveMsgText;
|
||||||
|
Reference in New Issue
Block a user