Alpha version 0.10.21: pinned chats, groups in common, new design.

This commit is contained in:
John Preston 2016-12-30 17:53:51 +04:00
parent b39987c343
commit bc0c355d2d
20 changed files with 457 additions and 430 deletions

View File

@ -0,0 +1,381 @@
//
// This is a sample Telegram Desktop theme file.
// It was generated from the 'colors.palette' style file.
//
// To create a theme with a background image included you should
// put two files in a .zip archive:
//
// First one is the color scheme like the one you're viewing
// right now, this file should be named 'colors.tdesktop-theme'.
//
// Second one should be the background image and it can be named
// 'background.jpg', 'background.png', 'tiled.jpg' or 'tiled.png'.
// You should name it 'background' (if you'd like it not to be tiled),
// or it can be named 'tiled' (if you'd like it to be tiled).
//
// After that you need to change the extension of your .zip archive
// to 'tdesktop-theme', so you'll have:
//
// mytheme.tdesktop-theme
// |-colors.tdesktop-theme
// |-background.jpg (or tiled.jpg, background.png, tiled.png)
//
windowBg: #ffffff;
windowFg: #000000;
windowBgOver: #f1f1f1;
windowBgRipple: #e5e5e5;
windowFgOver: windowFg;
windowSubTextFg: #999999;
windowSubTextFgOver: #919191;
windowBoldFg: #222222;
windowBoldFgOver: #222222;
windowBgActive: #40a7e3;
windowFgActive: #ffffff;
windowActiveTextFg: #168acd;
windowShadowFg: #000000;
windowShadowFgFallback: #f1f1f1;
shadowFg: #00000018;
slideFadeOutBg: #0000003c;
slideFadeOutShadowFg: windowShadowFg;
imageBg: #000000;
imageBgTransparent: #ffffff;
activeButtonBg: windowBgActive;
activeButtonBgOver: #39a5db;
activeButtonBgRipple: #2095d0;
activeButtonFg: windowFgActive;
activeButtonFgOver: activeButtonFg;
activeButtonSecondaryFg: #cceeff;
activeButtonSecondaryFgOver: activeButtonSecondaryFg;
activeLineFg: #37a1de;
activeLineFgError: #e48383;
lightButtonBg: windowBg;
lightButtonBgOver: #e3f1fa;
lightButtonBgRipple: #c9e4f6;
lightButtonFg: windowActiveTextFg;
lightButtonFgOver: lightButtonFg;
attentionButtonFg: #d14e4e;
attentionButtonFgOver: #d14e4e;
attentionButtonBgOver: #fcdfde;
attentionButtonBgRipple: #f4c3c2;
outlineButtonBg: windowBg;
outlineButtonBgOver: lightButtonBgOver;
outlineButtonOutlineFg: windowBgActive;
outlineButtonBgRipple: lightButtonBgRipple;
menuBg: windowBg;
menuBgOver: windowBgOver;
menuBgRipple: windowBgRipple;
menuIconFg: #a8a8a8;
menuIconFgOver: #999999;
menuSubmenuArrowFg: #373737;
menuFgDisabled: #cccccc;
menuSeparatorFg: #f1f1f1;
scrollBarBg: #00000053;
scrollBarBgOver: #0000007a;
scrollBg: #0000001a;
scrollBgOver: #0000002c;
smallCloseIconFg: #c7c7c7;
smallCloseIconFgOver: #a3a3a3;
radialFg: windowFgActive;
radialBg: #00000056;
placeholderFg: windowSubTextFg;
placeholderFgActive: #aaaaaa;
inputBorderFg: #e0e0e0;
filterInputBorderFg: #54c3f3;
checkboxFg: #b3b3b3;
sliderBgInactive: #e1eaef;
sliderBgActive: windowBgActive;
tooltipBg: #eef2f5;
tooltipFg: #5d6c80;
tooltipBorderFg: #c9d1db;
titleBg: windowBgOver;
titleShadow: #00000003;
titleButtonFg: #ababab;
titleButtonBgOver: #e5e5e5;
titleButtonFgOver: #9a9a9a;
titleButtonCloseBgOver: #e81123;
titleButtonCloseFgOver: windowFgActive;
titleFgActive: #3e3c3e;
titleFg: #acacac;
trayCounterBg: #f23c34;
trayCounterBgMute: #888888;
trayCounterFg: #ffffff;
trayCounterBgMacInvert: #ffffff;
trayCounterFgMacInvert: #ffffff01;
layerBg: #0000007f;
cancelIconFg: menuIconFg;
cancelIconFgOver: menuIconFgOver;
boxBg: windowBg;
boxTextFg: windowFg;
boxTextFgGood: #4ab44a;
boxTextFgError: #d84d4d;
boxTitleFg: #404040;
boxSearchBg: boxBg;
boxSearchCancelIconFg: cancelIconFg;
boxSearchCancelIconFgOver: cancelIconFgOver;
boxTitleAdditionalFg: #808080;
boxTitleCloseFg: cancelIconFg;
boxTitleCloseFgOver: cancelIconFgOver;
membersAboutLimitFg: windowSubTextFgOver;
contactsBg: windowBg;
contactsBgOver: windowBgOver;
contactsNameFg: boxTextFg;
contactsStatusFg: windowSubTextFg;
contactsStatusFgOver: windowSubTextFgOver;
contactsStatusFgOnline: windowActiveTextFg;
photoCropFadeBg: layerBg;
photoCropPointFg: #ffffff7f;
introBg: windowBg;
introTitleFg: windowBoldFg;
introDescriptionFg: windowSubTextFg;
introErrorFg: windowSubTextFg;
introCoverTopBg: #0f89d0;
introCoverBottomBg: #39b0f0;
introCoverIconsFg: #5ec6ff;
introCoverPlaneTrace: #5ec6ff69;
introCoverPlaneInner: #c6d8e8;
introCoverPlaneOuter: #a1bed4;
introCoverPlaneTop: #ffffff;
dialogsMenuIconFg: menuIconFg;
dialogsMenuIconFgOver: menuIconFgOver;
dialogsBg: windowBg;
dialogsNameFg: windowBoldFg;
dialogsChatIconFg: dialogsNameFg;
dialogsDateFg: windowSubTextFg;
dialogsTextFg: windowSubTextFg;
dialogsTextFgService: windowActiveTextFg;
dialogsDraftFg: #dd4b39;
dialogsVerifiedIconBg: windowBgActive;
dialogsVerifiedIconFg: windowFgActive;
dialogsSendingIconFg: #c1c1c1;
dialogsSentIconFg: #5dc452;
dialogsUnreadBg: windowBgActive;
dialogsUnreadBgMuted: #bbbbbb;
dialogsUnreadFg: windowFgActive;
dialogsBgOver: windowBgOver;
dialogsNameFgOver: windowBoldFgOver;
dialogsChatIconFgOver: dialogsNameFgOver;
dialogsDateFgOver: windowSubTextFgOver;
dialogsTextFgOver: windowSubTextFgOver;
dialogsTextFgServiceOver: dialogsTextFgService;
dialogsDraftFgOver: dialogsDraftFg;
dialogsVerifiedIconBgOver: dialogsVerifiedIconBg;
dialogsVerifiedIconFgOver: dialogsVerifiedIconFg;
dialogsSendingIconFgOver: dialogsSendingIconFg;
dialogsSentIconFgOver: dialogsSentIconFg;
dialogsUnreadBgOver: dialogsUnreadBg;
dialogsUnreadBgMutedOver: dialogsUnreadBgMuted;
dialogsUnreadFgOver: dialogsUnreadFg;
dialogsBgActive: #419fd9;
dialogsNameFgActive: windowFgActive;
dialogsChatIconFgActive: dialogsNameFgActive;
dialogsDateFgActive: windowFgActive;
dialogsTextFgActive: windowFgActive;
dialogsTextFgServiceActive: dialogsTextFgActive;
dialogsDraftFgActive: #c6e1f7;
dialogsVerifiedIconBgActive: dialogsTextFgActive;
dialogsVerifiedIconFgActive: dialogsBgActive;
dialogsSendingIconFgActive: #ffffff99;
dialogsSentIconFgActive: dialogsTextFgActive;
dialogsUnreadBgActive: dialogsTextFgActive;
dialogsUnreadBgMutedActive: dialogsDraftFgActive;
dialogsUnreadFgActive: dialogsBgActive;
dialogsForwardBg: dialogsBgActive;
dialogsForwardFg: dialogsNameFgActive;
searchedBarBg: windowBgOver;
searchedBarBorder: shadowFg;
searchedBarFg: windowSubTextFgOver;
topBarBg: windowBg;
emojiPanBg: windowBg;
emojiPanCategories: #f7f7f7; // windowBg;
emojiPanHeaderFg: windowSubTextFg;
emojiPanHeaderBg: #fffffff2; // emojiPanBg;
stickerPanDeleteBg: #000000cc;
stickerPanDeleteFg: windowFgActive;
stickerPreviewBg: #ffffffb0;
historyTextInFg: windowFg;
historyTextOutFg: windowFg;
historyCaptionInFg: historyTextInFg;
historyCaptionOutFg: historyTextOutFg;
historyFileNameInFg: historyTextInFg;
historyFileNameOutFg: historyTextOutFg;
historyOutIconFg: dialogsSentIconFg;
historyOutIconFgSelected: #4da79f;
historyIconFgInverted: windowFgActive;
historySendingOutIconFg: #98d292;
historySendingInIconFg: #a0adb5;
historySendingInvertedIconFg: #ffffffc8;
historySystemBg: #89a0b47f;
historySystemBgSelected: #bbc8d4a2;
historySystemFg: windowFgActive;
historyUnreadBarBg: #fcfbfa;
historyUnreadBarBorder: shadowFg;
historyUnreadBarFg: #538bb4;
historyForwardChooseBg: #0000004c;
historyForwardChooseFg: windowFgActive;
historyPeer1NameFg: #c03d33;
historyPeer1UserpicBg: #e17076;
historyPeer2NameFg: #4fad2d;
historyPeer2UserpicBg: #7bc862;
historyPeer3NameFg: #d09306;
historyPeer3UserpicBg: #e5ca77;
historyPeer4NameFg: windowActiveTextFg;
historyPeer4UserpicBg: #65aadd;
historyPeer5NameFg: #8544d6;
historyPeer5UserpicBg: #a695e7;
historyPeer6NameFg: #cd4073;
historyPeer6UserpicBg: #ee7aae;
historyPeer7NameFg: #2996ad;
historyPeer7UserpicBg: #6ec9cb;
historyPeer8NameFg: #ce671b;
historyPeer8UserpicBg: #faa774;
historyPeerUserpicFg: windowFgActive;
historyScrollBarBg: #556e837a;
historyScrollBarBgOver: #556e83bc;
historyScrollBg: #556e834c;
historyScrollBgOver: #556e836b;
msgInBg: windowBg;
msgInBgSelected: #c2dcf2;
msgOutBg: #effdde;
msgOutBgSelected: #b7dbdb;
msgSelectOverlay: #358cd44c;
msgStickerOverlay: #358cd47f;
msgInServiceFg: windowActiveTextFg;
msgInServiceFgSelected: windowActiveTextFg;
msgOutServiceFg: #3a8e26;
msgOutServiceFgSelected: #367570;
msgInShadow: #748ea229;
msgInShadowSelected: #548dbb29;
msgOutShadow: #3ac34740;
msgOutShadowSelected: #37a78e40;
msgInDateFg: #a0acb6;
msgInDateFgSelected: #6a9cc5;
msgOutDateFg: #6cc264;
msgOutDateFgSelected: #50a79c;
msgServiceFg: windowFgActive;
msgServiceBg: #556e837f;
msgServiceBgSelected: #8ca0b3a2;
msgInReplyBarColor: activeLineFg;
msgInReplyBarSelColor: activeLineFg;
msgOutReplyBarColor: historyOutIconFg;
msgOutReplyBarSelColor: historyOutIconFgSelected;
msgImgReplyBarColor: msgServiceFg;
msgInMonoFg: #4e7391;
msgOutMonoFg: #469165;
msgDateImgFg: msgServiceFg;
msgDateImgBg: #00000054;
msgDateImgBgOver: #00000074;
msgDateImgBgSelected: #1c4a7187;
msgFileThumbLinkInFg: lightButtonFg;
msgFileThumbLinkInFgSelected: lightButtonFgOver;
msgFileThumbLinkOutFg: #5eba5b;
msgFileThumbLinkOutFgSelected: #31a298;
msgFileInBg: windowBgActive;
msgFileInBgOver: #4eade3;
msgFileInBgSelected: #51a3d3;
msgFileOutBg: #78c67f;
msgFileOutBgOver: #6bc272;
msgFileOutBgSelected: #5fb389;
msgFile1Bg: #72b1df;
msgFile1BgDark: #5c9ece;
msgFile1BgOver: #5294c4;
msgFile1BgSelected: #5099d0;
msgFile2Bg: #61b96e;
msgFile2BgDark: #4da859;
msgFile2BgOver: #44a050;
msgFile2BgSelected: #46a07e;
msgFile3Bg: #e47272;
msgFile3BgDark: #cd5b5e;
msgFile3BgOver: #c35154;
msgFile3BgSelected: #9f6a82;
msgFile4Bg: #efc274;
msgFile4BgDark: #e6a561;
msgFile4BgOver: #dc9c5a;
msgFile4BgSelected: #b19d84;
msgWaveformInActive: windowBgActive;
msgWaveformInActiveSelected: #51a3d3;
msgWaveformInInactive: #d4dee6;
msgWaveformInInactiveSelected: #9cc1e1;
msgWaveformOutActive: #78c67f;
msgWaveformOutActiveSelected: #6badad;
msgWaveformOutInactive: #b3e2b4;
msgWaveformOutInactiveSelected: #91c3c3;
msgBotKbOverBgAdd: #ffffff20;
msgBotKbIconFg: msgServiceFg;
msgBotKbRippleBg: #00000020;
mediaInFg: msgInDateFg;
mediaInFgSelected: msgInDateFgSelected;
mediaOutFg: msgOutDateFg;
mediaOutFgSelected: msgOutDateFgSelected;
youtubePlayIconBg: #e83131c8;
youtubePlayIconFg: windowFgActive;
videoPlayIconBg: #0000007f;
videoPlayIconFg: #ffffff;
toastBg: #000000b2;
toastFg: windowFgActive;
reportSpamBg: emojiPanHeaderBg;
reportSpamFg: windowFg;
historyToDownShadow: #00000040;
historyComposeAreaBg: msgInBg;
historyComposeAreaFg: historyTextInFg;
historyComposeAreaFgService: msgInDateFg;
historyComposeIconFg: menuIconFg;
historyComposeIconFgOver: menuIconFgOver;
historySendIconFg: windowBgActive;
historySendIconFgOver: windowBgActive;
historyPinnedBg: historyComposeAreaBg;
historyReplyBg: historyComposeAreaBg;
historyReplyCancelFg: cancelIconFg;
historyReplyCancelFgOver: cancelIconFgOver;
historyComposeButtonBg: historyComposeAreaBg;
historyComposeButtonBgOver: windowBgOver;
historyComposeButtonBgRipple: windowBgRipple;
overviewCheckBg: #00000040;
overviewCheckFg: windowBg;
overviewCheckFgActive: windowBg;
overviewPhotoSelectOverlay: #40ace333;
profileStatusFgOver: #7c99b2;
notificationsBoxMonitorFg: windowFg;
notificationsBoxScreenBg: dialogsBgActive;
notificationSampleUserpicFg: windowBgActive;
notificationSampleCloseFg: #d7d7d7; // windowSubTextFg;
notificationSampleTextFg: #d7d7d7; // windowSubTextFg;
notificationSampleNameFg: #939393; // windowSubTextFg;
mainMenuBg: windowBg;
mainMenuCoverBg: dialogsBgActive;
mainMenuCoverFg: windowFgActive;
mediaPlayerBg: windowBg;
mediaPlayerActiveFg: windowBgActive;
mediaPlayerInactiveFg: sliderBgInactive;
mediaPlayerDisabledFg: #9dd1ef;
mediaviewFileBg: windowBg;
mediaviewFileNameFg: windowFg;
mediaviewFileSizeFg: windowSubTextFg;
mediaviewFileRedCornerFg: #d55959;
mediaviewFileYellowCornerFg: #e8a659;
mediaviewFileGreenCornerFg: #49a957;
mediaviewFileBlueCornerFg: #599dcf;
mediaviewFileExtFg: activeButtonFg;
mediaviewMenuBg: #383838;
mediaviewMenuBgOver: #505050;
mediaviewMenuBgRipple: #676767;
mediaviewMenuFg: windowFgActive;
mediaviewBg: #222222eb;
mediaviewVideoBg: imageBg;
mediaviewControlBg: #0000003c;
mediaviewControlFg: windowFgActive;
mediaviewCaptionBg: #11111180;
mediaviewCaptionFg: mediaviewControlFg;
mediaviewTextLinkFg: #91d9ff;
mediaviewSaveMsgBg: toastBg;
mediaviewSaveMsgFg: toastFg;
mediaviewPlaybackActive: #c7c7c7;
mediaviewPlaybackInactive: #252525;
mediaviewPlaybackActiveOver: #ffffff;
mediaviewPlaybackInactiveOver: #474747;
mediaviewPlaybackProgressFg: #ffffffc7;
mediaviewPlaybackIconFg: mediaviewPlaybackActive;
mediaviewPlaybackIconFgOver: mediaviewPlaybackActiveOver;
mediaviewTransparentBg: #ffffff;
mediaviewTransparentFg: #cccccc;
notificationBg: windowBg;

