Default background changed to green, "video file" -> "video" in lang.
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
@ -103,7 +103,7 @@ boxLabel: flatLabel(labelDefFlat) {
|
||||||
defaultLeftOutlineButton: OutlineButton {
|
defaultLeftOutlineButton: OutlineButton {
|
||||||
outlineWidth: 3px;
|
outlineWidth: 3px;
|
||||||
outlineFg: windowBg;
|
outlineFg: windowBg;
|
||||||
outlineFgOver: windowActiveFill;
|
outlineFgOver: windowActiveBg;
|
||||||
|
|
||||||
textBg: windowBg;
|
textBg: windowBg;
|
||||||
textBgOver: #f2f7fa;
|
textBgOver: #f2f7fa;
|
||||||
|
@ -180,7 +180,7 @@ defaultCheckbox: Checkbox {
|
||||||
checkBg: #ffffff;
|
checkBg: #ffffff;
|
||||||
checkFg: #b3b3b3;
|
checkFg: #b3b3b3;
|
||||||
checkFgOver: #b3b3b3;
|
checkFgOver: #b3b3b3;
|
||||||
checkFgActive: windowActiveFill;
|
checkFgActive: windowActiveBg;
|
||||||
|
|
||||||
width: -44px;
|
width: -44px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
|
@ -188,7 +188,7 @@ defaultCheckbox: Checkbox {
|
||||||
textPosition: point(32px, 2px);
|
textPosition: point(32px, 2px);
|
||||||
diameter: 22px;
|
diameter: 22px;
|
||||||
thickness: 2px;
|
thickness: 2px;
|
||||||
checkIcon: icon {{ "default_checkbox_check", #ffffff, point(4px, 7px) }};
|
checkIcon: icon {{ "default_checkbox_check", windowActiveFg, point(4px, 7px) }};
|
||||||
|
|
||||||
font: normalFont;
|
font: normalFont;
|
||||||
duration: 120;
|
duration: 120;
|
||||||
|
@ -655,7 +655,7 @@ msgFileThumbLinkOutFgSelected: #31a298;
|
||||||
msgFileNameTop: 16px;
|
msgFileNameTop: 16px;
|
||||||
msgFileStatusTop: 37px;
|
msgFileStatusTop: 37px;
|
||||||
msgFileMinWidth: 294px;
|
msgFileMinWidth: 294px;
|
||||||
msgFileInBg: windowActiveFill;
|
msgFileInBg: windowActiveBg;
|
||||||
msgFileInBgOver: #4eade3;
|
msgFileInBgOver: #4eade3;
|
||||||
msgFileInBgSelected: #51a3d3;
|
msgFileInBgSelected: #51a3d3;
|
||||||
msgFileOutBg: #78c67f;
|
msgFileOutBg: #78c67f;
|
||||||
|
@ -671,7 +671,7 @@ msgWaveformBar: 2px;
|
||||||
msgWaveformSkip: 1px;
|
msgWaveformSkip: 1px;
|
||||||
msgWaveformMin: 2px;
|
msgWaveformMin: 2px;
|
||||||
msgWaveformMax: 20px;
|
msgWaveformMax: 20px;
|
||||||
msgWaveformInActive: windowActiveFill;
|
msgWaveformInActive: windowActiveBg;
|
||||||
msgWaveformInActiveSelected: #51a3d3;
|
msgWaveformInActiveSelected: #51a3d3;
|
||||||
msgWaveformInInactive: #d4dee6;
|
msgWaveformInInactive: #d4dee6;
|
||||||
msgWaveformInInactiveSelected: #9cc1e1;
|
msgWaveformInInactiveSelected: #9cc1e1;
|
||||||
|
|
|
@ -23,19 +23,20 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
windowBg: #ffffff; // white: fallback for background
|
windowBg: #ffffff; // white: fallback for background
|
||||||
windowTextFg: #000000; // black: fallback for text color
|
windowTextFg: #000000; // black: fallback for text color
|
||||||
windowSubTextFg: #999999; // gray: fallback for subtext color
|
windowSubTextFg: #999999; // gray: fallback for subtext color
|
||||||
windowActiveFill: #40ace3; // bright blue: fallback for blue filled active areas
|
windowActiveBg: #40ace3; // bright blue: fallback for blue filled active areas
|
||||||
|
windowActiveFg: #ffffff; // text on bright blue: fallback for text on active areas
|
||||||
windowOverBg: #f0f0f0; // light gray: fallback for over background
|
windowOverBg: #f0f0f0; // light gray: fallback for over background
|
||||||
windowSubTextFgOver: #7c99b2; // gray over light blue: fallback for subtext over color
|
windowSubTextFgOver: #7c99b2; // gray over light blue: fallback for subtext over color
|
||||||
windowActiveTextFg: #1485c2; // online blue: fallback for active color
|
windowActiveTextFg: #2687bf; // online blue: fallback for active color
|
||||||
windowShadowFg: #000000; // black: fallback for shadow color
|
windowShadowFg: #000000; // black: fallback for shadow color
|
||||||
|
|
||||||
imageBg: #000000;
|
imageBg: #000000;
|
||||||
imageBgTransparent: #ffffff;
|
imageBgTransparent: #ffffff;
|
||||||
|
|
||||||
// widgets
|
// widgets
|
||||||
activeButtonBg: windowActiveFill;
|
activeButtonBg: windowActiveBg;
|
||||||
activeButtonBgOver: #46b4eb;
|
activeButtonBgOver: #46b4eb;
|
||||||
activeButtonFg: #ffffff;
|
activeButtonFg: windowActiveFg;
|
||||||
activeButtonFgOver: activeButtonFg;
|
activeButtonFgOver: activeButtonFg;
|
||||||
activeButtonSecondaryFg: #cceeff;
|
activeButtonSecondaryFg: #cceeff;
|
||||||
activeButtonSecondaryFgOver: activeButtonSecondaryFg;
|
activeButtonSecondaryFgOver: activeButtonSecondaryFg;
|
||||||
|
@ -45,7 +46,8 @@ lightButtonBgOver: #edf7ff;
|
||||||
lightButtonFg: #2b99d5;
|
lightButtonFg: #2b99d5;
|
||||||
lightButtonFgOver: lightButtonFg;
|
lightButtonFgOver: lightButtonFg;
|
||||||
|
|
||||||
menuIconFg: windowSubTextFg;
|
menuIconFg: #a8a8a8;
|
||||||
|
menuIconFgOver: #999999;
|
||||||
|
|
||||||
// custom title bar for Windows
|
// custom title bar for Windows
|
||||||
titleBg: windowOverBg;
|
titleBg: windowOverBg;
|
||||||
|
@ -95,7 +97,7 @@ settingsCloseFgOver: cancelIconFgOver;
|
||||||
|
|
||||||
notificationsBoxMonitorFg: windowTextFg;
|
notificationsBoxMonitorFg: windowTextFg;
|
||||||
|
|
||||||
notificationSampleUserpicFg: windowActiveFill;
|
notificationSampleUserpicFg: windowActiveBg;
|
||||||
notificationSampleCloseFg: #d7d7d7 | windowSubTextFg;
|
notificationSampleCloseFg: #d7d7d7 | windowSubTextFg;
|
||||||
notificationSampleTextFg: #d7d7d7 | windowSubTextFg;
|
notificationSampleTextFg: #d7d7d7 | windowSubTextFg;
|
||||||
notificationSampleNameFg: #939393 | windowSubTextFg;
|
notificationSampleNameFg: #939393 | windowSubTextFg;
|
||||||
|
@ -106,6 +108,7 @@ introErrorFg: windowTextFg;
|
||||||
|
|
||||||
// dialogs
|
// dialogs
|
||||||
dialogsMenuIconFg: menuIconFg;
|
dialogsMenuIconFg: menuIconFg;
|
||||||
|
dialogsMenuIconFgOver: menuIconFgOver;
|
||||||
|
|
||||||
dialogsBg: windowBg;
|
dialogsBg: windowBg;
|
||||||
dialogsNameFg: #373737;
|
dialogsNameFg: #373737;
|
||||||
|
@ -118,7 +121,7 @@ dialogsVerifiedIconBg: #4abcf1;
|
||||||
dialogsVerifiedIconFg: #ffffff;
|
dialogsVerifiedIconFg: #ffffff;
|
||||||
dialogsSendingIconFg: #c1c1c1;
|
dialogsSendingIconFg: #c1c1c1;
|
||||||
dialogsSentIconFg: #5dc452;
|
dialogsSentIconFg: #5dc452;
|
||||||
dialogsUnreadBg: windowActiveFill;
|
dialogsUnreadBg: windowActiveBg;
|
||||||
dialogsUnreadBgMuted: #bbbbbb;
|
dialogsUnreadBgMuted: #bbbbbb;
|
||||||
dialogsUnreadFg: #ffffff;
|
dialogsUnreadFg: #ffffff;
|
||||||
|
|
||||||
|
@ -137,22 +140,23 @@ dialogsUnreadBgOver: dialogsUnreadBg;
|
||||||
dialogsUnreadBgMutedOver: dialogsUnreadBgMuted;
|
dialogsUnreadBgMutedOver: dialogsUnreadBgMuted;
|
||||||
dialogsUnreadFgOver: dialogsUnreadFg;
|
dialogsUnreadFgOver: dialogsUnreadFg;
|
||||||
|
|
||||||
dialogsBgActive: dialogsBgOver;
|
dialogsBgActive: #419fd9;
|
||||||
dialogsNameFgActive: dialogsNameFgOver;
|
dialogsNameFgActive: windowActiveFg;
|
||||||
dialogsChatIconFgActive: dialogsNameFgActive;
|
dialogsChatIconFgActive: dialogsNameFgActive;
|
||||||
dialogsDateFgActive: dialogsDateFgOver;
|
dialogsDateFgActive: windowActiveFg;
|
||||||
dialogsTextFgActive: dialogsTextFgOver;
|
dialogsTextFgActive: windowActiveFg;
|
||||||
dialogsTextFgServiceActive: dialogsTextFgServiceOver;
|
dialogsTextFgServiceActive: dialogsTextFgActive;
|
||||||
dialogsDraftFgActive: dialogsDraftFgOver;
|
dialogsDraftFgActive: #c6e1f7;
|
||||||
dialogsVerifiedIconBgActive: dialogsVerifiedIconBgOver;
|
dialogsVerifiedIconBgActive: dialogsTextFgActive;
|
||||||
dialogsVerifiedIconFgActive: dialogsVerifiedIconFgOver;
|
dialogsVerifiedIconFgActive: dialogsBgActive;
|
||||||
dialogsSendingIconFgActive: dialogsSendingIconFgOver;
|
dialogsSendingIconFgActive: #ffffff99;
|
||||||
dialogsSentIconFgActive: dialogsSentIconFgOver;
|
dialogsSentIconFgActive: dialogsTextFgActive;
|
||||||
dialogsUnreadBgActive: dialogsUnreadBgOver;
|
dialogsUnreadBgActive: dialogsTextFgActive;
|
||||||
dialogsUnreadBgMutedActive: dialogsUnreadBgMutedOver;
|
dialogsUnreadBgMutedActive: #d3e2ee;
|
||||||
dialogsUnreadFgActive: dialogsUnreadFgOver;
|
dialogsUnreadFgActive: dialogsBgActive;
|
||||||
|
|
||||||
dialogsForwardFg: #ffffff;
|
dialogsForwardBg: dialogsBgActive;
|
||||||
|
dialogsForwardFg: dialogsNameFgActive;
|
||||||
|
|
||||||
// history
|
// history
|
||||||
topBarBg: windowBg;
|
topBarBg: windowBg;
|
||||||
|
@ -163,8 +167,8 @@ emojiPanHeaderFg: #999999 | windowSubTextFg;
|
||||||
emojiPanHeaderBg: #fffffff2 | emojiPanBg;
|
emojiPanHeaderBg: #fffffff2 | emojiPanBg;
|
||||||
|
|
||||||
historyComposeAreaBg: windowBg;
|
historyComposeAreaBg: windowBg;
|
||||||
historyComposeIconFg: #cccccc;
|
historyComposeIconFg: menuIconFg;
|
||||||
historyComposeIconFgOver: #bebebe;
|
historyComposeIconFgOver: menuIconFgOver;
|
||||||
historyPinnedBg: historyComposeAreaBg;
|
historyPinnedBg: historyComposeAreaBg;
|
||||||
historyReplyBg: historyComposeAreaBg;
|
historyReplyBg: historyComposeAreaBg;
|
||||||
historyReplyCancelIconFg: cancelIconFg;
|
historyReplyCancelIconFg: cancelIconFg;
|
||||||
|
@ -172,7 +176,6 @@ historyReplyCancelIconFgOver: cancelIconFgOver;
|
||||||
|
|
||||||
historySendBg: historyComposeAreaBg;
|
historySendBg: historyComposeAreaBg;
|
||||||
historySendBgOver: #f5f5f5 | historySendBg;
|
historySendBgOver: #f5f5f5 | historySendBg;
|
||||||
historyMenuItemBgOver: historySendBgOver;
|
|
||||||
|
|
||||||
historyTextInFg: windowTextFg;
|
historyTextInFg: windowTextFg;
|
||||||
historyTextOutFg: windowTextFg;
|
historyTextOutFg: windowTextFg;
|
||||||
|
|
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 450 B |
|
@ -473,8 +473,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
"lng_profile_no_media" = "No media in this conversation.";
|
"lng_profile_no_media" = "No media in this conversation.";
|
||||||
"lng_profile_photos" = "{count:_not_used_|# photo|# photos}";
|
"lng_profile_photos" = "{count:_not_used_|# photo|# photos}";
|
||||||
"lng_profile_photos_header" = "Photos overview";
|
"lng_profile_photos_header" = "Photos overview";
|
||||||
"lng_profile_videos" = "{count:_not_used_|# video file|# video files}";
|
"lng_profile_videos" = "{count:_not_used_|# video|# videos}";
|
||||||
"lng_profile_videos_header" = "Video files overview";
|
"lng_profile_videos_header" = "Videos overview";
|
||||||
"lng_profile_songs" = "{count:_not_used_|# audio file|# audio files}";
|
"lng_profile_songs" = "{count:_not_used_|# audio file|# audio files}";
|
||||||
"lng_profile_songs_header" = "Audio files overview";
|
"lng_profile_songs_header" = "Audio files overview";
|
||||||
"lng_profile_files" = "{count:_not_used_|# file|# files}";
|
"lng_profile_files" = "{count:_not_used_|# file|# files}";
|
||||||
|
@ -582,7 +582,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
"lng_action_pinned_message" = "{from} pinned «{text}»";
|
"lng_action_pinned_message" = "{from} pinned «{text}»";
|
||||||
"lng_action_pinned_media" = "{from} pinned {media}";
|
"lng_action_pinned_media" = "{from} pinned {media}";
|
||||||
"lng_action_pinned_media_photo" = "a photo";
|
"lng_action_pinned_media_photo" = "a photo";
|
||||||
"lng_action_pinned_media_video" = "a video file";
|
"lng_action_pinned_media_video" = "a video";
|
||||||
"lng_action_pinned_media_audio" = "an audio file";
|
"lng_action_pinned_media_audio" = "an audio file";
|
||||||
"lng_action_pinned_media_voice" = "a voice message";
|
"lng_action_pinned_media_voice" = "a voice message";
|
||||||
"lng_action_pinned_media_file" = "a file";
|
"lng_action_pinned_media_file" = "a file";
|
||||||
|
@ -666,7 +666,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
"lng_media_type" = "Media type";
|
"lng_media_type" = "Media type";
|
||||||
"lng_media_type_photos" = "Photos";
|
"lng_media_type_photos" = "Photos";
|
||||||
"lng_media_type_videos" = "Video files";
|
"lng_media_type_videos" = "Videos";
|
||||||
"lng_media_type_songs" = "Audio files";
|
"lng_media_type_songs" = "Audio files";
|
||||||
"lng_media_type_files" = "Files";
|
"lng_media_type_files" = "Files";
|
||||||
"lng_media_type_audios" = "Voice messages";
|
"lng_media_type_audios" = "Voice messages";
|
||||||
|
@ -675,7 +675,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
"lng_media_open_with" = "Open With";
|
"lng_media_open_with" = "Open With";
|
||||||
"lng_media_download" = "Download";
|
"lng_media_download" = "Download";
|
||||||
"lng_media_cancel" = "Cancel";
|
"lng_media_cancel" = "Cancel";
|
||||||
"lng_media_video" = "Video file";
|
"lng_media_video" = "Video";
|
||||||
"lng_media_audio" = "Voice message";
|
"lng_media_audio" = "Voice message";
|
||||||
|
|
||||||
"lng_media_auto_settings" = "Automatic media download settings";
|
"lng_media_auto_settings" = "Automatic media download settings";
|
||||||
|
@ -730,7 +730,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
"lng_stickers_masks_pack" = "This is a pack of mask stickers. You can use them in the photo editor on our mobile apps.";
|
"lng_stickers_masks_pack" = "This is a pack of mask stickers. You can use them in the photo editor on our mobile apps.";
|
||||||
|
|
||||||
"lng_in_dlg_photo" = "Photo";
|
"lng_in_dlg_photo" = "Photo";
|
||||||
"lng_in_dlg_video" = "Video file";
|
"lng_in_dlg_video" = "Video";
|
||||||
"lng_in_dlg_audio_file" = "Audio file";
|
"lng_in_dlg_audio_file" = "Audio file";
|
||||||
"lng_in_dlg_contact" = "Contact";
|
"lng_in_dlg_contact" = "Contact";
|
||||||
"lng_in_dlg_audio" = "Voice message";
|
"lng_in_dlg_audio" = "Voice message";
|
||||||
|
@ -825,7 +825,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
"lng_maps_point" = "Location";
|
"lng_maps_point" = "Location";
|
||||||
"lng_save_photo" = "Save image";
|
"lng_save_photo" = "Save image";
|
||||||
"lng_save_video" = "Save video file";
|
"lng_save_video" = "Save video";
|
||||||
"lng_save_audio_file" = "Save audio file";
|
"lng_save_audio_file" = "Save audio file";
|
||||||
"lng_save_audio" = "Save voice message";
|
"lng_save_audio" = "Save voice message";
|
||||||
"lng_save_file" = "Save file";
|
"lng_save_file" = "Save file";
|
||||||
|
@ -853,7 +853,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
"lng_context_cancel_download" = "Cancel Download";
|
"lng_context_cancel_download" = "Cancel Download";
|
||||||
"lng_context_show_in_folder" = "Show in Folder";
|
"lng_context_show_in_folder" = "Show in Folder";
|
||||||
"lng_context_show_in_finder" = "Show in Finder";
|
"lng_context_show_in_finder" = "Show in Finder";
|
||||||
"lng_context_save_video" = "Save Video File As...";
|
"lng_context_save_video" = "Save Video As...";
|
||||||
"lng_context_save_audio_file" = "Save Audio File As...";
|
"lng_context_save_audio_file" = "Save Audio File As...";
|
||||||
"lng_context_save_audio" = "Save Voice Message As...";
|
"lng_context_save_audio" = "Save Voice Message As...";
|
||||||
"lng_context_pack_info" = "Pack Info";
|
"lng_context_pack_info" = "Pack Info";
|
||||||
|
|
|
@ -24,16 +24,17 @@
|
||||||
windowBg: #ffffff;
|
windowBg: #ffffff;
|
||||||
windowTextFg: #000000;
|
windowTextFg: #000000;
|
||||||
windowSubTextFg: #999999;
|
windowSubTextFg: #999999;
|
||||||
windowActiveFill: #40ace3;
|
windowActiveBg: #40ace3;
|
||||||
|
windowActiveFg: #ffffff;
|
||||||
windowOverBg: #f0f0f0;
|
windowOverBg: #f0f0f0;
|
||||||
windowSubTextFgOver: #7c99b2;
|
windowSubTextFgOver: #7c99b2;
|
||||||
windowActiveTextFg: #1485c2;
|
windowActiveTextFg: #2687bf;
|
||||||
windowShadowFg: #000000;
|
windowShadowFg: #000000;
|
||||||
imageBg: #000000;
|
imageBg: #000000;
|
||||||
imageBgTransparent: #ffffff;
|
imageBgTransparent: #ffffff;
|
||||||
activeButtonBg: windowActiveFill;
|
activeButtonBg: windowActiveBg;
|
||||||
activeButtonBgOver: #46b4eb;
|
activeButtonBgOver: #46b4eb;
|
||||||
activeButtonFg: #ffffff;
|
activeButtonFg: windowActiveFg;
|
||||||
activeButtonFgOver: activeButtonFg;
|
activeButtonFgOver: activeButtonFg;
|
||||||
activeButtonSecondaryFg: #cceeff;
|
activeButtonSecondaryFg: #cceeff;
|
||||||
activeButtonSecondaryFgOver: activeButtonSecondaryFg;
|
activeButtonSecondaryFgOver: activeButtonSecondaryFg;
|
||||||
|
@ -41,7 +42,8 @@ lightButtonBg: windowBg;
|
||||||
lightButtonBgOver: #edf7ff;
|
lightButtonBgOver: #edf7ff;
|
||||||
lightButtonFg: #2b99d5;
|
lightButtonFg: #2b99d5;
|
||||||
lightButtonFgOver: lightButtonFg;
|
lightButtonFgOver: lightButtonFg;
|
||||||
menuIconFg: windowSubTextFg;
|
menuIconFg: #a8a8a8;
|
||||||
|
menuIconFgOver: #999999;
|
||||||
titleBg: windowOverBg;
|
titleBg: windowOverBg;
|
||||||
titleShadow: #00000003;
|
titleShadow: #00000003;
|
||||||
titleButtonFg: #ababab;
|
titleButtonFg: #ababab;
|
||||||
|
@ -75,13 +77,14 @@ settingsFixedBarBg: boxBg;
|
||||||
settingsCloseFg: cancelIconFg;
|
settingsCloseFg: cancelIconFg;
|
||||||
settingsCloseFgOver: cancelIconFgOver;
|
settingsCloseFgOver: cancelIconFgOver;
|
||||||
notificationsBoxMonitorFg: windowTextFg;
|
notificationsBoxMonitorFg: windowTextFg;
|
||||||
notificationSampleUserpicFg: windowActiveFill;
|
notificationSampleUserpicFg: windowActiveBg;
|
||||||
notificationSampleCloseFg: #d7d7d7; // windowSubTextFg;
|
notificationSampleCloseFg: #d7d7d7; // windowSubTextFg;
|
||||||
notificationSampleTextFg: #d7d7d7; // windowSubTextFg;
|
notificationSampleTextFg: #d7d7d7; // windowSubTextFg;
|
||||||
notificationSampleNameFg: #939393; // windowSubTextFg;
|
notificationSampleNameFg: #939393; // windowSubTextFg;
|
||||||
introHeaderFg: windowTextFg;
|
introHeaderFg: windowTextFg;
|
||||||
introErrorFg: windowTextFg;
|
introErrorFg: windowTextFg;
|
||||||
dialogsMenuIconFg: menuIconFg;
|
dialogsMenuIconFg: menuIconFg;
|
||||||
|
dialogsMenuIconFgOver: menuIconFgOver;
|
||||||
dialogsBg: windowBg;
|
dialogsBg: windowBg;
|
||||||
dialogsNameFg: #373737;
|
dialogsNameFg: #373737;
|
||||||
dialogsChatIconFg: dialogsNameFg;
|
dialogsChatIconFg: dialogsNameFg;
|
||||||
|
@ -93,7 +96,7 @@ dialogsVerifiedIconBg: #4abcf1;
|
||||||
dialogsVerifiedIconFg: #ffffff;
|
dialogsVerifiedIconFg: #ffffff;
|
||||||
dialogsSendingIconFg: #c1c1c1;
|
dialogsSendingIconFg: #c1c1c1;
|
||||||
dialogsSentIconFg: #5dc452;
|
dialogsSentIconFg: #5dc452;
|
||||||
dialogsUnreadBg: windowActiveFill;
|
dialogsUnreadBg: windowActiveBg;
|
||||||
dialogsUnreadBgMuted: #bbbbbb;
|
dialogsUnreadBgMuted: #bbbbbb;
|
||||||
dialogsUnreadFg: #ffffff;
|
dialogsUnreadFg: #ffffff;
|
||||||
dialogsBgOver: windowOverBg;
|
dialogsBgOver: windowOverBg;
|
||||||
|
@ -110,36 +113,36 @@ dialogsSentIconFgOver: dialogsSentIconFg;
|
||||||
dialogsUnreadBgOver: dialogsUnreadBg;
|
dialogsUnreadBgOver: dialogsUnreadBg;
|
||||||
dialogsUnreadBgMutedOver: dialogsUnreadBgMuted;
|
dialogsUnreadBgMutedOver: dialogsUnreadBgMuted;
|
||||||
dialogsUnreadFgOver: dialogsUnreadFg;
|
dialogsUnreadFgOver: dialogsUnreadFg;
|
||||||
dialogsBgActive: dialogsBgOver;
|
dialogsBgActive: #419fd9;
|
||||||
dialogsNameFgActive: dialogsNameFgOver;
|
dialogsNameFgActive: windowActiveFg;
|
||||||
dialogsChatIconFgActive: dialogsNameFgActive;
|
dialogsChatIconFgActive: dialogsNameFgActive;
|
||||||
dialogsDateFgActive: dialogsDateFgOver;
|
dialogsDateFgActive: windowActiveFg;
|
||||||
dialogsTextFgActive: dialogsTextFgOver;
|
dialogsTextFgActive: windowActiveFg;
|
||||||
dialogsTextFgServiceActive: dialogsTextFgServiceOver;
|
dialogsTextFgServiceActive: dialogsTextFgActive;
|
||||||
dialogsDraftFgActive: dialogsDraftFgOver;
|
dialogsDraftFgActive: #c6e1f7;
|
||||||
dialogsVerifiedIconBgActive: dialogsVerifiedIconBgOver;
|
dialogsVerifiedIconBgActive: dialogsTextFgActive;
|
||||||
dialogsVerifiedIconFgActive: dialogsVerifiedIconFgOver;
|
dialogsVerifiedIconFgActive: dialogsBgActive;
|
||||||
dialogsSendingIconFgActive: dialogsSendingIconFgOver;
|
dialogsSendingIconFgActive: #ffffff99;
|
||||||
dialogsSentIconFgActive: dialogsSentIconFgOver;
|
dialogsSentIconFgActive: dialogsTextFgActive;
|
||||||
dialogsUnreadBgActive: dialogsUnreadBgOver;
|
dialogsUnreadBgActive: dialogsTextFgActive;
|
||||||
dialogsUnreadBgMutedActive: dialogsUnreadBgMutedOver;
|
dialogsUnreadBgMutedActive: #d3e2ee;
|
||||||
dialogsUnreadFgActive: dialogsUnreadFgOver;
|
dialogsUnreadFgActive: dialogsBgActive;
|
||||||
dialogsForwardFg: #ffffff;
|
dialogsForwardBg: dialogsBgActive;
|
||||||
|
dialogsForwardFg: dialogsNameFgActive;
|
||||||
topBarBg: windowBg;
|
topBarBg: windowBg;
|
||||||
emojiPanBg: windowBg;
|
emojiPanBg: windowBg;
|
||||||
emojiPanCategories: #f7f7f7; // windowBg;
|
emojiPanCategories: #f7f7f7; // windowBg;
|
||||||
emojiPanHeaderFg: windowSubTextFg;
|
emojiPanHeaderFg: windowSubTextFg;
|
||||||
emojiPanHeaderBg: #fffffff2; // emojiPanBg;
|
emojiPanHeaderBg: #fffffff2; // emojiPanBg;
|
||||||
historyComposeAreaBg: windowBg;
|
historyComposeAreaBg: windowBg;
|
||||||
historyComposeIconFg: #cccccc;
|
historyComposeIconFg: menuIconFg;
|
||||||
historyComposeIconFgOver: #bebebe;
|
historyComposeIconFgOver: menuIconFgOver;
|
||||||
historyPinnedBg: historyComposeAreaBg;
|
historyPinnedBg: historyComposeAreaBg;
|
||||||
historyReplyBg: historyComposeAreaBg;
|
historyReplyBg: historyComposeAreaBg;
|
||||||
historyReplyCancelIconFg: cancelIconFg;
|
historyReplyCancelIconFg: cancelIconFg;
|
||||||
historyReplyCancelIconFgOver: cancelIconFgOver;
|
historyReplyCancelIconFgOver: cancelIconFgOver;
|
||||||
historySendBg: historyComposeAreaBg;
|
historySendBg: historyComposeAreaBg;
|
||||||
historySendBgOver: #f5f5f5; // historySendBg;
|
historySendBgOver: #f5f5f5; // historySendBg;
|
||||||
historyMenuItemBgOver: historySendBgOver;
|
|
||||||
historyTextInFg: windowTextFg;
|
historyTextInFg: windowTextFg;
|
||||||
historyTextOutFg: windowTextFg;
|
historyTextOutFg: windowTextFg;
|
||||||
historyCaptionInFg: historyTextInFg;
|
historyCaptionInFg: historyTextInFg;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<file>art/fonts/OpenSans-Semibold.ttf</file>
|
<file>art/fonts/OpenSans-Semibold.ttf</file>
|
||||||
<file>art/newmsg.wav</file>
|
<file>art/newmsg.wav</file>
|
||||||
<file>art/bg.jpg</file>
|
<file>art/bg.jpg</file>
|
||||||
<file>art/bg_old.png</file>
|
<file>art/bg_initial.png</file>
|
||||||
<file>art/icon256.png</file>
|
<file>art/icon256.png</file>
|
||||||
<file>art/iconbig256.png</file>
|
<file>art/iconbig256.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
|
|
@ -56,79 +56,83 @@ QString countBetaVersionSignature(quint64 version);
|
||||||
typedef unsigned char uchar;
|
typedef unsigned char uchar;
|
||||||
typedef unsigned int uint32;
|
typedef unsigned int uint32;
|
||||||
typedef signed int int32;
|
typedef signed int int32;
|
||||||
|
|
||||||
namespace{
|
namespace{
|
||||||
inline uint32 sha1Shift(uint32 v, uint32 shift) {
|
|
||||||
return ((v << shift) | (v >> (32 - shift)));
|
|
||||||
}
|
|
||||||
void sha1PartHash(uint32 *sha, uint32 *temp)
|
|
||||||
{
|
|
||||||
uint32 a = sha[0], b = sha[1], c = sha[2], d = sha[3], e = sha[4], round = 0;
|
|
||||||
|
|
||||||
#define _shiftswap(f, v) { \
|
inline uint32 sha1Shift(uint32 v, uint32 shift) {
|
||||||
uint32 t = sha1Shift(a, 5) + (f) + e + v + temp[round]; \
|
return ((v << shift) | (v >> (32 - shift)));
|
||||||
e = d; \
|
|
||||||
d = c; \
|
|
||||||
c = sha1Shift(b, 30); \
|
|
||||||
b = a; \
|
|
||||||
a = t; \
|
|
||||||
++round; \
|
|
||||||
}
|
|
||||||
#define _shiftshiftswap(f, v) { \
|
|
||||||
temp[round] = sha1Shift((temp[round - 3] ^ temp[round - 8] ^ temp[round - 14] ^ temp[round - 16]), 1); \
|
|
||||||
_shiftswap(f, v) \
|
|
||||||
}
|
|
||||||
|
|
||||||
while (round < 16) _shiftswap((b & c) | (~b & d), 0x5a827999)
|
|
||||||
while (round < 20) _shiftshiftswap((b & c) | (~b & d), 0x5a827999)
|
|
||||||
while (round < 40) _shiftshiftswap(b ^ c ^ d, 0x6ed9eba1)
|
|
||||||
while (round < 60) _shiftshiftswap((b & c) | (b & d) | (c & d), 0x8f1bbcdc)
|
|
||||||
while (round < 80) _shiftshiftswap(b ^ c ^ d, 0xca62c1d6)
|
|
||||||
|
|
||||||
#undef _shiftshiftswap
|
|
||||||
#undef _shiftswap
|
|
||||||
|
|
||||||
sha[0] += a;
|
|
||||||
sha[1] += b;
|
|
||||||
sha[2] += c;
|
|
||||||
sha[3] += d;
|
|
||||||
sha[4] += e;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sha1PartHash(uint32 *sha, uint32 *temp) {
|
||||||
|
uint32 a = sha[0], b = sha[1], c = sha[2], d = sha[3], e = sha[4], round = 0;
|
||||||
|
|
||||||
|
#define _shiftswap(f, v) { \
|
||||||
|
uint32 t = sha1Shift(a, 5) + (f) + e + v + temp[round]; \
|
||||||
|
e = d; \
|
||||||
|
d = c; \
|
||||||
|
c = sha1Shift(b, 30); \
|
||||||
|
b = a; \
|
||||||
|
a = t; \
|
||||||
|
++round; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _shiftshiftswap(f, v) { \
|
||||||
|
temp[round] = sha1Shift((temp[round - 3] ^ temp[round - 8] ^ temp[round - 14] ^ temp[round - 16]), 1); \
|
||||||
|
_shiftswap(f, v) \
|
||||||
|
}
|
||||||
|
|
||||||
|
while (round < 16) _shiftswap((b & c) | (~b & d), 0x5a827999)
|
||||||
|
while (round < 20) _shiftshiftswap((b & c) | (~b & d), 0x5a827999)
|
||||||
|
while (round < 40) _shiftshiftswap(b ^ c ^ d, 0x6ed9eba1)
|
||||||
|
while (round < 60) _shiftshiftswap((b & c) | (b & d) | (c & d), 0x8f1bbcdc)
|
||||||
|
while (round < 80) _shiftshiftswap(b ^ c ^ d, 0xca62c1d6)
|
||||||
|
|
||||||
|
#undef _shiftshiftswap
|
||||||
|
#undef _shiftswap
|
||||||
|
|
||||||
|
sha[0] += a;
|
||||||
|
sha[1] += b;
|
||||||
|
sha[2] += c;
|
||||||
|
sha[3] += d;
|
||||||
|
sha[4] += e;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
int32 *hashSha1(const void *data, uint32 len, void *dest) {
|
int32 *hashSha1(const void *data, uint32 len, void *dest) {
|
||||||
const uchar *buf = (const uchar *)data;
|
const uchar *buf = (const uchar *)data;
|
||||||
|
|
||||||
uint32 temp[80], block = 0, end;
|
uint32 temp[80], block = 0, end;
|
||||||
uint32 sha[5] = {0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0};
|
uint32 sha[5] = {0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0};
|
||||||
for (end = block + 64; block + 64 <= len; end = block + 64) {
|
for (end = block + 64; block + 64 <= len; end = block + 64) {
|
||||||
for (uint32 i = 0; block < end; block += 4) {
|
for (uint32 i = 0; block < end; block += 4) {
|
||||||
temp[i++] = (uint32) buf[block + 3]
|
temp[i++] = (uint32) buf[block + 3]
|
||||||
| (((uint32) buf[block + 2]) << 8)
|
| (((uint32) buf[block + 2]) << 8)
|
||||||
| (((uint32) buf[block + 1]) << 16)
|
| (((uint32) buf[block + 1]) << 16)
|
||||||
| (((uint32) buf[block]) << 24);
|
| (((uint32) buf[block]) << 24);
|
||||||
}
|
}
|
||||||
sha1PartHash(sha, temp);
|
sha1PartHash(sha, temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
end = len - block;
|
end = len - block;
|
||||||
memset(temp, 0, sizeof(uint32) * 16);
|
memset(temp, 0, sizeof(uint32) * 16);
|
||||||
uint32 last = 0;
|
uint32 last = 0;
|
||||||
for (; last < end; ++last) {
|
for (; last < end; ++last) {
|
||||||
temp[last >> 2] |= (uint32)buf[last + block] << ((3 - (last & 0x03)) << 3);
|
temp[last >> 2] |= (uint32)buf[last + block] << ((3 - (last & 0x03)) << 3);
|
||||||
}
|
}
|
||||||
temp[last >> 2] |= 0x80 << ((3 - (last & 3)) << 3);
|
temp[last >> 2] |= 0x80 << ((3 - (last & 3)) << 3);
|
||||||
if (end >= 56) {
|
if (end >= 56) {
|
||||||
sha1PartHash(sha, temp);
|
sha1PartHash(sha, temp);
|
||||||
memset(temp, 0, sizeof(uint32) * 16);
|
memset(temp, 0, sizeof(uint32) * 16);
|
||||||
}
|
}
|
||||||
temp[15] = len << 3;
|
temp[15] = len << 3;
|
||||||
sha1PartHash(sha, temp);
|
sha1PartHash(sha, temp);
|
||||||
|
|
||||||
uchar *sha1To = (uchar*)dest;
|
uchar *sha1To = (uchar*)dest;
|
||||||
|
|
||||||
for (int32 i = 19; i >= 0; --i) {
|
for (int32 i = 19; i >= 0; --i) {
|
||||||
sha1To[i] = (sha[i >> 2] >> (((3 - i) & 0x03) << 3)) & 0xFF;
|
sha1To[i] = (sha[i >> 2] >> (((3 - i) & 0x03) << 3)) & 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int32*)sha1To;
|
return (int32*)sha1To;
|
||||||
}
|
}
|
||||||
|
|
|
@ -468,13 +468,13 @@ static const WCHAR *_exeName = L"Updater.exe";
|
||||||
LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter = 0;
|
LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter = 0;
|
||||||
|
|
||||||
typedef BOOL (FAR STDAPICALLTYPE *t_miniDumpWriteDump)(
|
typedef BOOL (FAR STDAPICALLTYPE *t_miniDumpWriteDump)(
|
||||||
_In_ HANDLE hProcess,
|
_In_ HANDLE hProcess,
|
||||||
_In_ DWORD ProcessId,
|
_In_ DWORD ProcessId,
|
||||||
_In_ HANDLE hFile,
|
_In_ HANDLE hFile,
|
||||||
_In_ MINIDUMP_TYPE DumpType,
|
_In_ MINIDUMP_TYPE DumpType,
|
||||||
_In_opt_ PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
|
_In_opt_ PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
|
||||||
_In_opt_ PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
|
_In_opt_ PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
|
||||||
_In_opt_ PMINIDUMP_CALLBACK_INFORMATION CallbackParam
|
_In_opt_ PMINIDUMP_CALLBACK_INFORMATION CallbackParam
|
||||||
);
|
);
|
||||||
t_miniDumpWriteDump miniDumpWriteDump = 0;
|
t_miniDumpWriteDump miniDumpWriteDump = 0;
|
||||||
|
|
||||||
|
@ -483,7 +483,7 @@ HANDLE _generateDumpFileAtPath(const WCHAR *path) {
|
||||||
|
|
||||||
WCHAR szPath[maxFileLen];
|
WCHAR szPath[maxFileLen];
|
||||||
wsprintf(szPath, L"%stdata\\", path);
|
wsprintf(szPath, L"%stdata\\", path);
|
||||||
if (!CreateDirectory(szPath, NULL)) {
|
if (!CreateDirectory(szPath, NULL)) {
|
||||||
if (GetLastError() != ERROR_ALREADY_EXISTS) {
|
if (GetLastError() != ERROR_ALREADY_EXISTS) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -495,7 +495,7 @@ HANDLE _generateDumpFileAtPath(const WCHAR *path) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WCHAR szFileName[maxFileLen];
|
WCHAR szFileName[maxFileLen];
|
||||||
WCHAR szExeName[maxFileLen];
|
WCHAR szExeName[maxFileLen];
|
||||||
|
|
||||||
wcscpy_s(szExeName, _exeName);
|
wcscpy_s(szExeName, _exeName);
|
||||||
|
@ -504,16 +504,16 @@ HANDLE _generateDumpFileAtPath(const WCHAR *path) {
|
||||||
wsprintf(dotFrom, L"");
|
wsprintf(dotFrom, L"");
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSTEMTIME stLocalTime;
|
SYSTEMTIME stLocalTime;
|
||||||
|
|
||||||
GetLocalTime(&stLocalTime);
|
GetLocalTime(&stLocalTime);
|
||||||
|
|
||||||
wsprintf(szFileName, L"%s%s-%s-%04d%02d%02d-%02d%02d%02d-%ld-%ld.dmp",
|
wsprintf(szFileName, L"%s%s-%s-%04d%02d%02d-%02d%02d%02d-%ld-%ld.dmp",
|
||||||
szPath, szExeName, updaterVersionStr,
|
szPath, szExeName, updaterVersionStr,
|
||||||
stLocalTime.wYear, stLocalTime.wMonth, stLocalTime.wDay,
|
stLocalTime.wYear, stLocalTime.wMonth, stLocalTime.wDay,
|
||||||
stLocalTime.wHour, stLocalTime.wMinute, stLocalTime.wSecond,
|
stLocalTime.wHour, stLocalTime.wMinute, stLocalTime.wSecond,
|
||||||
GetCurrentProcessId(), GetCurrentThreadId());
|
GetCurrentProcessId(), GetCurrentThreadId());
|
||||||
return CreateFile(szFileName, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0);
|
return CreateFile(szFileName, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _generateDump(EXCEPTION_POINTERS* pExceptionPointers) {
|
void _generateDump(EXCEPTION_POINTERS* pExceptionPointers) {
|
||||||
|
@ -553,16 +553,16 @@ void _generateDump(EXCEPTION_POINTERS* pExceptionPointers) {
|
||||||
}
|
}
|
||||||
|
|
||||||
MINIDUMP_EXCEPTION_INFORMATION ExpParam = {0};
|
MINIDUMP_EXCEPTION_INFORMATION ExpParam = {0};
|
||||||
ExpParam.ThreadId = GetCurrentThreadId();
|
ExpParam.ThreadId = GetCurrentThreadId();
|
||||||
ExpParam.ExceptionPointers = pExceptionPointers;
|
ExpParam.ExceptionPointers = pExceptionPointers;
|
||||||
ExpParam.ClientPointers = TRUE;
|
ExpParam.ClientPointers = TRUE;
|
||||||
|
|
||||||
miniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hDumpFile, MiniDumpWithDataSegs, &ExpParam, NULL, NULL);
|
miniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hDumpFile, MiniDumpWithDataSegs, &ExpParam, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
LONG CALLBACK _exceptionFilter(EXCEPTION_POINTERS* pExceptionPointers) {
|
LONG CALLBACK _exceptionFilter(EXCEPTION_POINTERS* pExceptionPointers) {
|
||||||
_generateDump(pExceptionPointers);
|
_generateDump(pExceptionPointers);
|
||||||
return _oldWndExceptionFilter ? (*_oldWndExceptionFilter)(pExceptionPointers) : EXCEPTION_CONTINUE_SEARCH;
|
return _oldWndExceptionFilter ? (*_oldWndExceptionFilter)(pExceptionPointers) : EXCEPTION_CONTINUE_SEARCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
// see http://www.codeproject.com/Articles/154686/SetUnhandledExceptionFilter-and-the-C-C-Runtime-Li
|
// see http://www.codeproject.com/Articles/154686/SetUnhandledExceptionFilter-and-the-C-C-Runtime-Li
|
||||||
|
|
|
@ -73,15 +73,14 @@ BackgroundBox::Inner::Inner(QWidget *parent) : TWidget(parent)
|
||||||
void BackgroundBox::Inner::gotWallpapers(const MTPVector<MTPWallPaper> &result) {
|
void BackgroundBox::Inner::gotWallpapers(const MTPVector<MTPWallPaper> &result) {
|
||||||
App::WallPapers wallpapers;
|
App::WallPapers wallpapers;
|
||||||
|
|
||||||
auto oldBackground = ImagePtr(qsl(":/gui/art/bg_old.png"));
|
auto oldBackground = ImagePtr(qsl(":/gui/art/bg_initial.png"));
|
||||||
wallpapers.push_back(App::WallPaper(Window::Theme::kOldBackground, oldBackground, oldBackground));
|
wallpapers.push_back(App::WallPaper(Window::Theme::kInitialBackground, oldBackground, oldBackground));
|
||||||
const auto &v(result.c_vector().v);
|
auto &v = result.c_vector().v;
|
||||||
for (int i = 0, l = v.size(); i < l; ++i) {
|
for_const (auto &w, v) {
|
||||||
const auto &w(v.at(i));
|
|
||||||
switch (w.type()) {
|
switch (w.type()) {
|
||||||
case mtpc_wallPaper: {
|
case mtpc_wallPaper: {
|
||||||
const auto &d(w.c_wallPaper());
|
auto &d = w.c_wallPaper();
|
||||||
const auto &sizes(d.vsizes.c_vector().v);
|
auto &sizes = d.vsizes.c_vector().v;
|
||||||
const MTPPhotoSize *thumb = 0, *full = 0;
|
const MTPPhotoSize *thumb = 0, *full = 0;
|
||||||
int32 thumbLevel = -1, fullLevel = -1;
|
int32 thumbLevel = -1, fullLevel = -1;
|
||||||
for (QVector<MTPPhotoSize>::const_iterator j = sizes.cbegin(), e = sizes.cend(); j != e; ++j) {
|
for (QVector<MTPPhotoSize>::const_iterator j = sizes.cbegin(), e = sizes.cend(); j != e; ++j) {
|
||||||
|
@ -89,14 +88,14 @@ void BackgroundBox::Inner::gotWallpapers(const MTPVector<MTPWallPaper> &result)
|
||||||
int32 w = 0, h = 0;
|
int32 w = 0, h = 0;
|
||||||
switch (j->type()) {
|
switch (j->type()) {
|
||||||
case mtpc_photoSize: {
|
case mtpc_photoSize: {
|
||||||
const auto &s(j->c_photoSize().vtype.c_string().v);
|
auto &s = j->c_photoSize().vtype.c_string().v;
|
||||||
if (s.size()) size = s[0];
|
if (s.size()) size = s[0];
|
||||||
w = j->c_photoSize().vw.v;
|
w = j->c_photoSize().vw.v;
|
||||||
h = j->c_photoSize().vh.v;
|
h = j->c_photoSize().vh.v;
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case mtpc_photoCachedSize: {
|
case mtpc_photoCachedSize: {
|
||||||
const auto &s(j->c_photoCachedSize().vtype.c_string().v);
|
auto &s = j->c_photoCachedSize().vtype.c_string().v;
|
||||||
if (s.size()) size = s[0];
|
if (s.size()) size = s[0];
|
||||||
w = j->c_photoCachedSize().vw.v;
|
w = j->c_photoCachedSize().vw.v;
|
||||||
h = j->c_photoCachedSize().vh.v;
|
h = j->c_photoCachedSize().vh.v;
|
||||||
|
@ -120,7 +119,7 @@ void BackgroundBox::Inner::gotWallpapers(const MTPVector<MTPWallPaper> &result)
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case mtpc_wallPaperSolid: {
|
case mtpc_wallPaperSolid: {
|
||||||
const auto &d(w.c_wallPaperSolid());
|
auto &d = w.c_wallPaperSolid();
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,13 +166,13 @@ contactsPhotoCheckbox: RoundImageCheckbox {
|
||||||
imageRadius: 21px;
|
imageRadius: 21px;
|
||||||
imageSmallRadius: 18px;
|
imageSmallRadius: 18px;
|
||||||
selectWidth: 2px;
|
selectWidth: 2px;
|
||||||
selectFg: windowActiveFill;
|
selectFg: windowActiveBg;
|
||||||
selectDuration: 150;
|
selectDuration: 150;
|
||||||
checkBorder: windowBg;
|
checkBorder: windowBg;
|
||||||
checkBg: windowActiveFill;
|
checkBg: windowActiveBg;
|
||||||
checkRadius: 10px;
|
checkRadius: 10px;
|
||||||
checkSmallRadius: 3px;
|
checkSmallRadius: 3px;
|
||||||
checkIcon: icon {{ "default_checkbox_check", windowBg, point(3px, 6px) }};
|
checkIcon: icon {{ "default_checkbox_check", windowActiveFg, point(3px, 6px) }};
|
||||||
}
|
}
|
||||||
contactsPhotoDisabledCheckFg: #bbbbbb;
|
contactsPhotoDisabledCheckFg: #bbbbbb;
|
||||||
contactsNameCheckedFg: #2b88b8;
|
contactsNameCheckedFg: #2b88b8;
|
||||||
|
|
|
@ -356,7 +356,7 @@ void ContactsBox::onFilterUpdate(const QString &filter) {
|
||||||
void ContactsBox::addPeerToMultiSelect(PeerData *peer, bool skipAnimation) {
|
void ContactsBox::addPeerToMultiSelect(PeerData *peer, bool skipAnimation) {
|
||||||
using AddItemWay = Ui::MultiSelect::AddItemWay;
|
using AddItemWay = Ui::MultiSelect::AddItemWay;
|
||||||
auto addItemWay = skipAnimation ? AddItemWay::SkipAnimation : AddItemWay::Default;
|
auto addItemWay = skipAnimation ? AddItemWay::SkipAnimation : AddItemWay::Default;
|
||||||
_select->entity()->addItem(peer->id, peer->shortName(), st::windowActiveFill, PaintUserpicCallback(peer), addItemWay);
|
_select->entity()->addItem(peer->id, peer->shortName(), st::activeButtonBg, PaintUserpicCallback(peer), addItemWay);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContactsBox::onPeerSelectedChanged(PeerData *peer, bool checked) {
|
void ContactsBox::onPeerSelectedChanged(PeerData *peer, bool checked) {
|
||||||
|
|
|
@ -236,7 +236,7 @@ void ShareBox::onFilterUpdate(const QString &query) {
|
||||||
void ShareBox::addPeerToMultiSelect(PeerData *peer, bool skipAnimation) {
|
void ShareBox::addPeerToMultiSelect(PeerData *peer, bool skipAnimation) {
|
||||||
using AddItemWay = Ui::MultiSelect::AddItemWay;
|
using AddItemWay = Ui::MultiSelect::AddItemWay;
|
||||||
auto addItemWay = skipAnimation ? AddItemWay::SkipAnimation : AddItemWay::Default;
|
auto addItemWay = skipAnimation ? AddItemWay::SkipAnimation : AddItemWay::Default;
|
||||||
_select->addItem(peer->id, peer->shortName(), st::windowActiveFill, PaintUserpicCallback(peer), addItemWay);
|
_select->addItem(peer->id, peer->shortName(), st::activeButtonBg, PaintUserpicCallback(peer), addItemWay);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShareBox::onPeerSelectedChanged(PeerData *peer, bool checked) {
|
void ShareBox::onPeerSelectedChanged(PeerData *peer, bool checked) {
|
||||||
|
|
|
@ -81,13 +81,16 @@ dialogsMenuToggle: IconButton {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
|
||||||
icon: icon {{ "dialogs_menu", dialogsMenuIconFg }};
|
icon: icon {{ "dialogs_menu", dialogsMenuIconFg }};
|
||||||
|
iconOver: icon {{ "dialogs_menu", dialogsMenuIconFgOver }};
|
||||||
iconPosition: point(6px, 6px);
|
iconPosition: point(6px, 6px);
|
||||||
iconPositionDown: point(6px, 6px);
|
iconPositionDown: point(6px, 6px);
|
||||||
}
|
}
|
||||||
dialogsLock: IconButton(dialogsMenuToggle) {
|
dialogsLock: IconButton(dialogsMenuToggle) {
|
||||||
icon: icon {{ "dialogs_lock", dialogsMenuIconFg }};
|
icon: icon {{ "dialogs_lock", dialogsMenuIconFg }};
|
||||||
|
iconOver: icon {{ "dialogs_lock", dialogsMenuIconFgOver }};
|
||||||
}
|
}
|
||||||
dialogsUnlockIcon: icon {{ "dialogs_unlock", dialogsMenuIconFg }};
|
dialogsUnlockIcon: icon {{ "dialogs_unlock", dialogsMenuIconFg }};
|
||||||
|
dialogsUnlockIconOver: icon {{ "dialogs_unlock", dialogsMenuIconFgOver }};
|
||||||
|
|
||||||
dialogsFilter: flatInput(inpDefGray) {
|
dialogsFilter: flatInput(inpDefGray) {
|
||||||
font: font(fsize);
|
font: font(fsize);
|
||||||
|
@ -114,10 +117,15 @@ dialogsMenu: DropdownMenu(defaultDropdownMenu) {
|
||||||
}
|
}
|
||||||
dialogsMenuPosition: point(-3px, -2px);
|
dialogsMenuPosition: point(-3px, -2px);
|
||||||
dialogsMenuNewGroup: icon {{ "menu_new_group", menuIconFg }};
|
dialogsMenuNewGroup: icon {{ "menu_new_group", menuIconFg }};
|
||||||
|
dialogsMenuNewGroupOver: icon {{ "menu_new_group", menuIconFgOver }};
|
||||||
dialogsMenuNewChannel: icon {{ "menu_new_channel", menuIconFg }};
|
dialogsMenuNewChannel: icon {{ "menu_new_channel", menuIconFg }};
|
||||||
|
dialogsMenuNewChannelOver: icon {{ "menu_new_channel", menuIconFgOver }};
|
||||||
dialogsMenuContacts: icon {{ "menu_contacts", menuIconFg }};
|
dialogsMenuContacts: icon {{ "menu_contacts", menuIconFg }};
|
||||||
|
dialogsMenuContactsOver: icon {{ "menu_contacts", menuIconFgOver }};
|
||||||
dialogsMenuSettings: icon {{ "menu_settings", menuIconFg }};
|
dialogsMenuSettings: icon {{ "menu_settings", menuIconFg }};
|
||||||
|
dialogsMenuSettingsOver: icon {{ "menu_settings", menuIconFgOver }};
|
||||||
dialogsMenuHelp: icon {{ "menu_help", menuIconFg }};
|
dialogsMenuHelp: icon {{ "menu_help", menuIconFg }};
|
||||||
|
dialogsMenuHelpOver: icon {{ "menu_help", menuIconFgOver }};
|
||||||
|
|
||||||
dialogsChatTypeSkip: 22px;
|
dialogsChatTypeSkip: 22px;
|
||||||
dialogsChatIcon: icon {{ "dialogs_chat", dialogsChatIconFg, point(1px, 4px) }};
|
dialogsChatIcon: icon {{ "dialogs_chat", dialogsChatIconFg, point(1px, 4px) }};
|
||||||
|
@ -191,4 +199,3 @@ dialogsForwardCancel: IconButton {
|
||||||
iconPositionDown: point(12px, 11px);
|
iconPositionDown: point(12px, 11px);
|
||||||
}
|
}
|
||||||
dialogsForwardFont: semiboldFont;
|
dialogsForwardFont: semiboldFont;
|
||||||
dialogsForwardBg: windowActiveFill;
|
|
||||||
|
|
|
@ -1701,7 +1701,7 @@ DialogsWidget::DialogsWidget(QWidget *parent) : TWidget(parent)
|
||||||
_lockUnlock->setVisible(Global::LocalPasscode());
|
_lockUnlock->setVisible(Global::LocalPasscode());
|
||||||
subscribe(Global::RefLocalPasscodeChanged(), [this] { updateLockUnlockVisibility(); });
|
subscribe(Global::RefLocalPasscodeChanged(), [this] { updateLockUnlockVisibility(); });
|
||||||
_lockUnlock->setClickedCallback([this] {
|
_lockUnlock->setClickedCallback([this] {
|
||||||
_lockUnlock->setIcon(&st::dialogsUnlockIcon);
|
_lockUnlock->setIcon(&st::dialogsUnlockIcon, &st::dialogsUnlockIconOver);
|
||||||
App::wnd()->setupPasscode();
|
App::wnd()->setupPasscode();
|
||||||
_lockUnlock->setIcon(nullptr);
|
_lockUnlock->setIcon(nullptr);
|
||||||
});
|
});
|
||||||
|
@ -2016,19 +2016,19 @@ void DialogsWidget::showMainMenu() {
|
||||||
_mainMenu.create(this, st::dialogsMenu);
|
_mainMenu.create(this, st::dialogsMenu);
|
||||||
_mainMenu->addAction(lang(lng_create_group_title), [] {
|
_mainMenu->addAction(lang(lng_create_group_title), [] {
|
||||||
App::wnd()->onShowNewGroup();
|
App::wnd()->onShowNewGroup();
|
||||||
}, &st::dialogsMenuNewGroup);
|
}, &st::dialogsMenuNewGroup, &st::dialogsMenuNewGroupOver);
|
||||||
_mainMenu->addAction(lang(lng_create_channel_title), [] {
|
_mainMenu->addAction(lang(lng_create_channel_title), [] {
|
||||||
App::wnd()->onShowNewChannel();
|
App::wnd()->onShowNewChannel();
|
||||||
}, &st::dialogsMenuNewChannel);
|
}, &st::dialogsMenuNewChannel, &st::dialogsMenuNewChannelOver);
|
||||||
_mainMenu->addAction(lang(lng_menu_contacts), [] {
|
_mainMenu->addAction(lang(lng_menu_contacts), [] {
|
||||||
Ui::showLayer(new ContactsBox());
|
Ui::showLayer(new ContactsBox());
|
||||||
}, &st::dialogsMenuContacts);
|
}, &st::dialogsMenuContacts, &st::dialogsMenuContactsOver);
|
||||||
_mainMenu->addAction(lang(lng_menu_settings), [] {
|
_mainMenu->addAction(lang(lng_menu_settings), [] {
|
||||||
App::wnd()->showSettings();
|
App::wnd()->showSettings();
|
||||||
}, &st::dialogsMenuSettings);
|
}, &st::dialogsMenuSettings, &st::dialogsMenuSettingsOver);
|
||||||
_mainMenu->addAction(lang(lng_settings_faq), [] {
|
_mainMenu->addAction(lang(lng_settings_faq), [] {
|
||||||
QDesktopServices::openUrl(telegramFaqLink());
|
QDesktopServices::openUrl(telegramFaqLink());
|
||||||
}, &st::dialogsMenuHelp);
|
}, &st::dialogsMenuHelp, &st::dialogsMenuHelpOver);
|
||||||
}
|
}
|
||||||
updateMainMenuGeometry();
|
updateMainMenuGeometry();
|
||||||
_mainMenu->showAnimated();
|
_mainMenu->showAnimated();
|
||||||
|
|
|
@ -157,32 +157,19 @@ historyComposeField: flatTextarea {
|
||||||
historyComposeFieldMaxHeight: 224px;
|
historyComposeFieldMaxHeight: 224px;
|
||||||
// historyMinHeight: 56px;
|
// historyMinHeight: 56px;
|
||||||
|
|
||||||
historyMediaTypeFile: icon {{ "media_type_file", historyComposeIconFg, point(2px, 2px) }};
|
|
||||||
historyMediaTypeFileOver: icon {{ "media_type_file", historyComposeIconFgOver, point(2px, 2px) }};
|
|
||||||
historyMediaTypePhoto: icon {{ "media_type_photo", historyComposeIconFg, point(2px, 2px) }};
|
|
||||||
historyMediaTypePhotoOver: icon {{ "media_type_photo", historyComposeIconFgOver, point(2px, 2px) }};
|
|
||||||
historyMediaTypeVideo: icon {{ "media_type_video", historyComposeIconFg, point(2px, 2px) }};
|
|
||||||
historyMediaTypeVideoOver: icon {{ "media_type_video", historyComposeIconFgOver, point(2px, 2px) }};
|
|
||||||
historyMediaTypeSong: icon {{ "media_type_song", historyComposeIconFg, point(0px, 0px) }};
|
|
||||||
historyMediaTypeSongOver: icon {{ "media_type_song", historyComposeIconFgOver, point(0px, 0px) }};
|
|
||||||
historyMediaTypeVoice: icon {{ "media_type_voice", historyComposeIconFg, point(2px, 2px) }};
|
|
||||||
historyMediaTypeVoiceOver: icon {{ "media_type_voice", historyComposeIconFgOver, point(2px, 2px) }};
|
|
||||||
historyMediaTypeLink: icon {{ "media_type_link", historyComposeIconFg, point(2px, 2px) }};
|
|
||||||
historyMediaTypeLinkOver: icon {{ "media_type_link", historyComposeIconFgOver, point(2px, 2px) }};
|
|
||||||
|
|
||||||
historyAttachDocument: IconButton {
|
historyAttachDocument: IconButton {
|
||||||
width: 46px;
|
width: 46px;
|
||||||
height: 46px;
|
height: 46px;
|
||||||
|
|
||||||
icon: historyMediaTypeFile;
|
icon: icon {{ "media_type_file", historyComposeIconFg, point(2px, 2px) }};
|
||||||
iconOver: historyMediaTypeFileOver;
|
iconOver: icon {{ "media_type_file", historyComposeIconFgOver, point(2px, 2px) }};
|
||||||
|
|
||||||
iconPosition: point(9px, 9px);
|
iconPosition: point(9px, 9px);
|
||||||
iconPositionDown: point(9px, 10px);
|
iconPositionDown: point(9px, 10px);
|
||||||
}
|
}
|
||||||
historyAttachPhoto: IconButton(historyAttachDocument) {
|
historyAttachPhoto: IconButton(historyAttachDocument) {
|
||||||
icon: historyMediaTypePhoto;
|
icon: icon {{ "media_type_photo", historyComposeIconFg, point(2px, 2px) }};
|
||||||
iconOver: historyMediaTypePhotoOver;
|
iconOver: icon {{ "media_type_photo", historyComposeIconFgOver, point(2px, 2px) }};
|
||||||
}
|
}
|
||||||
historyAttachEmoji: IconButton(historyAttachDocument) {
|
historyAttachEmoji: IconButton(historyAttachDocument) {
|
||||||
width: 33px;
|
width: 33px;
|
||||||
|
@ -233,11 +220,23 @@ historyRecordFont: font(13px);
|
||||||
historyRecordDurationFg: #000000;
|
historyRecordDurationFg: #000000;
|
||||||
historyRecordTextTop: 14px;
|
historyRecordTextTop: 14px;
|
||||||
|
|
||||||
|
historyMediaTypeFile: icon {{ "media_type_file", menuIconFg, point(2px, 2px) }};
|
||||||
|
historyMediaTypeFileOver: icon {{ "media_type_file", menuIconFgOver, point(2px, 2px) }};
|
||||||
|
historyMediaTypePhoto: icon {{ "media_type_photo", menuIconFg, point(2px, 2px) }};
|
||||||
|
historyMediaTypePhotoOver: icon {{ "media_type_photo", menuIconFgOver, point(2px, 2px) }};
|
||||||
|
historyMediaTypeVideo: icon {{ "media_type_video", menuIconFg, point(2px, 2px) }};
|
||||||
|
historyMediaTypeVideoOver: icon {{ "media_type_video", menuIconFgOver, point(2px, 2px) }};
|
||||||
|
historyMediaTypeSong: icon {{ "media_type_song", menuIconFg, point(0px, 0px) }};
|
||||||
|
historyMediaTypeSongOver: icon {{ "media_type_song", menuIconFgOver, point(0px, 0px) }};
|
||||||
|
historyMediaTypeVoice: icon {{ "media_type_voice", menuIconFg, point(2px, 2px) }};
|
||||||
|
historyMediaTypeVoiceOver: icon {{ "media_type_voice", menuIconFgOver, point(2px, 2px) }};
|
||||||
|
historyMediaTypeLink: icon {{ "media_type_link", menuIconFg, point(2px, 2px) }};
|
||||||
|
historyMediaTypeLinkOver: icon {{ "media_type_link", menuIconFgOver, point(2px, 2px) }};
|
||||||
|
|
||||||
historyAttachDropdownMenu: DropdownMenu(defaultDropdownMenu) {
|
historyAttachDropdownMenu: DropdownMenu(defaultDropdownMenu) {
|
||||||
menu: Menu(defaultMenu) {
|
menu: Menu(defaultMenu) {
|
||||||
skip: 5px;
|
skip: 5px;
|
||||||
|
|
||||||
itemBgOver: historyMenuItemBgOver;
|
|
||||||
itemIconPosition: point(12px, 6px);
|
itemIconPosition: point(12px, 6px);
|
||||||
itemPadding: margins(48px, 11px, 48px, 11px);
|
itemPadding: margins(48px, 11px, 48px, 11px);
|
||||||
}
|
}
|
||||||
|
@ -277,15 +276,15 @@ topBarSearch: IconButton {
|
||||||
width: 44px;
|
width: 44px;
|
||||||
height: topBarHeight;
|
height: topBarHeight;
|
||||||
|
|
||||||
icon: icon {{ "title_search", #a8a8a8 }};
|
icon: icon {{ "title_search", menuIconFg }};
|
||||||
iconOver: icon {{ "title_search", #a3a3a3 }};
|
iconOver: icon {{ "title_search", menuIconFgOver }};
|
||||||
|
|
||||||
iconPosition: point(13px, 18px);
|
iconPosition: point(13px, 18px);
|
||||||
iconPositionDown: point(13px, 18px);
|
iconPositionDown: point(13px, 18px);
|
||||||
}
|
}
|
||||||
topBarMenuToggle: IconButton(topBarSearch) {
|
topBarMenuToggle: IconButton(topBarSearch) {
|
||||||
icon: icon {{ "title_menu_dots", #a8a8a8 }};
|
icon: icon {{ "title_menu_dots", menuIconFg }};
|
||||||
iconOver: icon {{ "title_menu_dots", #a3a3a3 }};
|
iconOver: icon {{ "title_menu_dots", menuIconFgOver }};
|
||||||
|
|
||||||
iconPosition: point(18px, 17px);
|
iconPosition: point(18px, 17px);
|
||||||
iconPositionDown: point(18px, 17px);
|
iconPositionDown: point(18px, 17px);
|
||||||
|
|
|
@ -5004,8 +5004,8 @@ void HistoryWidget::loadMessages() {
|
||||||
return firstLoadMessages();
|
return firstLoadMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool loadMigrated = _migrated && (_history->isEmpty() || _history->loadedAtTop() || (!_migrated->isEmpty() && !_migrated->loadedAtBottom()));
|
auto loadMigrated = _migrated && (_history->isEmpty() || _history->loadedAtTop() || (!_migrated->isEmpty() && !_migrated->loadedAtBottom()));
|
||||||
History *from = loadMigrated ? _migrated : _history;
|
auto from = loadMigrated ? _migrated : _history;
|
||||||
if (from->loadedAtTop()) {
|
if (from->loadedAtTop()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3630,8 +3630,7 @@ void writeBackground(int32 id, const QImage &img) {
|
||||||
}
|
}
|
||||||
quint32 size = sizeof(qint32) + sizeof(quint32) + (bmp.isEmpty() ? 0 : (sizeof(quint32) + bmp.size()));
|
quint32 size = sizeof(qint32) + sizeof(quint32) + (bmp.isEmpty() ? 0 : (sizeof(quint32) + bmp.size()));
|
||||||
EncryptedDescriptor data(size);
|
EncryptedDescriptor data(size);
|
||||||
data.stream << qint32(id);
|
data.stream << qint32(id) << bmp;
|
||||||
if (!bmp.isEmpty()) data.stream << bmp;
|
|
||||||
|
|
||||||
FileWriteDescriptor file(_backgroundKey);
|
FileWriteDescriptor file(_backgroundKey);
|
||||||
file.writeEncrypted(data);
|
file.writeEncrypted(data);
|
||||||
|
@ -3653,21 +3652,21 @@ bool readBackground() {
|
||||||
|
|
||||||
QByteArray pngData;
|
QByteArray pngData;
|
||||||
qint32 id;
|
qint32 id;
|
||||||
bg.stream >> id;
|
bg.stream >> id >> pngData;
|
||||||
if (id == Window::Theme::kOldBackground || id == Window::Theme::kDefaultBackground) {
|
auto oldEmptyImage = (bg.stream.status() != QDataStream::Ok);
|
||||||
|
if (oldEmptyImage
|
||||||
|
|| id == Window::Theme::kInitialBackground
|
||||||
|
|| id == Window::Theme::kDefaultBackground) {
|
||||||
_backgroundCanWrite = false;
|
_backgroundCanWrite = false;
|
||||||
if (bg.version < 8005) {
|
if (oldEmptyImage || bg.version < 8005) {
|
||||||
Window::Theme::Background()->setImage(Window::Theme::kDefaultBackground);
|
Window::Theme::Background()->setImage(Window::Theme::kDefaultBackground);
|
||||||
if (id == Window::Theme::kOldBackground) {
|
Window::Theme::Background()->setTile(false);
|
||||||
Window::Theme::Background()->setTile(false);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Window::Theme::Background()->setImage(id);
|
Window::Theme::Background()->setImage(id);
|
||||||
}
|
}
|
||||||
_backgroundCanWrite = true;
|
_backgroundCanWrite = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bg.stream >> pngData;
|
|
||||||
|
|
||||||
QImage image;
|
QImage image;
|
||||||
QBuffer buf(&pngData);
|
QBuffer buf(&pngData);
|
||||||
|
|
|
@ -1925,7 +1925,9 @@ void MainWidget::checkChatBackground() {
|
||||||
if (_background->full->loaded()) {
|
if (_background->full->loaded()) {
|
||||||
if (_background->full->isNull()) {
|
if (_background->full->isNull()) {
|
||||||
Window::Theme::Background()->setImage(Window::Theme::kDefaultBackground);
|
Window::Theme::Background()->setImage(Window::Theme::kDefaultBackground);
|
||||||
} else if (_background->id == Window::Theme::kOldBackground || _background->id == Window::Theme::kDefaultBackground) {
|
} else if (false
|
||||||
|
|| _background->id == Window::Theme::kInitialBackground
|
||||||
|
|| _background->id == Window::Theme::kDefaultBackground) {
|
||||||
Window::Theme::Background()->setImage(_background->id);
|
Window::Theme::Background()->setImage(_background->id);
|
||||||
} else {
|
} else {
|
||||||
Window::Theme::Background()->setImage(_background->id, _background->full->pix().toImage());
|
Window::Theme::Background()->setImage(_background->id, _background->full->pix().toImage());
|
||||||
|
|
|
@ -159,8 +159,8 @@ void MainWindow::onStateChanged(Qt::WindowState state) {
|
||||||
savePosition(state);
|
savePosition(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::init() {
|
void MainWindow::initHook() {
|
||||||
Platform::MainWindow::init();
|
Platform::MainWindow::initHook();
|
||||||
|
|
||||||
setWindowIcon(wndIcon);
|
setWindowIcon(wndIcon);
|
||||||
|
|
||||||
|
@ -198,6 +198,7 @@ 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();
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,6 @@ public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
void init();
|
|
||||||
void firstShow();
|
void firstShow();
|
||||||
|
|
||||||
QWidget *filedialogParent();
|
QWidget *filedialogParent();
|
||||||
|
@ -168,6 +167,8 @@ protected:
|
||||||
void closeEvent(QCloseEvent *e) override;
|
void closeEvent(QCloseEvent *e) override;
|
||||||
void resizeEvent(QResizeEvent *e) override;
|
void resizeEvent(QResizeEvent *e) override;
|
||||||
|
|
||||||
|
void initHook() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateIsActive(int timeout = 0);
|
void updateIsActive(int timeout = 0);
|
||||||
|
|
||||||
|
|
|
@ -47,11 +47,12 @@ TitleWidget::TitleWidget(QWidget *parent) : Window::TitleWidget(parent)
|
||||||
});
|
});
|
||||||
|
|
||||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TitleWidget::init() {
|
||||||
|
connect(window()->windowHandle(), SIGNAL(windowStateChanged(Qt::WindowState)), this, SLOT(onWindowStateChanged(Qt::WindowState)));
|
||||||
|
_maximized = (window()->windowState() & Qt::WindowMaximized);
|
||||||
updateMaximizeRestoreButton();
|
updateMaximizeRestoreButton();
|
||||||
|
|
||||||
onWindowStateChanged();
|
|
||||||
|
|
||||||
connect(parent->window()->windowHandle(), SIGNAL(windowStateChanged(Qt::WindowState)), this, SLOT(onWindowStateChanged(Qt::WindowState)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TitleWidget::paintEvent(QPaintEvent *e) {
|
void TitleWidget::paintEvent(QPaintEvent *e) {
|
||||||
|
|
|
@ -35,6 +35,8 @@ class TitleWidget : public Window::TitleWidget, private base::Subscriber {
|
||||||
public:
|
public:
|
||||||
TitleWidget(QWidget *parent);
|
TitleWidget(QWidget *parent);
|
||||||
|
|
||||||
|
void init() override;
|
||||||
|
|
||||||
Window::HitTestResult hitTest(const QPoint &p) const override;
|
Window::HitTestResult hitTest(const QPoint &p) const override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
@ -60,11 +60,11 @@ profilePrimaryButton: defaultActiveButton;
|
||||||
profileSecondaryButton: defaultLightButton;
|
profileSecondaryButton: defaultLightButton;
|
||||||
profileAddMemberButton: RoundButton(profileSecondaryButton) {
|
profileAddMemberButton: RoundButton(profileSecondaryButton) {
|
||||||
width: 62px;
|
width: 62px;
|
||||||
icon: icon {{ "profile_add_member", windowActiveFill, point(20px, 10px) }};
|
icon: icon {{ "profile_add_member", lightButtonFg, point(20px, 10px) }};
|
||||||
}
|
}
|
||||||
|
|
||||||
profileDropAreaBg: profileBg;
|
profileDropAreaBg: profileBg;
|
||||||
profileDropAreaFg: windowActiveFill;
|
profileDropAreaFg: lightButtonFg;
|
||||||
profileDropAreaPadding: margins(25px, 3px, 25px, 20px);
|
profileDropAreaPadding: margins(25px, 3px, 25px, 20px);
|
||||||
profileDropAreaTitleFont: font(24px);
|
profileDropAreaTitleFont: font(24px);
|
||||||
profileDropAreaTitleTop: 30px;
|
profileDropAreaTitleTop: 30px;
|
||||||
|
|
|
@ -2135,7 +2135,7 @@ void StickerPanInner::updateSelected() {
|
||||||
t_assert(row >= 0 && row < _inlineRows.size() && col >= 0 && col < _inlineRows.at(row).items.size());
|
t_assert(row >= 0 && row < _inlineRows.size() && col >= 0 && col < _inlineRows.at(row).items.size());
|
||||||
Ui::repaintInlineItem(_inlineRows.at(row).items.at(col));
|
Ui::repaintInlineItem(_inlineRows.at(row).items.at(col));
|
||||||
}
|
}
|
||||||
if (_pressed >= 0 && _selected >= 0 && _pressed != _selected) {
|
if (_previewShown && _selected >= 0 && _pressed != _selected) {
|
||||||
_pressed = _selected;
|
_pressed = _selected;
|
||||||
if (row >= 0 && col >= 0) {
|
if (row >= 0 && col >= 0) {
|
||||||
auto layout = _inlineRows.at(row).items.at(col);
|
auto layout = _inlineRows.at(row).items.at(col);
|
||||||
|
@ -2260,7 +2260,7 @@ void StickerPanInner::updateSelected() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_selected = selIndex;
|
_selected = selIndex;
|
||||||
if (_pressed >= 0 && _selected >= 0 && _pressed != _selected) {
|
if (_previewShown && _selected >= 0 && _pressed != _selected) {
|
||||||
_pressed = _selected;
|
_pressed = _selected;
|
||||||
if (newSel >= 0 && xNewSel < 0) {
|
if (newSel >= 0 && xNewSel < 0) {
|
||||||
Ui::showMediaPreview(sets.at(newSelTab).pack.at(newSel % MatrixRowShift));
|
Ui::showMediaPreview(sets.at(newSelTab).pack.at(newSel % MatrixRowShift));
|
||||||
|
|
|
@ -56,7 +56,7 @@ stickersFeaturedUnreadBg: msgFileInBg;
|
||||||
stickersFeaturedUnreadSize: 5px;
|
stickersFeaturedUnreadSize: 5px;
|
||||||
stickersFeaturedUnreadSkip: 5px;
|
stickersFeaturedUnreadSkip: 5px;
|
||||||
stickersFeaturedUnreadTop: 7px;
|
stickersFeaturedUnreadTop: 7px;
|
||||||
stickersFeaturedInstalled: icon {{ "mediaview_save_check", windowActiveFill }};
|
stickersFeaturedInstalled: icon {{ "mediaview_save_check", lightButtonFg }};
|
||||||
|
|
||||||
stickersMaxHeight: 440px;
|
stickersMaxHeight: 440px;
|
||||||
stickersPadding: margins(19px, 17px, 19px, 17px);
|
stickersPadding: margins(19px, 17px, 19px, 17px);
|
||||||
|
|
|
@ -28,10 +28,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
namespace Window {
|
namespace Window {
|
||||||
|
|
||||||
MainWindow::MainWindow() : QMainWindow()
|
MainWindow::MainWindow() : QWidget()
|
||||||
, _positionUpdatedTimer(this)
|
, _positionUpdatedTimer(this)
|
||||||
, _body(this) {
|
, _body(this) {
|
||||||
setCentralWidget(_body);
|
|
||||||
subscribe(Theme::Background(), [this](const Theme::BackgroundUpdate &data) {
|
subscribe(Theme::Background(), [this](const Theme::BackgroundUpdate &data) {
|
||||||
using Type = Theme::BackgroundUpdate::Type;
|
using Type = Theme::BackgroundUpdate::Type;
|
||||||
if (data.type == Type::TestingTheme || data.type == Type::RevertingTheme || data.type == Type::ApplyingTheme) {
|
if (data.type == Type::TestingTheme || data.type == Type::RevertingTheme || data.type == Type::ApplyingTheme) {
|
||||||
|
@ -40,20 +39,21 @@ MainWindow::MainWindow() : QMainWindow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
_title = Platform::CreateTitleWidget(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::init() {
|
void MainWindow::init() {
|
||||||
_positionUpdatedTimer->setSingleShot(true);
|
_positionUpdatedTimer->setSingleShot(true);
|
||||||
connect(_positionUpdatedTimer, SIGNAL(timeout()), this, SLOT(savePositionByTimer()));
|
connect(_positionUpdatedTimer, SIGNAL(timeout()), this, SLOT(savePositionByTimer()));
|
||||||
|
|
||||||
_title = Platform::CreateTitleWidget(this);
|
|
||||||
|
|
||||||
auto p = palette();
|
auto p = palette();
|
||||||
p.setColor(QPalette::Window, st::windowBg->c);
|
p.setColor(QPalette::Window, st::windowBg->c);
|
||||||
setPalette(p);
|
setPalette(p);
|
||||||
|
|
||||||
initSize();
|
if (_title) _title->init();
|
||||||
|
|
||||||
|
initSize();
|
||||||
initHook();
|
initHook();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Window {
|
||||||
|
|
||||||
class TitleWidget;
|
class TitleWidget;
|
||||||
|
|
||||||
class MainWindow : public QMainWindow, protected base::Subscriber {
|
class MainWindow : public QWidget, protected base::Subscriber {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -76,7 +76,7 @@ notifySendReply: IconButton {
|
||||||
width: 36px;
|
width: 36px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
|
||||||
icon: icon {{ "notification_send", windowActiveFill, point(3px, 9px) }};
|
icon: icon {{ "notification_send", lightButtonFg, point(3px, 9px) }};
|
||||||
iconPosition: point(0px, 0px);
|
iconPosition: point(0px, 0px);
|
||||||
iconPositionDown: point(0px, 1px);
|
iconPositionDown: point(0px, 1px);
|
||||||
}
|
}
|
||||||
|
|
|
@ -440,18 +440,18 @@ void ChatBackground::setImage(int32 id, QImage &&image) {
|
||||||
}
|
}
|
||||||
setPreparedImage(std_::move(image));
|
setPreparedImage(std_::move(image));
|
||||||
} else {
|
} else {
|
||||||
if (_id == kDefaultBackground) {
|
if (_id == kInitialBackground) {
|
||||||
image.load(qsl(":/gui/art/bg.jpg"));
|
image.load(qsl(":/gui/art/bg_initial.png"));
|
||||||
} else if (_id == kOldBackground || image.isNull()) {
|
|
||||||
_id = kOldBackground;
|
|
||||||
image.load(qsl(":/gui/art/bg_old.png"));
|
|
||||||
if (cRetina()) {
|
if (cRetina()) {
|
||||||
image = image.scaledToWidth(image.width() * 2, Qt::SmoothTransformation);
|
image = image.scaledToWidth(image.width() * 2, Qt::SmoothTransformation);
|
||||||
} else if (cScale() != dbisOne) {
|
} else if (cScale() != dbisOne) {
|
||||||
image = image.scaledToWidth(convertScale(image.width()), Qt::SmoothTransformation);
|
image = image.scaledToWidth(convertScale(image.width()), Qt::SmoothTransformation);
|
||||||
}
|
}
|
||||||
|
} else if (_id == kDefaultBackground || image.isNull()) {
|
||||||
|
_id = kDefaultBackground;
|
||||||
|
image.load(qsl(":/gui/art/bg.jpg"));
|
||||||
}
|
}
|
||||||
Local::writeBackground(_id, (_id == kDefaultBackground || _id == kOldBackground) ? QImage() : image);
|
Local::writeBackground(_id, (_id == kDefaultBackground || _id == kInitialBackground) ? QImage() : image);
|
||||||
setPreparedImage(prepareBackgroundImage(std_::move(image)));
|
setPreparedImage(prepareBackgroundImage(std_::move(image)));
|
||||||
}
|
}
|
||||||
t_assert(!_image.isNull());
|
t_assert(!_image.isNull());
|
||||||
|
|
|
@ -32,8 +32,8 @@ constexpr int32 kTestingDefaultBackground = -665;
|
||||||
|
|
||||||
constexpr int32 kThemeBackground = -2;
|
constexpr int32 kThemeBackground = -2;
|
||||||
constexpr int32 kCustomBackground = -1;
|
constexpr int32 kCustomBackground = -1;
|
||||||
constexpr int32 kOldBackground = 0;
|
constexpr int32 kInitialBackground = 0;
|
||||||
constexpr int32 kDefaultBackground = 21;
|
constexpr int32 kDefaultBackground = 105;
|
||||||
|
|
||||||
struct Cached {
|
struct Cached {
|
||||||
QByteArray colors;
|
QByteArray colors;
|
||||||
|
|
|
@ -40,6 +40,9 @@ enum class HitTestResult {
|
||||||
class TitleWidget : public TWidget {
|
class TitleWidget : public TWidget {
|
||||||
public:
|
public:
|
||||||
using TWidget::TWidget;
|
using TWidget::TWidget;
|
||||||
|
|
||||||
|
virtual void init() {
|
||||||
|
}
|
||||||
virtual HitTestResult hitTest(const QPoint &p) const {
|
virtual HitTestResult hitTest(const QPoint &p) const {
|
||||||
return HitTestResult::None;
|
return HitTestResult::None;
|
||||||
}
|
}
|
||||||
|
|