From 22d905b39c6d0f535748043c11c0da9b19c388a1 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 5 Apr 2017 12:21:38 +0300 Subject: [PATCH] Version 1.0.29: Add cloud icon to main menu. --- Telegram/Resources/colors.palette | 2 ++ Telegram/Resources/icons/menu_cloud.png | Bin 0 -> 302 bytes Telegram/Resources/icons/menu_cloud@2x.png | Bin 0 -> 558 bytes Telegram/Resources/langs/lang.strings | 2 +- Telegram/Resources/langs/lang_de.strings | 7 +++-- Telegram/Resources/langs/lang_es.strings | 7 +++-- Telegram/Resources/langs/lang_it.strings | 7 +++-- Telegram/Resources/langs/lang_ko.strings | 7 +++-- Telegram/Resources/langs/lang_nl.strings | 7 +++-- Telegram/Resources/langs/lang_pt_BR.strings | 7 +++-- Telegram/Resources/uwp/AppX/AppxManifest.xml | 2 +- Telegram/Resources/winrc/Telegram.rc | 8 +++--- Telegram/Resources/winrc/Updater.rc | 8 +++--- Telegram/SourceFiles/core/version.h | 6 ++--- Telegram/SourceFiles/messenger.cpp | 2 +- Telegram/SourceFiles/window/window.style | 10 +++++++ .../SourceFiles/window/window_main_menu.cpp | 25 +++++++++++++++--- .../SourceFiles/window/window_main_menu.h | 2 ++ Telegram/build/version | 8 +++--- changelog.txt | 5 ++++ 20 files changed, 77 insertions(+), 45 deletions(-) create mode 100644 Telegram/Resources/icons/menu_cloud.png create mode 100644 Telegram/Resources/icons/menu_cloud@2x.png diff --git a/Telegram/Resources/colors.palette b/Telegram/Resources/colors.palette index 6d34b8563..787617cba 100644 --- a/Telegram/Resources/colors.palette +++ b/Telegram/Resources/colors.palette @@ -462,6 +462,8 @@ changePhoneSimcardTo: notificationSampleNameFg; // change phone number box right mainMenuBg: windowBg; // main menu background mainMenuCoverBg: dialogsBgActive; // main menu top cover background mainMenuCoverFg: windowFgActive; // main menu top cover text +mainMenuCloudFg: activeButtonFg; +mainMenuCloudBg: #2785bf | activeButtonBgRipple; mediaPlayerBg: windowBg; // audio file player background mediaPlayerActiveFg: windowBgActive; // audio file player playback progress already played part diff --git a/Telegram/Resources/icons/menu_cloud.png b/Telegram/Resources/icons/menu_cloud.png new file mode 100644 index 0000000000000000000000000000000000000000..837fb507407b1b5fbec059928c899ab00f97cd82 GIT binary patch literal 302 zcmV+}0nz@6P)Nkl410CRI=bPvQmaJdB=0t-OX{XJKP0h>gi10v3WNP*CujX55)wcU*V0nHK^f zkOu-kxeyWP#I9#z9}Y6c$n!iBLQvoLGz zl~RX50EnXK0Z!9&80@+ZM1(65QQNlrrgkIKG>Paw*l`>m2Bnl=dvMNC*Y(@a9mf&2 zZGWFb&N+PFhf)gjJnx38s(Qw7S=6)o;P30*Zn?2KHclXp#Q*>R07*qoM6N<$f^`vs AO8@`> literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/menu_cloud@2x.png b/Telegram/Resources/icons/menu_cloud@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7ecd31190a4477a81a6095b427142b9623b47f11 GIT binary patch literal 558 zcmV+}0@3}6P)LSw&w{&2myKHd~O4tG(=@48tEAuWlg(yB zBuOIo`<)1aK!(F1snu$PrfJJam>t1j5cPT;k|g0-vMi&~Xdn~{nf{*7VeSLjY!=Jq z@+nN;YPCWplW`W9&*yPEolN7@&gV07xtue=Xfz5@6#tA<69fT~NW^|%x7)RhQ{yFlMLZsV3}hI_HJsXZyG0_AFb1|-Ew_CD z0G{XJ_xpbW?S7P4sa!5=K05`xK|7{tD<}wp zYao5$a9Epb!0~wO3dX48@uBEs^e9M1*3Mm-Q%4^zml)smwBEy!u@`tE*6Vux7%1O7LaAxR*<47*zflk3 + Version="1.0.29.0" /> Telegram Desktop Telegram Messenger LLP diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 70825d14a..e071add75 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 1,0,28,0 - PRODUCTVERSION 1,0,28,0 + FILEVERSION 1,0,29,0 + PRODUCTVERSION 1,0,29,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -52,10 +52,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileDescription", "Telegram Desktop" - VALUE "FileVersion", "1.0.28.0" + VALUE "FileVersion", "1.0.29.0" VALUE "LegalCopyright", "Copyright (C) 2014-2017" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "1.0.28.0" + VALUE "ProductVersion", "1.0.29.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 090c7f2e7..de065c345 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 1,0,28,0 - PRODUCTVERSION 1,0,28,0 + FILEVERSION 1,0,29,0 + PRODUCTVERSION 1,0,29,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -43,10 +43,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileDescription", "Telegram Desktop Updater" - VALUE "FileVersion", "1.0.28.0" + VALUE "FileVersion", "1.0.29.0" VALUE "LegalCopyright", "Copyright (C) 2014-2017" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "1.0.28.0" + VALUE "ProductVersion", "1.0.29.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index 33df0ef6d..78e5b977c 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #define BETA_VERSION_MACRO (0ULL) -constexpr int AppVersion = 1000028; -constexpr str_const AppVersionStr = "1.0.28"; -constexpr bool AppAlphaVersion = true; +constexpr int AppVersion = 1000029; +constexpr str_const AppVersionStr = "1.0.29"; +constexpr bool AppAlphaVersion = false; constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO; diff --git a/Telegram/SourceFiles/messenger.cpp b/Telegram/SourceFiles/messenger.cpp index afa07b005..f118521a1 100644 --- a/Telegram/SourceFiles/messenger.cpp +++ b/Telegram/SourceFiles/messenger.cpp @@ -679,7 +679,7 @@ void Messenger::checkMapVersion() { QString versionFeatures; if ((cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 1000028) { versionFeatures = QString::fromUtf8("\xE2\x80\x94 Better Emoji & Stickers & Saved GIFs panel.\n\xE2\x80\x94 Bug fixes and other minor improvements."); - } else if (!(cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 1000026) { + } else if (!(cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 1000029) { versionFeatures = langNewVersionText(); } else { versionFeatures = lang(lng_new_version_minor).trimmed(); diff --git a/Telegram/SourceFiles/window/window.style b/Telegram/SourceFiles/window/window.style index 425957345..8cf49e999 100644 --- a/Telegram/SourceFiles/window/window.style +++ b/Telegram/SourceFiles/window/window.style @@ -98,6 +98,16 @@ mainMenuCoverHeight: 140px; mainMenuUserpicLeft: 24px; mainMenuUserpicTop: 22px; mainMenuUserpicSize: 48px; +mainMenuCloudButton: IconButton { + width: 68px; + height: 68px; + + icon: icon { + { "menu_cloud", mainMenuCloudFg }, + }; + iconPosition: point(24px, 24px); +} +mainMenuCloudSize: 32px; mainMenuCoverTextLeft: 30px; mainMenuCoverNameTop: 88px; mainMenuCoverStatusTop: 106px; diff --git a/Telegram/SourceFiles/window/window_main_menu.cpp b/Telegram/SourceFiles/window/window_main_menu.cpp index f59569592..d86f8b7d3 100644 --- a/Telegram/SourceFiles/window/window_main_menu.cpp +++ b/Telegram/SourceFiles/window/window_main_menu.cpp @@ -23,6 +23,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "styles/style_window.h" #include "styles/style_dialogs.h" #include "profile/profile_userpic_button.h" +#include "ui/widgets/buttons.h" #include "ui/widgets/labels.h" #include "ui/widgets/menu.h" #include "mainwindow.h" @@ -78,19 +79,25 @@ MainMenu::MainMenu(QWidget *parent) : TWidget(parent) void MainMenu::checkSelf() { if (auto self = App::self()) { - _userpicButton.create(this, self, st::mainMenuUserpicSize); - _userpicButton->setClickedCallback([] { + auto showSelfChat = [] { if (auto self = App::self()) { Ui::showPeerHistory(App::history(self), ShowAtUnreadMsgId); } - }); + }; + _userpicButton.create(this, self, st::mainMenuUserpicSize); + _userpicButton->setClickedCallback(showSelfChat); _userpicButton->show(); + _cloudButton.create(this, st::mainMenuCloudButton); + _cloudButton->setClickedCallback(showSelfChat); + _cloudButton->show(); + update(); updateControlsGeometry(); if (_showFinished) { _userpicButton->showFinished(); } } else { _userpicButton.destroy(); + _cloudButton.destroy(); } } @@ -109,6 +116,9 @@ void MainMenu::updateControlsGeometry() { if (_userpicButton) { _userpicButton->moveToLeft(st::mainMenuUserpicLeft, st::mainMenuUserpicTop); } + if (_cloudButton) { + _cloudButton->moveToRight(0, st::mainMenuCoverHeight - _cloudButton->height()); + } _menu->setGeometry(0, st::mainMenuCoverHeight + st::mainMenuSkip, width(), _menu->height()); _telegram->moveToLeft(st::mainMenuFooterLeft, height() - st::mainMenuTelegramBottom - _telegram->height()); _version->moveToLeft(st::mainMenuFooterLeft, height() - st::mainMenuVersionBottom - _version->height()); @@ -137,6 +147,15 @@ void MainMenu::paintEvent(QPaintEvent *e) { p.setFont(st::normalFont); p.drawTextLeft(st::mainMenuCoverTextLeft, st::mainMenuCoverStatusTop, width(), _connectionText); } + if (_cloudButton) { + PainterHighQualityEnabler hq(p); + p.setPen(Qt::NoPen); + p.setBrush(st::mainMenuCloudBg); + auto cloudBg = QRect(_cloudButton->x() + (_cloudButton->width() - st::mainMenuCloudSize) / 2, + _cloudButton->y() + (_cloudButton->height() - st::mainMenuCloudSize) / 2, + st::mainMenuCloudSize, st::mainMenuCloudSize); + p.drawEllipse(cloudBg); + } } auto other = QRect(0, st::mainMenuCoverHeight, width(), height() - st::mainMenuCoverHeight).intersected(clip); if (!other.isEmpty()) { diff --git a/Telegram/SourceFiles/window/window_main_menu.h b/Telegram/SourceFiles/window/window_main_menu.h index cc2d6d973..3d95c9cb4 100644 --- a/Telegram/SourceFiles/window/window_main_menu.h +++ b/Telegram/SourceFiles/window/window_main_menu.h @@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #pragma once namespace Ui { +class IconButton; class FlatLabel; class Menu; } // namespace Ui @@ -50,6 +51,7 @@ private: void updateConnectionState(); object_ptr _userpicButton = { nullptr }; + object_ptr _cloudButton = { nullptr }; object_ptr _menu; object_ptr _telegram; object_ptr _version; diff --git a/Telegram/build/version b/Telegram/build/version index de67fec91..c8c1a4f5a 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -1,6 +1,6 @@ -AppVersion 1000028 +AppVersion 1000029 AppVersionStrMajor 1.0 -AppVersionStrSmall 1.0.28 -AppVersionStr 1.0.28 -AlphaChannel 1 +AppVersionStrSmall 1.0.29 +AppVersionStr 1.0.29 +AlphaChannel 0 BetaVersion 0 diff --git a/changelog.txt b/changelog.txt index 13ffeaf61..9a02503f2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,8 @@ +1.0.29 (05.04.17) + +- Improved Emoji, Stickers, and Saved GIFs panel. +- Bug fixes and other minor improvements. + 1.0.28 alpha (03.04.17) - Better Emoji & Stickers & Saved GIFs panel.