View File

@ -125,6 +125,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_gif_error" = "An error has occured while reading GIF animation :("; "lng_gif_error" = "An error has occured while reading GIF animation :(";
"lng_edit_error" = "You cannot edit this message"; "lng_edit_error" = "You cannot edit this message";
"lng_join_channel_error" = "Sorry, you have joined too many channels and supergroups. Please leave some before joining."; "lng_join_channel_error" = "Sorry, you have joined too many channels and supergroups. Please leave some before joining.";
"lng_error_phone_flood" = "Sorry, you have deleted and re-created your account too many times recently. Please wait for a few days before signing up again.";
"lng_edit_deleted" = "This message was deleted"; "lng_edit_deleted" = "This message was deleted";
"lng_edit_too_long" = "Your message text is too long"; "lng_edit_too_long" = "Your message text is too long";
"lng_edit_message" = "Edit message"; "lng_edit_message" = "Edit message";

View File

@ -1,381 +0,0 @@
//
// This is a sample Telegram Desktop theme file.
// It was generated from the 'colors.palette' style file.
//
// To create a theme with a background image included you should
// put two files in a .zip archive:
//
// First one is the color scheme like the one you're viewing
// right now, this file should be named 'colors.tdesktop-theme'.
//
// Second one should be the background image and it can be named
// 'background.jpg', 'background.png', 'tiled.jpg' or 'tiled.png'.
// You should name it 'background' (if you'd like it not to be tiled),
// or it can be named 'tiled' (if you'd like it to be tiled).
//
// After that you need to change the extension of your .zip archive
// to 'tdesktop-theme', so you'll have:
//
// mytheme.tdesktop-theme
// |-colors.tdesktop-theme
// |-background.jpg (or tiled.jpg, background.png, tiled.png)
//
windowBg: #ffffff;
windowFg: #000000;
windowBgOver: #f1f1f1;
windowBgRipple: #e5e5e5;
windowFgOver: #000000; // windowBgOver;
windowSubTextFg: #999999;
windowSubTextFgOver: #919191;
windowBoldFg: #222222;
windowBoldFgOver: #222222;
windowBgActive: #40a7e3;
windowFgActive: #ffffff;
windowActiveTextFg: #168acd;
windowShadowFg: #000000;
windowShadowFgFallback: #f1f1f1;
shadowFg: #00000018;
slideFadeOutBg: #0000003c;
slideFadeOutShadowFg: #000000; // windowShadowFgFallback;
imageBg: #000000;
imageBgTransparent: #ffffff;
activeButtonBg: #40a7e3; // windowFgActive;
activeButtonBgOver: #39a5db;
activeButtonBgRipple: #2095d0;
activeButtonFg: #ffffff; // windowActiveTextFg;
activeButtonFgOver: activeButtonFgOver;
activeButtonSecondaryFg: #cceeff;
activeButtonSecondaryFgOver: activeButtonSecondaryFgOver;
activeLineFg: #37a1de;
activeLineFgError: #e48383;
lightButtonBg: #ffffff; // windowFg;
lightButtonBgOver: #e3f1fa;
lightButtonBgRipple: #c9e4f6;
lightButtonFg: #168acd; // windowShadowFg;
lightButtonFgOver: lightButtonFgOver;
attentionButtonFg: #d14e4e;
attentionButtonFgOver: #d14e4e;
attentionButtonBgOver: #fcdfde;
attentionButtonBgRipple: #f4c3c2;
outlineButtonBg: #ffffff; // windowFg;
outlineButtonBgOver: #e3f1fa; // lightButtonBgRipple;
outlineButtonOutlineFg: #40a7e3; // windowFgActive;
outlineButtonBgRipple: #c9e4f6; // lightButtonFg;
menuBg: #ffffff; // windowFg;
menuBgOver: #f1f1f1; // windowBgRipple;
menuBgRipple: #e5e5e5; // windowFgOver;
menuIconFg: #a8a8a8;
menuIconFgOver: #999999;
menuSubmenuArrowFg: #373737;
menuFgDisabled: #cccccc;
menuSeparatorFg: #f1f1f1;
scrollBarBg: #00000053;
scrollBarBgOver: #0000007a;
scrollBg: #0000001a;
scrollBgOver: #0000002c;
smallCloseIconFg: #c7c7c7;
smallCloseIconFgOver: #a3a3a3;
radialFg: #ffffff; // windowActiveTextFg;
radialBg: #00000056;
placeholderFg: #999999; // windowSubTextFgOver;
placeholderFgActive: #aaaaaa;
inputBorderFg: #e0e0e0;
filterInputBorderFg: #54c3f3;
checkboxFg: #b3b3b3;
sliderBgInactive: #e1eaef;
sliderBgActive: #40a7e3; // windowFgActive;
tooltipBg: #eef2f5;
tooltipFg: #5d6c80;
tooltipBorderFg: #c9d1db;
titleBg: #f1f1f1; // windowBgRipple;
titleShadow: #00000003;
titleButtonFg: #ababab;
titleButtonBgOver: #e5e5e5;
titleButtonFgOver: #9a9a9a;
titleButtonCloseBgOver: #e81123;
titleButtonCloseFgOver: #ffffff; // windowActiveTextFg;
titleFgActive: #3e3c3e;
titleFg: #acacac;
trayCounterBg: #f23c34;
trayCounterBgMute: #888888;
trayCounterFg: #ffffff;
trayCounterBgMacInvert: #ffffff;
trayCounterFgMacInvert: #ffffff01;
layerBg: #0000007f;
cancelIconFg: #a8a8a8; // menuIconFgOver;
cancelIconFgOver: #999999; // menuSubmenuArrowFg;
boxBg: #ffffff; // windowFg;
boxTextFg: #000000; // windowBgOver;
boxTextFgGood: #4ab44a;
boxTextFgError: #d84d4d;
boxTitleFg: #404040;
boxSearchBg: #ffffff; // boxTextFg;
boxSearchCancelIconFg: #a8a8a8; // cancelIconFgOver;
boxSearchCancelIconFgOver: #999999; // boxBg;
boxTitleAdditionalFg: #808080;
boxTitleCloseFg: #a8a8a8; // cancelIconFgOver;
boxTitleCloseFgOver: #999999; // boxBg;
membersAboutLimitFg: #919191; // windowBoldFg;
contactsBg: #ffffff; // windowFg;
contactsBgOver: #f1f1f1; // windowBgRipple;
contactsNameFg: #000000; // boxTextFgGood;
contactsStatusFg: #999999; // windowSubTextFgOver;
contactsStatusFgOver: #919191; // windowBoldFg;
contactsStatusFgOnline: #168acd; // windowShadowFg;
photoCropFadeBg: #0000007f; // cancelIconFg;
photoCropPointFg: #ffffff7f;
introBg: #ffffff; // windowFg;
introTitleFg: windowBoldFgOver;
introDescriptionFg: #999999; // windowSubTextFgOver;
introErrorFg: #999999; // windowSubTextFgOver;
introCoverTopBg: #0f89d0;
introCoverBottomBg: #39b0f0;
introCoverIconsFg: #5ec6ff;
introCoverPlaneTrace: #5ec6ff69;
introCoverPlaneInner: #c6d8e8;
introCoverPlaneOuter: #a1bed4;
introCoverPlaneTop: #ffffff;
dialogsMenuIconFg: #a8a8a8; // menuIconFgOver;
dialogsMenuIconFgOver: #999999; // menuSubmenuArrowFg;
dialogsBg: #ffffff; // windowFg;
dialogsNameFg: windowBoldFgOver;
dialogsChatIconFg: dialogsChatIconFg;
dialogsDateFg: #999999; // windowSubTextFgOver;
dialogsTextFg: #999999; // windowSubTextFgOver;
dialogsTextFgService: #168acd; // windowShadowFg;
dialogsDraftFg: #dd4b39;
dialogsVerifiedIconBg: #40a7e3; // windowFgActive;
dialogsVerifiedIconFg: #ffffff; // windowActiveTextFg;
dialogsSendingIconFg: #c1c1c1;
dialogsSentIconFg: #5dc452;
dialogsUnreadBg: #40a7e3; // windowFgActive;
dialogsUnreadBgMuted: #bbbbbb;
dialogsUnreadFg: #ffffff; // windowActiveTextFg;
dialogsBgOver: #f1f1f1; // windowBgRipple;
dialogsNameFgOver: #222222; // windowBgActive;
dialogsChatIconFgOver: dialogsChatIconFgOver;
dialogsDateFgOver: #919191; // windowBoldFg;
dialogsTextFgOver: #919191; // windowBoldFg;
dialogsTextFgServiceOver: #168acd; // dialogsDraftFg;
dialogsDraftFgOver: #dd4b39; // dialogsVerifiedIconBg;
dialogsVerifiedIconBgOver: #40a7e3; // dialogsVerifiedIconFg;
dialogsVerifiedIconFgOver: #ffffff; // dialogsSendingIconFg;
dialogsSendingIconFgOver: #c1c1c1; // dialogsSentIconFg;
dialogsSentIconFgOver: #5dc452; // dialogsUnreadBg;
dialogsUnreadBgOver: #40a7e3; // dialogsUnreadBgMuted;
dialogsUnreadBgMutedOver: #bbbbbb; // dialogsUnreadFg;
dialogsUnreadFgOver: #ffffff; // dialogsBgOver;
dialogsBgActive: #419fd9;
dialogsNameFgActive: #ffffff; // windowActiveTextFg;
dialogsChatIconFgActive: dialogsChatIconFgActive;
dialogsDateFgActive: #ffffff; // windowActiveTextFg;
dialogsTextFgActive: #ffffff; // windowActiveTextFg;
dialogsTextFgServiceActive: dialogsTextFgServiceActive;
dialogsDraftFgActive: #c6e1f7;
dialogsVerifiedIconBgActive: dialogsTextFgServiceActive;
dialogsVerifiedIconFgActive: #419fd9; // dialogsNameFgActive;
dialogsSendingIconFgActive: #ffffff99;
dialogsSentIconFgActive: dialogsTextFgServiceActive;
dialogsUnreadBgActive: dialogsTextFgServiceActive;
dialogsUnreadBgMutedActive: #c6e1f7; // dialogsVerifiedIconBgActive;
dialogsUnreadFgActive: #419fd9; // dialogsNameFgActive;
dialogsForwardBg: #419fd9; // dialogsNameFgActive;
dialogsForwardFg: dialogsChatIconFgActive;
searchedBarBg: #f1f1f1; // windowBgRipple;
searchedBarBorder: #00000018; // slideFadeOutBg;
searchedBarFg: #919191; // windowBoldFg;
topBarBg: #ffffff; // windowFg;
emojiPanBg: #ffffff; // windowFg;
emojiPanCategories: #f7f7f7; // windowFg;
emojiPanHeaderFg: #999999; // windowSubTextFgOver;
emojiPanHeaderBg: #fffffff2; // emojiPanCategories;
stickerPanDeleteBg: #000000cc;
stickerPanDeleteFg: #ffffff; // windowActiveTextFg;
stickerPreviewBg: #ffffffb0;
historyTextInFg: #000000; // windowBgOver;
historyTextOutFg: #000000; // windowBgOver;
historyCaptionInFg: historyTextOutFg;
historyCaptionOutFg: historyCaptionInFg;
historyFileNameInFg: historyTextOutFg;
historyFileNameOutFg: historyCaptionInFg;
historyOutIconFg: #5dc452; // dialogsUnreadBg;
historyOutIconFgSelected: #4da79f;
historyIconFgInverted: #ffffff; // windowActiveTextFg;
historySendingOutIconFg: #98d292;
historySendingInIconFg: #a0adb5;
historySendingInvertedIconFg: #ffffffc8;
historySystemBg: #89a0b47f;
historySystemBgSelected: #bbc8d4a2;
historySystemFg: #ffffff; // windowActiveTextFg;
historyUnreadBarBg: #fcfbfa;
historyUnreadBarBorder: #00000018; // slideFadeOutBg;
historyUnreadBarFg: #538bb4;
historyForwardChooseBg: #0000004c;
historyForwardChooseFg: #ffffff; // windowActiveTextFg;
historyPeer1NameFg: #c03d33;
historyPeer1UserpicBg: #e17076;
historyPeer2NameFg: #4fad2d;
historyPeer2UserpicBg: #7bc862;
historyPeer3NameFg: #d09306;
historyPeer3UserpicBg: #e5ca77;
historyPeer4NameFg: #168acd; // windowShadowFg;
historyPeer4UserpicBg: #65aadd;
historyPeer5NameFg: #8544d6;
historyPeer5UserpicBg: #a695e7;
historyPeer6NameFg: #cd4073;
historyPeer6UserpicBg: #ee7aae;
historyPeer7NameFg: #2996ad;
historyPeer7UserpicBg: #6ec9cb;
historyPeer8NameFg: #ce671b;
historyPeer8UserpicBg: #faa774;
historyPeerUserpicFg: #ffffff; // windowActiveTextFg;
historyScrollBarBg: #556e837a;
historyScrollBarBgOver: #556e83bc;
historyScrollBg: #556e834c;
historyScrollBgOver: #556e836b;
msgInBg: #ffffff; // windowFg;
msgInBgSelected: #c2dcf2;
msgOutBg: #effdde;
msgOutBgSelected: #b7dbdb;
msgSelectOverlay: #358cd44c;
msgStickerOverlay: #358cd47f;
msgInServiceFg: #168acd; // windowShadowFg;
msgInServiceFgSelected: #168acd; // windowShadowFg;
msgOutServiceFg: #3a8e26;
msgOutServiceFgSelected: #367570;
msgInShadow: #748ea229;
msgInShadowSelected: #548dbb29;
msgOutShadow: #3ac34740;
msgOutShadowSelected: #37a78e40;
msgInDateFg: #a0acb6;
msgInDateFgSelected: #6a9cc5;
msgOutDateFg: #6cc264;
msgOutDateFgSelected: #50a79c;
msgServiceFg: #ffffff; // windowActiveTextFg;
msgServiceBg: #556e837f;
msgServiceBgSelected: #8ca0b3a2;
msgInReplyBarColor: #37a1de; // activeLineFgError;
msgInReplyBarSelColor: #37a1de; // activeLineFgError;
msgOutReplyBarColor: #5dc452; // historyOutIconFgSelected;
msgOutReplyBarSelColor: #4da79f; // historyIconFgInverted;
msgImgReplyBarColor: #ffffff; // msgServiceBg;
msgInMonoFg: #4e7391;
msgOutMonoFg: #469165;
msgDateImgFg: #ffffff; // msgServiceBg;
msgDateImgBg: #00000054;
msgDateImgBgOver: #00000074;
msgDateImgBgSelected: #1c4a7187;
msgFileThumbLinkInFg: lightButtonFgOver;
msgFileThumbLinkInFgSelected: #168acd; // attentionButtonFg;
msgFileThumbLinkOutFg: #5eba5b;
msgFileThumbLinkOutFgSelected: #31a298;
msgFileInBg: #40a7e3; // windowFgActive;
msgFileInBgOver: #4eade3;
msgFileInBgSelected: #51a3d3;
msgFileOutBg: #78c67f;
msgFileOutBgOver: #6bc272;
msgFileOutBgSelected: #5fb389;
msgFile1Bg: #72b1df;
msgFile1BgDark: #5c9ece;
msgFile1BgOver: #5294c4;
msgFile1BgSelected: #5099d0;
msgFile2Bg: #61b96e;
msgFile2BgDark: #4da859;
msgFile2BgOver: #44a050;
msgFile2BgSelected: #46a07e;
msgFile3Bg: #e47272;
msgFile3BgDark: #cd5b5e;
msgFile3BgOver: #c35154;
msgFile3BgSelected: #9f6a82;
msgFile4Bg: #efc274;
msgFile4BgDark: #e6a561;
msgFile4BgOver: #dc9c5a;
msgFile4BgSelected: #b19d84;
msgWaveformInActive: #40a7e3; // windowFgActive;
msgWaveformInActiveSelected: #51a3d3;
msgWaveformInInactive: #d4dee6;
msgWaveformInInactiveSelected: #9cc1e1;
msgWaveformOutActive: #78c67f;
msgWaveformOutActiveSelected: #6badad;
msgWaveformOutInactive: #b3e2b4;
msgWaveformOutInactiveSelected: #91c3c3;
msgBotKbOverBgAdd: #ffffff20;
msgBotKbIconFg: #ffffff; // msgServiceBg;
msgBotKbRippleBg: #00000020;
mediaInFg: #a0acb6; // msgInDateFgSelected;
mediaInFgSelected: #6a9cc5; // msgOutDateFg;
mediaOutFg: #6cc264; // msgOutDateFgSelected;
mediaOutFgSelected: #50a79c; // msgServiceFg;
youtubePlayIconBg: #e83131c8;
youtubePlayIconFg: #ffffff; // windowActiveTextFg;
videoPlayIconBg: #0000007f;
videoPlayIconFg: #ffffff;
toastBg: #000000b2;
toastFg: #ffffff; // windowActiveTextFg;
reportSpamBg: #fffffff2; // stickerPanDeleteBg;
reportSpamFg: #000000; // windowBgOver;
historyToDownShadow: #00000040;
historyComposeAreaBg: #ffffff; // msgInBgSelected;
historyComposeAreaFg: historyTextOutFg;
historyComposeAreaFgService: #a0acb6; // msgInDateFgSelected;
historyComposeIconFg: #a8a8a8; // menuIconFgOver;
historyComposeIconFgOver: #999999; // menuSubmenuArrowFg;
historySendIconFg: #40a7e3; // windowFgActive;
historySendIconFgOver: #40a7e3; // windowFgActive;
historyPinnedBg: #ffffff; // historyComposeAreaFg;
historyReplyBg: #ffffff; // historyComposeAreaFg;
historyReplyCancelFg: #a8a8a8; // cancelIconFgOver;
historyReplyCancelFgOver: #999999; // boxBg;
historyComposeButtonBg: #ffffff; // historyComposeAreaFg;
historyComposeButtonBgOver: #f1f1f1; // windowBgRipple;
historyComposeButtonBgRipple: #e5e5e5; // windowFgOver;
overviewCheckBg: #00000040;
overviewCheckFg: #ffffff; // windowFg;
overviewCheckFgActive: #ffffff; // windowFg;
overviewPhotoSelectOverlay: #40ace333;
profileStatusFgOver: #7c99b2;
notificationsBoxMonitorFg: #000000; // windowBgOver;
notificationsBoxScreenBg: #419fd9; // dialogsNameFgActive;
notificationSampleUserpicFg: #40a7e3; // windowFgActive;
notificationSampleCloseFg: #d7d7d7; // windowSubTextFgOver;
notificationSampleTextFg: #d7d7d7; // windowSubTextFgOver;
notificationSampleNameFg: #939393; // windowSubTextFgOver;
mainMenuBg: #ffffff; // windowFg;
mainMenuCoverBg: #419fd9; // dialogsNameFgActive;
mainMenuCoverFg: #ffffff; // windowActiveTextFg;
mediaPlayerBg: #ffffff; // windowFg;
mediaPlayerActiveFg: #40a7e3; // windowFgActive;
mediaPlayerInactiveFg: #e1eaef; // sliderBgActive;
mediaPlayerDisabledFg: #9dd1ef;
mediaviewFileBg: #ffffff; // windowFg;
mediaviewFileNameFg: #000000; // windowBgOver;
mediaviewFileSizeFg: #999999; // windowSubTextFgOver;
mediaviewFileRedCornerFg: #d55959;
mediaviewFileYellowCornerFg: #e8a659;
mediaviewFileGreenCornerFg: #49a957;
mediaviewFileBlueCornerFg: #599dcf;
mediaviewFileExtFg: activeButtonFgOver;
mediaviewMenuBg: #383838;
mediaviewMenuBgOver: #505050;
mediaviewMenuBgRipple: #676767;
mediaviewMenuFg: #ffffff; // windowActiveTextFg;
mediaviewBg: #222222eb;
mediaviewVideoBg: #000000; // imageBgTransparent;
mediaviewControlBg: #0000003c;
mediaviewControlFg: #ffffff; // windowActiveTextFg;
mediaviewCaptionBg: #11111180;
mediaviewCaptionFg: #ffffff; // mediaviewCaptionBg;
mediaviewTextLinkFg: #91d9ff;
mediaviewSaveMsgBg: #000000b2; // toastFg;
mediaviewSaveMsgFg: #ffffff; // reportSpamBg;
mediaviewPlaybackActive: #c7c7c7;
mediaviewPlaybackInactive: #252525;
mediaviewPlaybackActiveOver: #ffffff;
mediaviewPlaybackInactiveOver: #474747;
mediaviewPlaybackProgressFg: #ffffffc7;
mediaviewPlaybackIconFg: #c7c7c7; // mediaviewPlaybackInactive;
mediaviewPlaybackIconFgOver: #ffffff; // mediaviewPlaybackInactiveOver;
mediaviewTransparentBg: #ffffff;
mediaviewTransparentFg: #cccccc;
notificationBg: #ffffff; // windowFg;

View File

@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,10,20,7 FILEVERSION 0,10,21,0
PRODUCTVERSION 0,10,20,7 PRODUCTVERSION 0,10,21,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -51,10 +51,10 @@ BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", "Telegram Messenger LLP" VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileVersion", "0.10.20.7" VALUE "FileVersion", "0.10.21.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.10.20.7" VALUE "ProductVersion", "0.10.21.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,10,20,7 FILEVERSION 0,10,21,0
PRODUCTVERSION 0,10,20,7 PRODUCTVERSION 0,10,21,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -43,10 +43,10 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Telegram Messenger LLP" VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Updater" VALUE "FileDescription", "Telegram Updater"
VALUE "FileVersion", "0.10.20.7" VALUE "FileVersion", "0.10.21.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.10.20.7" VALUE "ProductVersion", "0.10.21.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -1069,8 +1069,8 @@ void AppClass::checkMapVersion() {
if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion() < AppVersion) {
if (Local::oldMapVersion()) { if (Local::oldMapVersion()) {
QString versionFeatures; QString versionFeatures;
if ((cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 10017) { if ((cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 10021) {
versionFeatures = QString::fromUtf8("\xe2\x80\x94 New cute control for adding members to your groups"); versionFeatures = QString::fromUtf8("\xe2\x80\x94 Fabulous new material-style design and animations.\n\xe2\x80\x94 This version already supports custom themes that are coming soon.\n\xe2\x80\x94 Pin important chats to the top of the list so that you never miss a new message (right click on a chat, then choose 'Pin to top').\n\xe2\x80\x94 Groups in common. A new option in your contacts' profiles that shows a list of all groups you share with that person.");
} else if (!(cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 10018) { } else if (!(cAlphaVersion() || cBetaVersion()) && Local::oldMapVersion() < 10018) {
versionFeatures = langNewVersionText(); versionFeatures = langNewVersionText();
} else { } else {

View File

@ -289,7 +289,7 @@ void StickerSetBox::Inner::mouseReleaseEvent(QMouseEvent *e) {
if (_previewTimer.isActive()) { if (_previewTimer.isActive()) {
_previewTimer.stop(); _previewTimer.stop();
int index = stickerFromGlobalPos(e->globalPos()); int index = stickerFromGlobalPos(e->globalPos());
if (index >= 0 && index < _pack.size()) { if (index >= 0 && index < _pack.size() && !isMasksSet()) {
if (auto main = App::main()) { if (auto main = App::main()) {
if (main->onSendSticker(_pack.at(index))) { if (main->onSendSticker(_pack.at(index))) {
Ui::hideSettingsAndLayer(); Ui::hideSettingsAndLayer();

View File

@ -1254,7 +1254,7 @@ bool Generator::writeSampleTheme(const QString &filepath) {
auto fallbackIndex = paletteIndices_.value(colorFallbackName(variable.value), -1); auto fallbackIndex = paletteIndices_.value(colorFallbackName(variable.value), -1);
auto colorString = paletteColorValue(color); auto colorString = paletteColorValue(color);
if (fallbackIndex >= 0) { if (fallbackIndex >= 0) {
auto fallbackVariable = module_.findVariableInModule(names[fallbackIndex], module_); auto fallbackVariable = module_.findVariableInModule(names[fallbackIndex - 1], module_);
if (!fallbackVariable || fallbackVariable->value.type().tag != structure::TypeTag::Color) { if (!fallbackVariable || fallbackVariable->value.type().tag != structure::TypeTag::Color) {
return false; return false;
} }

View File

@ -81,7 +81,7 @@ bool Processor::write(const structure::Module &module) const {
if (!generator.writeSource()) { if (!generator.writeSource()) {
return false; return false;
} }
auto themePath = srcFile.absoluteDir().absolutePath() + "/sample.tdesktop-theme"; auto themePath = srcFile.absoluteDir().absolutePath() + "/default.tdesktop-theme";
if (options_.isPalette && !generator.writeSampleTheme(themePath)) { if (options_.isPalette && !generator.writeSampleTheme(themePath)) {
return false; return false;
} }

View File

@ -195,7 +195,7 @@ TaskQueue *TaskQueue::TaskQueueList::TakeFirst(int list_index_) {
void TaskQueue::TaskThreadPool::AddQueueTask(TaskQueue *queue, Task &&task) { void TaskQueue::TaskThreadPool::AddQueueTask(TaskQueue *queue, Task &&task) {
QMutexLocker lock(&queues_mutex_); QMutexLocker lock(&queues_mutex_);
queue->tasks_.push_back(new Task(std::move(task))); queue->tasks_.push_back(new Task(std_::move(task)));
auto list_was_empty = queue_list_.Empty(kAllQueuesList); auto list_was_empty = queue_list_.Empty(kAllQueuesList);
auto threads_count = threads_.size(); auto threads_count = threads_.size();
auto all_threads_processing = (threads_count == tasks_in_process_); auto all_threads_processing = (threads_count == tasks_in_process_);
@ -332,7 +332,7 @@ TaskQueue::TaskQueue(Type type, Priority priority)
TaskQueue::~TaskQueue() { TaskQueue::~TaskQueue() {
if (type_ != Type::Main && type_ != Type::Special) { if (type_ != Type::Main && type_ != Type::Special) {
if (auto thread_pool = weak_thread_pool_.lock()) { if (auto thread_pool = weak_thread_pool_.toStrongRef()) {
thread_pool->RemoveQueue(this); thread_pool->RemoveQueue(this);
} }
} }
@ -344,12 +344,12 @@ TaskQueue::~TaskQueue() {
void TaskQueue::Put(Task &&task) { void TaskQueue::Put(Task &&task) {
if (type_ == Type::Main) { if (type_ == Type::Main) {
QMutexLocker lock(&tasks_mutex_); QMutexLocker lock(&tasks_mutex_);
tasks_.push_back(new Task(std::move(task))); tasks_.push_back(new Task(std_::move(task)));
Sandbox::MainThreadTaskAdded(); Sandbox::MainThreadTaskAdded();
} else { } else {
t_assert(type_ != Type::Special); t_assert(type_ != Type::Special);
TaskThreadPool::Instance()->AddQueueTask(this, std::move(task)); TaskThreadPool::Instance()->AddQueueTask(this, std_::move(task));
} }
} }

View File

@ -938,41 +938,52 @@ QString rusKeyboardLayoutSwitch(const QString &from) {
QStringList MimeType::globPatterns() const { QStringList MimeType::globPatterns() const {
switch (_type) { switch (_type) {
case WebP: return QStringList(qsl("*.webp")); case Known::WebP: return QStringList(qsl("*.webp"));
case Known::TDesktopTheme: return QStringList(qsl("*.tdesktop-theme"));
default: break; default: break;
} }
return _typeStruct.globPatterns(); return _typeStruct.globPatterns();
} }
QString MimeType::filterString() const { QString MimeType::filterString() const {
switch (_type) { switch (_type) {
case WebP: return qsl("WebP image (*.webp)"); case Known::WebP: return qsl("WebP image (*.webp)");
case Known::TDesktopTheme: return qsl("Theme files (*.tdesktop-theme)");
default: break; default: break;
} }
return _typeStruct.filterString(); return _typeStruct.filterString();
} }
QString MimeType::name() const { QString MimeType::name() const {
switch (_type) { switch (_type) {
case WebP: return qsl("image/webp"); case Known::WebP: return qsl("image/webp");
case Known::TDesktopTheme: return qsl("application/x-tdesktop-theme");
default: break; default: break;
} }
return _typeStruct.name(); return _typeStruct.name();
} }
MimeType mimeTypeForName(const QString &mime) { MimeType mimeTypeForName(const QString &mime) {
if (mime == qsl("image/webp")) return MimeType(MimeType::WebP); if (mime == qsl("image/webp")) {
return MimeType(MimeType::Known::WebP);
} else if (mime == qsl("application/x-tdesktop-theme")) {
return MimeType(MimeType::Known::TDesktopTheme);
}
return MimeType(QMimeDatabase().mimeTypeForName(mime)); return MimeType(QMimeDatabase().mimeTypeForName(mime));
} }
MimeType mimeTypeForFile(const QFileInfo &file) { MimeType mimeTypeForFile(const QFileInfo &file) {
QString path = file.absoluteFilePath(); QString path = file.absoluteFilePath();
if (path.endsWith(qsl(".webp"), Qt::CaseInsensitive)) return MimeType(MimeType::WebP); if (path.endsWith(qsl(".webp"), Qt::CaseInsensitive)) {
return MimeType(MimeType::Known::WebP);
} else if (path.endsWith(qsl(".tdesktop-theme"), Qt::CaseInsensitive)) {
return MimeType(MimeType::Known::TDesktopTheme);
}
{ {
QFile f(path); QFile f(path);
if (f.open(QIODevice::ReadOnly)) { if (f.open(QIODevice::ReadOnly)) {
QByteArray magic = f.read(12); QByteArray magic = f.read(12);
if (magic.size() >= 12) { if (magic.size() >= 12) {
if (!memcmp(magic.constData(), "RIFF", 4) && !memcmp(magic.constData() + 8, "WEBP", 4)) { if (!memcmp(magic.constData(), "RIFF", 4) && !memcmp(magic.constData() + 8, "WEBP", 4)) {
return MimeType(MimeType::WebP); return MimeType(MimeType::Known::WebP);
} }
} }
f.close(); f.close();
@ -984,7 +995,7 @@ MimeType mimeTypeForFile(const QFileInfo &file) {
MimeType mimeTypeForData(const QByteArray &data) { MimeType mimeTypeForData(const QByteArray &data) {
if (data.size() >= 12) { if (data.size() >= 12) {
if (!memcmp(data.constData(), "RIFF", 4) && !memcmp(data.constData() + 8, "WEBP", 4)) { if (!memcmp(data.constData(), "RIFF", 4) && !memcmp(data.constData() + 8, "WEBP", 4)) {
return MimeType(MimeType::WebP); return MimeType(MimeType::Known::WebP);
} }
} }
return MimeType(QMimeDatabase().mimeTypeForData(data)); return MimeType(QMimeDatabase().mimeTypeForData(data));

View File

@ -429,24 +429,23 @@ inline QString strMakeFromLetters(const uint32 *letters, int32 len) {
class MimeType { class MimeType {
public: public:
enum class Known {
enum TypeEnum {
Unknown, Unknown,
TDesktopTheme,
WebP, WebP,
}; };
MimeType(const QMimeType &type) : _typeStruct(type), _type(Unknown) { MimeType(const QMimeType &type) : _typeStruct(type) {
} }
MimeType(TypeEnum type) : _type(type) { MimeType(Known type) : _type(type) {
} }
QStringList globPatterns() const; QStringList globPatterns() const;
QString filterString() const; QString filterString() const;
QString name() const; QString name() const;
private: private:
QMimeType _typeStruct; QMimeType _typeStruct;
TypeEnum _type; Known _type = Known::Unknown;
}; };

View File

@ -22,9 +22,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "core/utils.h" #include "core/utils.h"
#define BETA_VERSION_MACRO (10020007ULL) #define BETA_VERSION_MACRO (0ULL)
constexpr int AppVersion = 10020; constexpr int AppVersion = 10021;
constexpr str_const AppVersionStr = "0.10.20"; constexpr str_const AppVersionStr = "0.10.21";
constexpr bool AppAlphaVersion = false; constexpr bool AppAlphaVersion = true;
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO; constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;

View File

@ -91,10 +91,10 @@ namespace {
int32 documentMaxStatusWidth(DocumentData *document) { int32 documentMaxStatusWidth(DocumentData *document) {
int32 result = st::normalFont->width(formatDownloadText(document->size, document->size)); int32 result = st::normalFont->width(formatDownloadText(document->size, document->size));
if (SongData *song = document->song()) { if (auto song = document->song()) {
result = qMax(result, st::normalFont->width(formatPlayedText(song->duration, song->duration))); result = qMax(result, st::normalFont->width(formatPlayedText(song->duration, song->duration)));
result = qMax(result, st::normalFont->width(formatDurationAndSizeText(song->duration, document->size))); result = qMax(result, st::normalFont->width(formatDurationAndSizeText(song->duration, document->size)));
} else if (VoiceData *voice = document->voice()) { } else if (auto voice = document->voice()) {
result = qMax(result, st::normalFont->width(formatPlayedText(voice->duration, voice->duration))); result = qMax(result, st::normalFont->width(formatPlayedText(voice->duration, voice->duration)));
result = qMax(result, st::normalFont->width(formatDurationAndSizeText(voice->duration, document->size))); result = qMax(result, st::normalFont->width(formatDurationAndSizeText(voice->duration, document->size)));
} else if (document->isVideo()) { } else if (document->isVideo()) {
@ -1206,22 +1206,22 @@ void HistoryDocument::draw(Painter &p, const QRect &r, TextSelection selection,
auto namewidth = _width - nameleft - nameright; auto namewidth = _width - nameleft - nameright;
if (auto voice = Get<HistoryDocumentVoice>()) { if (auto voice = Get<HistoryDocumentVoice>()) {
const VoiceWaveform *wf = 0; const VoiceWaveform *wf = nullptr;
uchar norm_value = 0; uchar norm_value = 0;
if (_data->voice()) { if (_data->voice()) {
wf = &_data->voice()->waveform; wf = &_data->voice()->waveform;
if (wf->isEmpty()) { if (wf->isEmpty()) {
wf = 0; wf = nullptr;
if (loaded) { if (loaded) {
Local::countVoiceWaveform(_data); Local::countVoiceWaveform(_data);
} }
} else if (wf->at(0) < 0) { } else if (wf->at(0) < 0) {
wf = 0; wf = nullptr;
} else { } else {
norm_value = _data->voice()->wavemax; norm_value = _data->voice()->wavemax;
} }
} }
float64 prg = voice->_playback ? voice->_playback->a_progress.current() : 0; auto prg = voice->_playback ? voice->_playback->a_progress.current() : 0.;
// rescale waveform by going in waveform.size * bar_count 1D grid // rescale waveform by going in waveform.size * bar_count 1D grid
auto &active = outbg ? (selected ? st::msgWaveformOutActiveSelected : st::msgWaveformOutActive) : (selected ? st::msgWaveformInActiveSelected : st::msgWaveformInActive); auto &active = outbg ? (selected ? st::msgWaveformOutActiveSelected : st::msgWaveformOutActive) : (selected ? st::msgWaveformInActiveSelected : st::msgWaveformInActive);
@ -1232,7 +1232,8 @@ void HistoryDocument::draw(Painter &p, const QRect &r, TextSelection selection,
} }
int32 bar_count = qMin(availw / int32(st::msgWaveformBar + st::msgWaveformSkip), wf_size); int32 bar_count = qMin(availw / int32(st::msgWaveformBar + st::msgWaveformSkip), wf_size);
uchar max_value = 0; uchar max_value = 0;
int32 max_delta = st::msgWaveformMax - st::msgWaveformMin, bottom = st::msgFilePadding.top() + st::msgWaveformMax; auto max_delta = st::msgWaveformMax - st::msgWaveformMin;
auto bottom = st::msgFilePadding.top() - topMinus + st::msgWaveformMax;
p.setPen(Qt::NoPen); p.setPen(Qt::NoPen);
for (int32 i = 0, bar_x = 0, sum_i = 0; i < wf_size; ++i) { for (int32 i = 0, bar_x = 0, sum_i = 0; i < wf_size; ++i) {
uchar value = wf ? wf->at(i) : 0; uchar value = wf ? wf->at(i) : 0;

View File

@ -92,7 +92,7 @@ introStepHeight: 266px;
introStepHeightAdd: 30px; introStepHeightAdd: 30px;
introStepHeightFull: 590px; introStepHeightFull: 590px;
introSlideDuration: 200; introSlideDuration: 200;
introCoverDuration: 300; introCoverDuration: 200;
introNextButton: RoundButton(defaultActiveButton) { introNextButton: RoundButton(defaultActiveButton) {
width: 300px; width: 300px;

View File

@ -29,6 +29,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "ui/widgets/labels.h" #include "ui/widgets/labels.h"
#include "ui/effects/widget_fade_wrap.h" #include "ui/effects/widget_fade_wrap.h"
#include "core/click_handler_types.h" #include "core/click_handler_types.h"
#include "boxes/confirmbox.h"
namespace Intro { namespace Intro {
@ -210,7 +211,10 @@ bool PhoneWidget::phoneSubmitFail(const RPCError &error) {
stopCheck(); stopCheck();
_sentRequest = 0; _sentRequest = 0;
auto &err = error.type(); auto &err = error.type();
if (err == qstr("PHONE_NUMBER_INVALID")) { // show error if (err == qstr("PHONE_NUMBER_FLOOD")) {
Ui::show(Box<InformBox>(lang(lng_error_phone_flood)));
return true;
} else if (err == qstr("PHONE_NUMBER_INVALID")) { // show error
showPhoneError(lang(lng_bad_phone)); showPhoneError(lang(lng_bad_phone));
return true; return true;
} }

View File

@ -25,6 +25,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "styles/style_boxes.h" #include "styles/style_boxes.h"
#include "ui/filedialog.h" #include "ui/filedialog.h"
#include "boxes/photocropbox.h" #include "boxes/photocropbox.h"
#include "boxes/confirmbox.h"
#include "lang.h" #include "lang.h"
#include "application.h" #include "application.h"
#include "ui/widgets/buttons.h" #include "ui/widgets/buttons.h"
@ -170,7 +171,10 @@ bool SignupWidget::nameSubmitFail(const RPCError &error) {
stopCheck(); stopCheck();
auto &err = error.type(); auto &err = error.type();
if (err == qstr("PHONE_NUMBER_INVALID") || err == qstr("PHONE_CODE_EXPIRED") || if (err == qstr("PHONE_NUMBER_FLOOD")) {
Ui::show(Box<InformBox>(lang(lng_error_phone_flood)));
return true;
} else if (err == qstr("PHONE_NUMBER_INVALID") || err == qstr("PHONE_CODE_EXPIRED") ||
err == qstr("PHONE_CODE_EMPTY") || err == qstr("PHONE_CODE_INVALID") || err == qstr("PHONE_CODE_EMPTY") || err == qstr("PHONE_CODE_INVALID") ||
err == qstr("PHONE_NUMBER_OCCUPIED")) { err == qstr("PHONE_NUMBER_OCCUPIED")) {
goBack(); goBack();

View File

@ -3664,6 +3664,11 @@ bool readBackground() {
} }
_backgroundCanWrite = true; _backgroundCanWrite = true;
return true; return true;
} else if (id == Window::Theme::kThemeBackground && pngData.isEmpty()) {
_backgroundCanWrite = false;
Window::Theme::Background()->setImage(id);
_backgroundCanWrite = true;
return true;
} }
QImage image; QImage image;

View File

@ -509,6 +509,7 @@ void ChatBackground::keepApplied() {
_id = kThemeBackground; _id = kThemeBackground;
_themeImage = _image.toImage(); _themeImage = _image.toImage();
_themeTile = _tile; _themeTile = _tile;
writeNewBackgroundSettings();
} else if (_id == internal::kTestingDefaultBackground) { } else if (_id == internal::kTestingDefaultBackground) {
_id = kDefaultBackground; _id = kDefaultBackground;
_themeImage = QImage(); _themeImage = QImage();

View File

@ -1,6 +1,6 @@
AppVersion 10020 AppVersion 10021
AppVersionStrMajor 0.10 AppVersionStrMajor 0.10
AppVersionStrSmall 0.10.20 AppVersionStrSmall 0.10.21
AppVersionStr 0.10.20 AppVersionStr 0.10.21
AlphaChannel 0 AlphaChannel 1
BetaVersion 10020007 BetaVersion 0