Closed beta 10020003: All colors moved to palette, some bug fixes.

This commit is contained in:
John Preston 2016-12-21 18:05:58 +03:00
parent b030824ef5
commit eb4d2a38b6
52 changed files with 839 additions and 609 deletions

View File

@ -37,10 +37,10 @@ emojiPadding: 1px;
lineWidth: 1px; lineWidth: 1px;
defaultTooltip: Tooltip { defaultTooltip: Tooltip {
textBg: #eef2f5; textBg: tooltipBg;
textFg: #5d6c80; textFg: tooltipFg;
textFont: normalFont; textFont: normalFont;
textBorder: #c9d1db; textBorder: tooltipBorderFg;
textPadding: margins(5px, 2px, 5px, 2px); textPadding: margins(5px, 2px, 5px, 2px);
shift: point(-20px, 20px); shift: point(-20px, 20px);
@ -50,20 +50,11 @@ defaultTooltip: Tooltip {
linesMax: 12; linesMax: 12;
} }
statusFont: font(fsize);
statusFg: #999999;
statusFgActive: #0080c0;
statusFgTyping: statusFgActive;
versionColor: #777777;
shadowColor: #00000018;
shadowToggleDuration: 200; shadowToggleDuration: 200;
slideDuration: 240; slideDuration: 240;
slideShift: 100px; slideShift: 100px;
slideFadeOutBg: #0000003c; slideShadow: icon {{ "slide_shadow", slideFadeOutShadowFg }};
slideShadow: icon {{ "slide_shadow", windowShadowFg }};
linkCropLimit: 360px; linkCropLimit: 360px;
linkFont: normalFont; linkFont: normalFont;
@ -76,7 +67,7 @@ setLittleSkip: 9px;
noContactsHeight: 100px; noContactsHeight: 100px;
noContactsFont: font(fsize); noContactsFont: font(fsize);
noContactsColor: #777777; noContactsColor: windowSubTextFg;
activeFadeInDuration: 500; activeFadeInDuration: 500;
activeFadeOutDuration: 3000; activeFadeOutDuration: 3000;
@ -95,54 +86,19 @@ msgPadding: margins(13px, 7px, 13px, 8px);
msgMargin: margins(16px, 6px, 56px, 2px); msgMargin: margins(16px, 6px, 56px, 2px);
msgMarginTopAttached: 1px; msgMarginTopAttached: 1px;
msgLnkPadding: 2px; // for media open / save links msgLnkPadding: 2px; // for media open / save links
msgBorder: #f0f0f0;
msgInBg: #ffffff;
msgInBgSelected: #c2dcf2; // #358cd4 with 30% opacity
msgOutBg: #effdde;
msgOutBgSelected: #b7dbdb;
msgSelectOverlay: #358cd44c;
msgStickerOverlay: #358cd47f;
msgInServiceFg: windowActiveTextFg;
msgInServiceFgSelected: windowActiveTextFg;
msgOutServiceFg: #3a8e26;
msgOutServiceFgSelected: #367570;
msgShadow: 2px; msgShadow: 2px;
msgInShadow: #748ea229;
msgInShadowSelected: #548dbb29;
msgOutShadow: #3ac34740;
msgOutShadowSelected: #37a78e40;
msgInDateFg: #a0acb6;
msgInDateFgSelected: #6a9cc5;
msgOutDateFg: #6cc264;
msgOutDateFgSelected: #50a79c;
msgReplyPadding: margins(6px, 6px, 11px, 6px); msgReplyPadding: margins(6px, 6px, 11px, 6px);
msgReplyBarPos: point(1px, 0px); msgReplyBarPos: point(1px, 0px);
msgReplyBarSize: size(2px, 36px); msgReplyBarSize: size(2px, 36px);
msgReplyBarSkip: 10px; msgReplyBarSkip: 10px;
msgInReplyBarColor: activeLineFg;
msgInReplyBarSelColor: activeLineFg;
msgOutReplyBarColor: historyOutIconFg;
msgOutReplyBarSelColor: historyOutIconFgSelected;
msgImgReplyBarColor: #ffffff;
msgServiceBg: #89a0b47f;
msgServiceSelectBg: #bbc8d4a2;
msgServiceColor: #ffffff;
msgServicePadding: margins(12px, 3px, 12px, 4px); msgServicePadding: margins(12px, 3px, 12px, 4px);
msgServiceMargin: margins(10px, 10px, 80px, 2px); msgServiceMargin: margins(10px, 10px, 80px, 2px);
msgColor: #000000;
msgDateColor: #000000;
msgDateSpace: 12px; msgDateSpace: 12px;
msgDateDelta: point(2px, 5px); msgDateDelta: point(2px, 5px);
msgDateImgDelta: 4px; msgDateImgDelta: 4px;
msgDateImgColor: #ffffff;
msgDateImgBg: #00000054;
msgDateImgBgOver: #00000074;
msgDateImgBgSelected: #1c4a7187;
msgDateImgPadding: point(8px, 2px); msgDateImgPadding: point(8px, 2px);
msgDateImgCheckSpace: 4px; msgDateImgCheckSpace: 4px;
@ -151,7 +107,7 @@ defaultTextStyle: TextStyle {
linkFlagsOver: font(fsize underline); linkFlagsOver: font(fsize underline);
linkFg: windowActiveTextFg; linkFg: windowActiveTextFg;
linkFgDown: windowActiveTextFg; linkFgDown: windowActiveTextFg;
monoFg: #777777; monoFg: windowSubTextFg;
selectBg: msgInBgSelected; selectBg: msgInBgSelected;
selectOverlay: msgSelectOverlay; selectOverlay: msgSelectOverlay;
lineHeight: 0px; lineHeight: 0px;
@ -159,19 +115,19 @@ defaultTextStyle: TextStyle {
serviceTextStyle: TextStyle(defaultTextStyle) { serviceTextStyle: TextStyle(defaultTextStyle) {
linkFlags: msgServiceFont; linkFlags: msgServiceFont;
linkFlagsOver: font(fsize semibold underline); linkFlagsOver: font(fsize semibold underline);
linkFg: msgServiceColor; linkFg: msgServiceFg;
linkFgDown: msgServiceColor; linkFgDown: msgServiceFg;
monoFg: msgServiceColor; monoFg: msgServiceFg;
selectBg: msgServiceSelectBg; selectBg: msgServiceBgSelected;
selectOverlay: msgServiceSelectBg; selectOverlay: msgServiceBgSelected;
} }
inTextStyle: TextStyle(defaultTextStyle) { inTextStyle: TextStyle(defaultTextStyle) {
monoFg: #4e7391; monoFg: msgInMonoFg;
selectBg: msgInBgSelected; selectBg: msgInBgSelected;
selectOverlay: msgSelectOverlay; selectOverlay: msgSelectOverlay;
} }
outTextStyle: TextStyle(defaultTextStyle) { outTextStyle: TextStyle(defaultTextStyle) {
monoFg: #469165; monoFg: msgOutMonoFg;
selectBg: msgOutBgSelected; selectBg: msgOutBgSelected;
selectOverlay: msgSelectOverlay; selectOverlay: msgSelectOverlay;
} }
@ -193,9 +149,9 @@ outFwdTextStyleSelected: TextStyle(inFwdTextStyle) {
linkFg: msgOutServiceFgSelected; linkFg: msgOutServiceFgSelected;
linkFgDown: msgOutServiceFgSelected; linkFgDown: msgOutServiceFgSelected;
} }
medviewSaveAsTextStyle: TextStyle(defaultTextStyle) { mediaviewTextStyle: TextStyle(defaultTextStyle) {
linkFg: #91d9ff; linkFg: mediaviewTextLinkFg;
linkFgDown: #91d9ff; linkFgDown: mediaviewTextLinkFg;
} }
mediaPadding: margins(0px, 0px, 0px, 0px); mediaPadding: margins(0px, 0px, 0px, 0px);
@ -204,14 +160,6 @@ mediaInBubbleSkip: 5px;
mediaThumbSize: 48px; mediaThumbSize: 48px;
mediaNameTop: 3px; mediaNameTop: 3px;
mediaDetailsShift: 3px; mediaDetailsShift: 3px;
mediaInFg: msgInDateFg;
mediaInFgSelected: msgInDateFgSelected;
mediaOutFg: msgOutDateFg;
mediaOutFgSelected: msgOutDateFgSelected;
mediaInUnreadFg: #999999;
mediaInUnreadFgSelected: #7b95aa;
mediaOutUnreadFg: #6aad60;
mediaOutUnreadFgSelected: #5aa382;
mediaUnreadSize: 7px; mediaUnreadSize: 7px;
mediaUnreadSkip: 5px; mediaUnreadSkip: 5px;
mediaUnreadTop: 6px; mediaUnreadTop: 6px;
@ -225,23 +173,6 @@ mediaInStyleSelected: TextStyle(defaultTextStyle) {
linkFgDown: mediaInFgSelected; linkFgDown: mediaInFgSelected;
} }
msgFileRedColor: #e47272;
msgFileYellowColor: #efc274;
msgFileGreenColor: #61b96e;
msgFileBlueColor: #72b1df;
msgFileRedDark: #cd5b5e;
msgFileYellowDark: #e6a561;
msgFileGreenDark: #4da859;
msgFileBlueDark: #5c9ece;
msgFileRedOver: #c35154;
msgFileYellowOver: #dc9c5a;
msgFileGreenOver: #44a050;
msgFileBlueOver: #5294c4;
msgFileRedSelected: #9f6a82;
msgFileYellowSelected: #b19d84;
msgFileGreenSelected: #46a07e;
msgFileBlueSelected: #5099d0;
msgFileMenuSize: size(36px, 36px); msgFileMenuSize: size(36px, 36px);
msgFileSize: 44px; msgFileSize: 44px;
msgFilePadding: margins(14px, 12px, 11px, 12px); msgFilePadding: margins(14px, 12px, 11px, 12px);
@ -250,19 +181,9 @@ msgFileThumbPadding: margins(10px, 10px, 14px, 10px);
msgFileThumbNameTop: 12px; msgFileThumbNameTop: 12px;
msgFileThumbStatusTop: 32px; msgFileThumbStatusTop: 32px;
msgFileThumbLinkTop: 60px; msgFileThumbLinkTop: 60px;
msgFileThumbLinkInFg: lightButtonFg;
msgFileThumbLinkInFgSelected: lightButtonFgOver;
msgFileThumbLinkOutFg: #5eba5b;
msgFileThumbLinkOutFgSelected: #31a298;
msgFileNameTop: 16px; msgFileNameTop: 16px;
msgFileStatusTop: 37px; msgFileStatusTop: 37px;
msgFileMinWidth: 294px; msgFileMinWidth: 294px;
msgFileInBg: windowBgActive;
msgFileInBgOver: #4eade3;
msgFileInBgSelected: #51a3d3;
msgFileOutBg: #78c67f;
msgFileOutBgOver: #6bc272;
msgFileOutBgSelected: #5fb389;
msgFileOverDuration: 200; msgFileOverDuration: 200;
msgFileRadialLine: 3px; msgFileRadialLine: 3px;
@ -273,56 +194,28 @@ msgWaveformBar: 2px;
msgWaveformSkip: 1px; msgWaveformSkip: 1px;
msgWaveformMin: 2px; msgWaveformMin: 2px;
msgWaveformMax: 20px; msgWaveformMax: 20px;
msgWaveformInActive: windowBgActive;
msgWaveformInActiveSelected: #51a3d3;
msgWaveformInInactive: #d4dee6;
msgWaveformInInactiveSelected: #9cc1e1;
msgWaveformOutActive: #78c67f;
msgWaveformOutActiveSelected: #6badad;
msgWaveformOutInactive: #b3e2b4;
msgWaveformOutInactiveSelected: #91c3c3;
textRectMargins: margins(-2px, -1px, -2px, -1px); textRectMargins: margins(-2px, -1px, -2px, -1px);
newMsgSound: ":/gui/art/newmsg.wav"; searchedBarHeight: 32px;
unreadBarHeight: 32px;
unreadBarMargin: 8px;
unreadBarFont: semiboldFont;
unreadBarBG: #fcfbfa;
unreadBarBorder: shadowColor;
unreadBarColor: #538bb4;
searchedBarHeight: unreadBarHeight;
searchedBarFont: normalFont; searchedBarFont: normalFont;
searchedBarBg: windowBgOver;
searchedBarBorder: unreadBarBorder;
searchedBarFg: windowSubTextFgOver;
searchedBarPosition: point(17px, 7px); searchedBarPosition: point(17px, 7px);
simpleCloseIcon: icon {{ "simple_close", #c7c7c7 }}; smallCloseIcon: icon {{ "simple_close", smallCloseIconFg }};
simpleCloseIconOver: icon {{ "simple_close", #a3a3a3 }}; smallCloseIconOver: icon {{ "simple_close", smallCloseIconFgOver }};
dialogsForwardCancelIcon: icon {{ "simple_close", dialogsForwardFg }}; dialogsForwardCancelIcon: icon {{ "simple_close", dialogsForwardFg }};
forwardMargins: margins(30px, 10px, 30px, 10px);
forwardFont: font(16px);
forwardBg: #0000004c;
forwardFg: #ffffff;
emojiTextFont: font(15px); emojiTextFont: font(15px);
emojiReplaceWidth: 52px; emojiReplaceWidth: 52px;
emojiReplaceHeight: 56px; emojiReplaceHeight: 56px;
emojiReplaceInnerHeight: 42px; emojiReplaceInnerHeight: 42px;
emojiReplacePadding: 14px; emojiReplacePadding: 14px;
connectingBG: #ffffffee;
connectingColor: #777777;
connectingPadding: margins(5px, 5px, 5px, 5px); connectingPadding: margins(5px, 5px, 5px, 5px);
dragBg: #ffffff;
dragFont: font(28px semibold); dragFont: font(28px semibold);
dragSubfont: font(20px semibold); dragSubfont: font(20px semibold);
dragColor: #777777; dragColor: windowSubTextFg;
dragDropColor: windowActiveTextFg; dragDropColor: windowActiveTextFg;
dragMargin: margins(0px, 10px, 0px, 10px); dragMargin: margins(0px, 10px, 0px, 10px);
@ -337,19 +230,17 @@ maxGifSize: 320px;
maxSignatureSize: 144px; maxSignatureSize: 144px;
mvThickFont: semiboldFont; mvThickFont: semiboldFont;
mvFont: font(fsize); mvFont: normalFont;
mvTextLeft: 16px; mvTextLeft: 16px;
mvTextSkip: 10px; mvTextSkip: 10px;
mvHeaderTop: 48px; mvHeaderTop: 48px;
mvTextTop: 24px; mvTextTop: 24px;
mvTextColor: #ffffff;
mvTextOpacity: 0.5; mvTextOpacity: 0.5;
mvTextOverOpacity: 1; mvTextOverOpacity: 1;
mvIconOpacity: 0.45; mvIconOpacity: 0.45;
mvIconOverOpacity: 1; mvIconOverOpacity: 1;
mvControlFg: #ffffff;
mvControlBgOpacity: 0.3; mvControlBgOpacity: 0.3;
mvControlMargin: 0px; mvControlMargin: 0px;
mvControlSize: 90px; mvControlSize: 90px;
@ -366,34 +257,28 @@ mvSwipeDistance: 80px;
mvCaptionPadding: margins(18px, 10px, 18px, 10px); mvCaptionPadding: margins(18px, 10px, 18px, 10px);
mvCaptionMargin: size(11px, 11px); mvCaptionMargin: size(11px, 11px);
mvCaptionRadius: 2px; mvCaptionRadius: 2px;
mvCaptionFg: #ffffff;
mvCaptionBg: #11111180;
mvCaptionFont: font(fsize); mvCaptionFont: font(fsize);
medviewSaveMsgCheck: icon {{ "mediaview_save_check", #ffffff }}; medviewSaveMsgCheck: icon {{ "mediaview_save_check", mediaviewSaveMsgFg }};
medviewSaveMsgFont: font(16px); medviewSaveMsgFont: font(16px);
medviewSaveMsgPadding: margins(55px, 19px, 29px, 20px); medviewSaveMsgPadding: margins(55px, 19px, 29px, 20px);
medviewSaveMsgCheckPos: point(23px, 21px); medviewSaveMsgCheckPos: point(23px, 21px);
medviewSaveMsgShowing: 200; medviewSaveMsgShowing: 200;
medviewSaveMsgShown: 2000; medviewSaveMsgShown: 2000;
medviewSaveMsgHiding: 2500; medviewSaveMsgHiding: 2500;
medviewSaveMsgFg: #ffffff;
medviewSaveMsg: #000000b2;
radialSize: size(50px, 50px); radialSize: size(50px, 50px);
radialLine: 3px; radialLine: 3px;
radialDuration: 350; radialDuration: 350;
radialPeriod: 3000; radialPeriod: 3000;
radialFg: #ffffff;
radialBg: #00000056;
youtubeIcon: icon { youtubeIcon: icon {
{ "media_youtube_play_bg", #e83131c8 }, { "media_youtube_play_bg", youtubePlayIconBg },
{ "media_youtube_play", #ffffff, point(24px, 12px) }, { "media_youtube_play", youtubePlayIconFg, point(24px, 12px) },
}; };
videoIcon: icon { videoIcon: icon {
{ "media_video_play_bg", #0000007f }, { "media_video_play_bg", videoPlayIconBg },
{ "media_video_play", #ffffff, point(12px, 12px) }, { "media_video_play", videoPlayIconFg, point(12px, 12px) },
}; };
locationSize: size(320px, 240px); locationSize: size(320px, 240px);
@ -424,7 +309,7 @@ inlineTitleFg: windowFg;
inlineDescriptionFg: windowSubTextFg; inlineDescriptionFg: windowSubTextFg;
inlineRowMargin: 6px; inlineRowMargin: 6px;
inlineRowBorder: 1px; inlineRowBorder: 1px;
inlineRowBorderFg: #eaeaea; inlineRowBorderFg: shadowFg;
inlineRowFileNameTop: 2px; inlineRowFileNameTop: 2px;
inlineRowFileDescriptionTop: 23px; inlineRowFileDescriptionTop: 23px;
inlineResultsMinWidth: 64px; inlineResultsMinWidth: 64px;
@ -433,8 +318,6 @@ inlineDurationMargin: 3px;
toastFont: normalFont; toastFont: normalFont;
toastMaxWidth: 480px; toastMaxWidth: 480px;
toastMinMargin: 13px; toastMinMargin: 13px;
toastBg: medviewSaveMsg;
toastFg: #ffffff;
toastPadding: margins(19px, 13px, 19px, 12px); toastPadding: margins(19px, 13px, 19px, 12px);
toastFadeInDuration: 200; toastFadeInDuration: 200;
toastFadeOutDuration: 1000; toastFadeOutDuration: 1000;

View File

@ -33,7 +33,11 @@ windowBgActive: #40a7e3; // bright blue: fallback for blue filled active areas
windowFgActive: #ffffff; // text on bright blue: fallback for text on active areas windowFgActive: #ffffff; // text on bright blue: fallback for text on active areas
windowActiveTextFg: #168acd; // online blue: fallback for active color windowActiveTextFg: #168acd; // online blue: fallback for active color
windowShadowFg: #000000; // black: fallback for shadow color windowShadowFg: #000000; // black: fallback for shadow color
windowShadowFgFallback: #cdcdcd; // gray: fallback for shadow without opacity windowShadowFgFallback: #f1f1f1; // gray: fallback for shadow without opacity
shadowFg: #00000018;
slideFadeOutBg: #0000003c;
slideFadeOutShadowFg: windowShadowFg;
imageBg: #000000; imageBg: #000000;
imageBgTransparent: #ffffff; imageBgTransparent: #ffffff;
@ -47,6 +51,7 @@ activeButtonFgOver: activeButtonFg;
activeButtonSecondaryFg: #cceeff; activeButtonSecondaryFg: #cceeff;
activeButtonSecondaryFgOver: activeButtonSecondaryFg; activeButtonSecondaryFgOver: activeButtonSecondaryFg;
activeLineFg: #37a1de; activeLineFg: #37a1de;
activeLineFgError: #e48383;
lightButtonBg: windowBg; lightButtonBg: windowBg;
lightButtonBgOver: #e3f1fa; lightButtonBgOver: #e3f1fa;
@ -59,11 +64,43 @@ attentionButtonFgOver: #d14e4e;
attentionButtonBgOver: #fcdfde; attentionButtonBgOver: #fcdfde;
attentionButtonBgRipple: #f4c3c2; attentionButtonBgRipple: #f4c3c2;
outlineButtonBg: windowBg;
outlineButtonBgOver: lightButtonBgOver;
outlineButtonOutlineFg: windowBgActive;
outlineButtonBgRipple: lightButtonBgRipple;
menuBg: windowBg; menuBg: windowBg;
menuBgOver: windowBgOver; menuBgOver: windowBgOver;
menuBgRipple: windowBgRipple; menuBgRipple: windowBgRipple;
menuIconFg: #a8a8a8; menuIconFg: #a8a8a8;
menuIconFgOver: #999999; 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;
// custom title bar for Windows and macOS // custom title bar for Windows and macOS
titleBg: windowBgOver; titleBg: windowBgOver;
@ -72,7 +109,7 @@ titleButtonFg: #ababab;
titleButtonBgOver: #e5e5e5; titleButtonBgOver: #e5e5e5;
titleButtonFgOver: #9a9a9a; titleButtonFgOver: #9a9a9a;
titleButtonCloseBgOver: #e81123; titleButtonCloseBgOver: #e81123;
titleButtonCloseFgOver: #ffffff; titleButtonCloseFgOver: windowFgActive;
titleFgActive: #3e3c3e; titleFgActive: #3e3c3e;
titleFg: #acacac; titleFg: #acacac;
@ -112,23 +149,23 @@ contactsStatusFg: windowSubTextFg;
contactsStatusFgOver: windowSubTextFgOver; contactsStatusFgOver: windowSubTextFgOver;
contactsStatusFgOnline: windowActiveTextFg; contactsStatusFgOnline: windowActiveTextFg;
photoCropFadeBg: #0000007f; photoCropFadeBg: layerBg;
photoCropPointFg: #ffffff7f; photoCropPointFg: #ffffff7f;
// settings
notificationsBoxMonitorFg: windowFg;
notificationSampleUserpicFg: windowBgActive;
notificationSampleCloseFg: #d7d7d7 | windowSubTextFg;
notificationSampleTextFg: #d7d7d7 | windowSubTextFg;
notificationSampleNameFg: #939393 | windowSubTextFg;
// intro // intro
introBg: windowBg; introBg: windowBg;
introTitleFg: windowBoldFg; introTitleFg: windowBoldFg;
introDescriptionFg: windowSubTextFg; introDescriptionFg: windowSubTextFg;
introErrorFg: windowSubTextFg; introErrorFg: windowSubTextFg;
introCoverTopBg: #0f89d0;
introCoverBottomBg: #39b0f0;
introCoverIconsFg: #5ec6ff;
introCoverPlaneTrace: #5ec6ff69;
introCoverPlaneInner: #c6d8e8;
introCoverPlaneOuter: #a1bed4;
introCoverPlaneTop: #ffffff;
// dialogs // dialogs
dialogsMenuIconFg: menuIconFg; dialogsMenuIconFg: menuIconFg;
dialogsMenuIconFgOver: menuIconFgOver; dialogsMenuIconFgOver: menuIconFgOver;
@ -181,6 +218,10 @@ dialogsUnreadFgActive: dialogsBgActive;
dialogsForwardBg: dialogsBgActive; dialogsForwardBg: dialogsBgActive;
dialogsForwardFg: dialogsNameFgActive; dialogsForwardFg: dialogsNameFgActive;
searchedBarBg: windowBgOver;
searchedBarBorder: shadowFg;
searchedBarFg: windowSubTextFgOver;
// history // history
topBarBg: windowBg; topBarBg: windowBg;
@ -188,8 +229,157 @@ emojiPanBg: windowBg;
emojiPanCategories: #f7f7f7 | windowBg; emojiPanCategories: #f7f7f7 | windowBg;
emojiPanHeaderFg: windowSubTextFg; emojiPanHeaderFg: windowSubTextFg;
emojiPanHeaderBg: #fffffff2 | emojiPanBg; emojiPanHeaderBg: #fffffff2 | emojiPanBg;
stickerPanDeleteBg: #000000cc;
stickerPanDeleteFg: windowFgActive;
stickerPreviewBg: #ffffffb0;
historyComposeAreaBg: windowBg; 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; // red
historyPeer1UserpicBg: #ed9482;
historyPeer1UserpicFg: #d3644b;
historyPeer2NameFg: #4fad2d; // green
historyPeer2UserpicBg: #a8db92;
historyPeer2UserpicFg: #75c057;
historyPeer3NameFg: #d09306; // yellow
historyPeer3UserpicBg: #efd289;
historyPeer3UserpicFg: #e4a861;
historyPeer4NameFg: windowActiveTextFg; // blue
historyPeer4UserpicBg: #8fbfe9;
historyPeer4UserpicFg: #649fd3;
historyPeer5NameFg: #8544d6; // purple
historyPeer5UserpicBg: #9992e4;
historyPeer5UserpicFg: #7b72cf;
historyPeer6NameFg: #cd4073; // pink
historyPeer6UserpicBg: #ffa9c3;
historyPeer6UserpicFg: #e87497;
historyPeer7NameFg: #2996ad; // sea
historyPeer7UserpicBg: #8eccdb;
historyPeer7UserpicFg: #5eb2c7;
historyPeer8NameFg: #ce671b; // orange
historyPeer8UserpicBg: #f7b37c;
historyPeer8UserpicFg: #de8d62;
historyScrollBarBg: #556e837a;
historyScrollBarBgOver: #556e83bc;
historyScrollBg: #556e834c;
historyScrollBgOver: #556e836b;
msgInBg: windowBg;
msgInBgSelected: #c2dcf2; // #358cd4 with 30% opacity
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; // blue
msgFile1BgDark: #5c9ece;
msgFile1BgOver: #5294c4;
msgFile1BgSelected: #5099d0;
msgFile2Bg: #61b96e; // green
msgFile2BgDark: #4da859;
msgFile2BgOver: #44a050;
msgFile2BgSelected: #46a07e;
msgFile3Bg: #e47272; // red
msgFile3BgDark: #cd5b5e;
msgFile3BgOver: #c35154;
msgFile3BgSelected: #9f6a82;
msgFile4Bg: #efc274; // yellow
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; historyComposeIconFg: menuIconFg;
historyComposeIconFgOver: menuIconFgOver; historyComposeIconFgOver: menuIconFgOver;
historySendIconFg: windowBgActive; historySendIconFg: windowBgActive;
@ -203,19 +393,32 @@ historyComposeButtonBg: historyComposeAreaBg;
historyComposeButtonBgOver: windowBgOver; historyComposeButtonBgOver: windowBgOver;
historyComposeButtonBgRipple: windowBgRipple; historyComposeButtonBgRipple: windowBgRipple;
historyTextInFg: windowFg; // overview
historyTextOutFg: windowFg; overviewCheckBg: #00000040;
historyCaptionInFg: historyTextInFg; overviewCheckFg: windowBg;
historyCaptionOutFg: historyTextOutFg; overviewCheckFgActive: windowBg;
historyFileNameInFg: historyTextInFg; overviewPhotoSelectOverlay: #40ace333;
historyFileNameOutFg: historyTextOutFg;
historyOutIconFg: dialogsSentIconFg;
historyOutIconFgSelected: #4da79f;
historyIconFgInverted: #ffffff;
historySystemBg: #89a0b47f; // profile
historySystemBgSelected: #bbc8d4a2; profileStatusFgOver: #7c99b2;
historySystemFg: #ffffff;
// settings
notificationsBoxMonitorFg: windowFg;
notificationsBoxScreenBg: dialogsBgActive; // #6389a8;
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;
// mediaview // mediaview
mediaviewFileBg: windowBg; mediaviewFileBg: windowBg;
@ -230,11 +433,27 @@ mediaviewFileExtFg: activeButtonFg;
mediaviewMenuBg: #383838; mediaviewMenuBg: #383838;
mediaviewMenuBgOver: #505050; mediaviewMenuBgOver: #505050;
mediaviewMenuBgRipple: #676767; mediaviewMenuBgRipple: #676767;
mediaviewMenuFg: #ffffff; mediaviewMenuFg: windowFgActive;
mediaviewBg: #222222eb; mediaviewBg: #222222eb;
mediaviewVideoBg: #000000; mediaviewVideoBg: imageBg;
mediaviewControlBg: #0000003c; 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;
// notification // notification
notificationBg: windowBg; notificationBg: windowBg;

View File

@ -34,7 +34,10 @@ windowBgActive: #40a7e3;
windowFgActive: #ffffff; windowFgActive: #ffffff;
windowActiveTextFg: #168acd; windowActiveTextFg: #168acd;
windowShadowFg: #000000; windowShadowFg: #000000;
windowShadowFgFallback: #cdcdcd; windowShadowFgFallback: #f1f1f1;
shadowFg: #00000018;
slideFadeOutBg: #0000003c;
slideFadeOutShadowFg: windowShadowFg;
imageBg: #000000; imageBg: #000000;
imageBgTransparent: #ffffff; imageBgTransparent: #ffffff;
activeButtonBg: windowBgActive; activeButtonBg: windowBgActive;
@ -45,6 +48,7 @@ activeButtonFgOver: activeButtonFg;
activeButtonSecondaryFg: #cceeff; activeButtonSecondaryFg: #cceeff;
activeButtonSecondaryFgOver: activeButtonSecondaryFg; activeButtonSecondaryFgOver: activeButtonSecondaryFg;
activeLineFg: #37a1de; activeLineFg: #37a1de;
activeLineFgError: #e48383;
lightButtonBg: windowBg; lightButtonBg: windowBg;
lightButtonBgOver: #e3f1fa; lightButtonBgOver: #e3f1fa;
lightButtonBgRipple: #c9e4f6; lightButtonBgRipple: #c9e4f6;
@ -54,18 +58,43 @@ attentionButtonFg: #d14e4e;
attentionButtonFgOver: #d14e4e; attentionButtonFgOver: #d14e4e;
attentionButtonBgOver: #fcdfde; attentionButtonBgOver: #fcdfde;
attentionButtonBgRipple: #f4c3c2; attentionButtonBgRipple: #f4c3c2;
outlineButtonBg: windowBg;
outlineButtonBgOver: lightButtonBgOver;
outlineButtonOutlineFg: windowBgActive;
outlineButtonBgRipple: lightButtonBgRipple;
menuBg: windowBg; menuBg: windowBg;
menuBgOver: windowBgOver; menuBgOver: windowBgOver;
menuBgRipple: windowBgRipple; menuBgRipple: windowBgRipple;
menuIconFg: #a8a8a8; menuIconFg: #a8a8a8;
menuIconFgOver: #999999; 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; titleBg: windowBgOver;
titleShadow: #00000003; titleShadow: #00000003;
titleButtonFg: #ababab; titleButtonFg: #ababab;
titleButtonBgOver: #e5e5e5; titleButtonBgOver: #e5e5e5;
titleButtonFgOver: #9a9a9a; titleButtonFgOver: #9a9a9a;
titleButtonCloseBgOver: #e81123; titleButtonCloseBgOver: #e81123;
titleButtonCloseFgOver: #ffffff; titleButtonCloseFgOver: windowFgActive;
titleFgActive: #3e3c3e; titleFgActive: #3e3c3e;
titleFg: #acacac; titleFg: #acacac;
trayCounterBg: #f23c34; trayCounterBg: #f23c34;
@ -94,17 +123,19 @@ contactsNameFg: boxTextFg;
contactsStatusFg: windowSubTextFg; contactsStatusFg: windowSubTextFg;
contactsStatusFgOver: windowSubTextFgOver; contactsStatusFgOver: windowSubTextFgOver;
contactsStatusFgOnline: windowActiveTextFg; contactsStatusFgOnline: windowActiveTextFg;
photoCropFadeBg: #0000007f; photoCropFadeBg: layerBg;
photoCropPointFg: #ffffff7f; photoCropPointFg: #ffffff7f;
notificationsBoxMonitorFg: windowFg;
notificationSampleUserpicFg: windowBgActive;
notificationSampleCloseFg: #d7d7d7; // windowSubTextFg;
notificationSampleTextFg: #d7d7d7; // windowSubTextFg;
notificationSampleNameFg: #939393; // windowSubTextFg;
introBg: windowBg; introBg: windowBg;
introTitleFg: windowBoldFg; introTitleFg: windowBoldFg;
introDescriptionFg: windowSubTextFg; introDescriptionFg: windowSubTextFg;
introErrorFg: windowSubTextFg; introErrorFg: windowSubTextFg;
introCoverTopBg: #0f89d0;
introCoverBottomBg: #39b0f0;
introCoverIconsFg: #5ec6ff;
introCoverPlaneTrace: #5ec6ff69;
introCoverPlaneInner: #c6d8e8;
introCoverPlaneOuter: #a1bed4;
introCoverPlaneTop: #ffffff;
dialogsMenuIconFg: menuIconFg; dialogsMenuIconFg: menuIconFg;
dialogsMenuIconFgOver: menuIconFgOver; dialogsMenuIconFgOver: menuIconFgOver;
dialogsBg: windowBg; dialogsBg: windowBg;
@ -151,12 +182,150 @@ dialogsUnreadBgMutedActive: dialogsDraftFgActive;
dialogsUnreadFgActive: dialogsBgActive; dialogsUnreadFgActive: dialogsBgActive;
dialogsForwardBg: dialogsBgActive; dialogsForwardBg: dialogsBgActive;
dialogsForwardFg: dialogsNameFgActive; dialogsForwardFg: dialogsNameFgActive;
searchedBarBg: windowBgOver;
searchedBarBorder: shadowFg;
searchedBarFg: windowSubTextFgOver;
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; 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: #ed9482;
historyPeer1UserpicFg: #d3644b;
historyPeer2NameFg: #4fad2d;
historyPeer2UserpicBg: #a8db92;
historyPeer2UserpicFg: #75c057;
historyPeer3NameFg: #d09306;
historyPeer3UserpicBg: #efd289;
historyPeer3UserpicFg: #e4a861;
historyPeer4NameFg: windowActiveTextFg;
historyPeer4UserpicBg: #8fbfe9;
historyPeer4UserpicFg: #649fd3;
historyPeer5NameFg: #8544d6;
historyPeer5UserpicBg: #9992e4;
historyPeer5UserpicFg: #7b72cf;
historyPeer6NameFg: #cd4073;
historyPeer6UserpicBg: #ffa9c3;
historyPeer6UserpicFg: #e87497;
historyPeer7NameFg: #2996ad;
historyPeer7UserpicBg: #8eccdb;
historyPeer7UserpicFg: #5eb2c7;
historyPeer8NameFg: #ce671b;
historyPeer8UserpicBg: #f7b37c;
historyPeer8UserpicFg: #de8d62;
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; historyComposeIconFg: menuIconFg;
historyComposeIconFgOver: menuIconFgOver; historyComposeIconFgOver: menuIconFgOver;
historySendIconFg: windowBgActive; historySendIconFg: windowBgActive;
@ -168,18 +337,24 @@ historyReplyCancelFgOver: cancelIconFgOver;
historyComposeButtonBg: historyComposeAreaBg; historyComposeButtonBg: historyComposeAreaBg;
historyComposeButtonBgOver: windowBgOver; historyComposeButtonBgOver: windowBgOver;
historyComposeButtonBgRipple: windowBgRipple; historyComposeButtonBgRipple: windowBgRipple;
historyTextInFg: windowFg; overviewCheckBg: #00000040;
historyTextOutFg: windowFg; overviewCheckFg: windowBg;
historyCaptionInFg: historyTextInFg; overviewCheckFgActive: windowBg;
historyCaptionOutFg: historyTextOutFg; overviewPhotoSelectOverlay: #40ace333;
historyFileNameInFg: historyTextInFg; profileStatusFgOver: #7c99b2;
historyFileNameOutFg: historyTextOutFg; notificationsBoxMonitorFg: windowFg;
historyOutIconFg: dialogsSentIconFg; notificationsBoxScreenBg: dialogsBgActive;
historyOutIconFgSelected: #4da79f; notificationSampleUserpicFg: windowBgActive;
historyIconFgInverted: #ffffff; notificationSampleCloseFg: #d7d7d7; // windowSubTextFg;
historySystemBg: #89a0b47f; notificationSampleTextFg: #d7d7d7; // windowSubTextFg;
historySystemBgSelected: #bbc8d4a2; notificationSampleNameFg: #939393; // windowSubTextFg;
historySystemFg: #ffffff; mainMenuBg: windowBg;
mainMenuCoverBg: dialogsBgActive;
mainMenuCoverFg: windowFgActive;
mediaPlayerBg: windowBg;
mediaPlayerActiveFg: windowBgActive;
mediaPlayerInactiveFg: sliderBgInactive;
mediaPlayerDisabledFg: #9dd1ef;
mediaviewFileBg: windowBg; mediaviewFileBg: windowBg;
mediaviewFileNameFg: windowFg; mediaviewFileNameFg: windowFg;
mediaviewFileSizeFg: windowSubTextFg; mediaviewFileSizeFg: windowSubTextFg;
@ -191,8 +366,23 @@ mediaviewFileExtFg: activeButtonFg;
mediaviewMenuBg: #383838; mediaviewMenuBg: #383838;
mediaviewMenuBgOver: #505050; mediaviewMenuBgOver: #505050;
mediaviewMenuBgRipple: #676767; mediaviewMenuBgRipple: #676767;
mediaviewMenuFg: #ffffff; mediaviewMenuFg: windowFgActive;
mediaviewBg: #222222eb; mediaviewBg: #222222eb;
mediaviewVideoBg: #000000; mediaviewVideoBg: imageBg;
mediaviewControlBg: #0000003c; 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; notificationBg: windowBg;

View File

@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,10,20,2 FILEVERSION 0,10,20,3
PRODUCTVERSION 0,10,20,2 PRODUCTVERSION 0,10,20,3
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.2" VALUE "FileVersion", "0.10.20.3"
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.2" VALUE "ProductVersion", "0.10.20.3"
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,2 FILEVERSION 0,10,20,3
PRODUCTVERSION 0,10,20,2 PRODUCTVERSION 0,10,20,3
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.2" VALUE "FileVersion", "0.10.20.3"
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.2" VALUE "ProductVersion", "0.10.20.3"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -2226,17 +2226,17 @@ namespace {
} }
prepareCorners(MenuCorners, st::buttonRadius, st::menuBg); prepareCorners(MenuCorners, st::buttonRadius, st::menuBg);
prepareCorners(BoxCorners, st::boxRadius, st::boxBg); prepareCorners(BoxCorners, st::boxRadius, st::boxBg);
prepareCorners(BotKbOverCorners, st::dateRadius, st::msgBotKbOverBg); prepareCorners(BotKbOverCorners, st::dateRadius, st::msgBotKbOverBgAdd);
prepareCorners(StickerCorners, st::dateRadius, st::msgServiceBg); prepareCorners(StickerCorners, st::dateRadius, st::msgServiceBg);
prepareCorners(StickerSelectedCorners, st::dateRadius, st::msgServiceSelectBg); prepareCorners(StickerSelectedCorners, st::dateRadius, st::msgServiceBgSelected);
prepareCorners(SelectedOverlaySmallCorners, st::buttonRadius, st::msgSelectOverlay); prepareCorners(SelectedOverlaySmallCorners, st::buttonRadius, st::msgSelectOverlay);
prepareCorners(SelectedOverlayLargeCorners, msgRadius(), st::msgSelectOverlay); prepareCorners(SelectedOverlayLargeCorners, msgRadius(), st::msgSelectOverlay);
prepareCorners(DateCorners, st::dateRadius, st::msgDateImgBg); prepareCorners(DateCorners, st::dateRadius, st::msgDateImgBg);
prepareCorners(DateSelectedCorners, st::dateRadius, st::msgDateImgBgSelected); prepareCorners(DateSelectedCorners, st::dateRadius, st::msgDateImgBgSelected);
prepareCorners(InShadowCorners, msgRadius(), st::msgInShadow); prepareCorners(InShadowCorners, msgRadius(), st::msgInShadow);
prepareCorners(InSelectedShadowCorners, msgRadius(), st::msgInShadowSelected); prepareCorners(InSelectedShadowCorners, msgRadius(), st::msgInShadowSelected);
prepareCorners(ForwardCorners, msgRadius(), st::forwardBg); prepareCorners(ForwardCorners, msgRadius(), st::historyForwardChooseBg);
prepareCorners(MediaviewSaveCorners, st::mediaviewControllerRadius, st::medviewSaveMsg); prepareCorners(MediaviewSaveCorners, st::mediaviewControllerRadius, st::mediaviewSaveMsgBg);
prepareCorners(EmojiHoverCorners, st::buttonRadius, st::emojiPanHover); prepareCorners(EmojiHoverCorners, st::buttonRadius, st::emojiPanHover);
prepareCorners(StickerHoverCorners, st::buttonRadius, st::emojiPanHover); prepareCorners(StickerHoverCorners, st::buttonRadius, st::emojiPanHover);
prepareCorners(BotKeyboardCorners, st::buttonRadius, st::botKbBg); prepareCorners(BotKeyboardCorners, st::buttonRadius, st::botKbBg);
@ -2244,10 +2244,10 @@ namespace {
prepareCorners(BotKeyboardDownCorners, st::buttonRadius, st::botKbDownBg); prepareCorners(BotKeyboardDownCorners, st::buttonRadius, st::botKbDownBg);
prepareCorners(PhotoSelectOverlayCorners, st::buttonRadius, st::overviewPhotoSelectOverlay); prepareCorners(PhotoSelectOverlayCorners, st::buttonRadius, st::overviewPhotoSelectOverlay);
prepareCorners(DocBlueCorners, st::buttonRadius, st::msgFileBlueColor); prepareCorners(Doc1Corners, st::buttonRadius, st::msgFile1Bg);
prepareCorners(DocGreenCorners, st::buttonRadius, st::msgFileGreenColor); prepareCorners(Doc2Corners, st::buttonRadius, st::msgFile2Bg);
prepareCorners(DocRedCorners, st::buttonRadius, st::msgFileRedColor); prepareCorners(Doc3Corners, st::buttonRadius, st::msgFile3Bg);
prepareCorners(DocYellowCorners, st::buttonRadius, st::msgFileYellowColor); prepareCorners(Doc4Corners, st::buttonRadius, st::msgFile4Bg);
prepareCorners(MessageInCorners, msgRadius(), st::msgInBg, &st::msgInShadow); prepareCorners(MessageInCorners, msgRadius(), st::msgInBg, &st::msgInShadow);
prepareCorners(MessageInSelectedCorners, msgRadius(), st::msgInBgSelected, &st::msgInShadowSelected); prepareCorners(MessageInSelectedCorners, msgRadius(), st::msgInBgSelected, &st::msgInShadowSelected);
@ -2309,7 +2309,7 @@ namespace {
delete ::corners[StickerSelectedCorners].p[i]; ::corners[StickerSelectedCorners].p[i] = nullptr; delete ::corners[StickerSelectedCorners].p[i]; ::corners[StickerSelectedCorners].p[i] = nullptr;
} }
prepareCorners(StickerCorners, st::dateRadius, st::msgServiceBg); prepareCorners(StickerCorners, st::dateRadius, st::msgServiceBg);
prepareCorners(StickerSelectedCorners, st::dateRadius, st::msgServiceSelectBg); prepareCorners(StickerSelectedCorners, st::dateRadius, st::msgServiceBgSelected);
if (App::main()) { if (App::main()) {
App::main()->updateScrollColors(); App::main()->updateScrollColors();

View File

@ -51,6 +51,7 @@ void BoxContent::setInner(object_ptr<TWidget> inner, const style::ScrollArea &st
if (!_scroll) { if (!_scroll) {
_scroll.create(this, st); _scroll.create(this, st);
connect(_scroll, SIGNAL(scrolled()), this, SLOT(onScroll())); connect(_scroll, SIGNAL(scrolled()), this, SLOT(onScroll()));
connect(_scroll, SIGNAL(innerResized()), this, SLOT(onInnerResize()));
_topShadow.create(this, object_ptr<BoxLayerTitleShadow>(this)); _topShadow.create(this, object_ptr<BoxLayerTitleShadow>(this));
_bottomShadow.create(this, object_ptr<BoxLayerTitleShadow>(this)); _bottomShadow.create(this, object_ptr<BoxLayerTitleShadow>(this));
@ -92,15 +93,14 @@ void BoxContent::onDraggingScrollTimer() {
} }
void BoxContent::updateInnerVisibleTopBottom() { void BoxContent::updateInnerVisibleTopBottom() {
if (auto widget = static_cast<TWidget*>(_scroll->widget())) { if (auto widget = static_cast<TWidget*>(_scroll ? _scroll->widget() : nullptr)) {
auto top = _scroll->scrollTop(); auto top = _scroll->scrollTop();
widget->setVisibleTopBottom(top, top + _scroll->height()); widget->setVisibleTopBottom(top, top + _scroll->height());
} }
} }
void BoxContent::onScroll() { void BoxContent::updateShadowsVisibility() {
if (_scroll) { if (!_scroll) return;
updateInnerVisibleTopBottom();
auto top = _scroll->scrollTop(); auto top = _scroll->scrollTop();
if (top > 0 || _innerTopSkip > 0) { if (top > 0 || _innerTopSkip > 0) {
@ -114,6 +114,15 @@ void BoxContent::onScroll() {
_bottomShadow->hideAnimated(); _bottomShadow->hideAnimated();
} }
} }
void BoxContent::onScroll() {
updateInnerVisibleTopBottom();
updateShadowsVisibility();
}
void BoxContent::onInnerResize() {
updateInnerVisibleTopBottom();
updateShadowsVisibility();
} }
void BoxContent::setInnerTopSkip(int innerTopSkip, bool scrollBottomFixed) { void BoxContent::setInnerTopSkip(int innerTopSkip, bool scrollBottomFixed) {

View File

@ -148,6 +148,7 @@ protected:
private slots: private slots:
void onScroll(); void onScroll();
void onInnerResize();
void onDraggingScrollTimer(); void onDraggingScrollTimer();
@ -156,6 +157,7 @@ private:
void setInner(object_ptr<TWidget> inner, const style::ScrollArea &st); void setInner(object_ptr<TWidget> inner, const style::ScrollArea &st);
void updateScrollAreaGeometry(); void updateScrollAreaGeometry();
void updateInnerVisibleTopBottom(); void updateInnerVisibleTopBottom();
void updateShadowsVisibility();
object_ptr<TWidget> doTakeInnerWidget(); object_ptr<TWidget> doTakeInnerWidget();
BoxContentDelegate *getDelegate() const { BoxContentDelegate *getDelegate() const {

View File

@ -79,7 +79,7 @@ boxLayerTitlePosition: point(23px, 16px);
boxLayerTitleHeight: 56px; boxLayerTitleHeight: 56px;
boxLayerTitleAdditionalSkip: 9px; boxLayerTitleAdditionalSkip: 9px;
boxLayerTitleAdditionalFont: normalFont; boxLayerTitleAdditionalFont: normalFont;
boxLayerTitleShadow: #0000001a; boxLayerTitleShadow: shadowFg;
boxLayerScroll: defaultSolidScroll; boxLayerScroll: defaultSolidScroll;
boxTopMargin: 6px; boxTopMargin: 6px;
@ -146,7 +146,7 @@ boxPhotoTitlePosition: point(28px, 20px);
boxPhotoPadding: margins(28px, 28px, 28px, 18px); boxPhotoPadding: margins(28px, 28px, 28px, 18px);
boxPhotoCompressedSkip: 20px; boxPhotoCompressedSkip: 20px;
boxPhotoCaptionSkip: 8px; boxPhotoCaptionSkip: 8px;
boxPhotoTextFg: #808080; boxPhotoTextFg: windowSubTextFg;
cropPointSize: 10px; cropPointSize: 10px;
cropSkip: 13px; cropSkip: 13px;
@ -157,7 +157,7 @@ confirmInviteTitle: FlatLabel(defaultFlatLabel) {
align: align(center); align: align(center);
width: 320px; width: 320px;
maxHeight: 24px; maxHeight: 24px;
textFg: #333333; textFg: windowBoldFg;
} }
confirmInviteStatus: FlatLabel(defaultFlatLabel) { confirmInviteStatus: FlatLabel(defaultFlatLabel) {
font: font(boxFontSize); font: font(boxFontSize);
@ -199,8 +199,8 @@ aboutRevokePublicLabel: FlatLabel(defaultFlatLabel) {
textFg: windowFg; textFg: windowFg;
} }
contactUserIcon: icon {{ "add_contact_user", #999999 }}; contactUserIcon: icon {{ "add_contact_user", menuIconFg }};
contactPhoneIcon: icon {{ "add_contact_phone", #999999 }}; contactPhoneIcon: icon {{ "add_contact_phone", menuIconFg }};
contactIconTop: 28px; contactIconTop: 28px;
contactsAddIconAbove: icon {{ "contacts_add", activeButtonFg, point(18px, 18px) }}; contactsAddIconAbove: icon {{ "contacts_add", activeButtonFg, point(18px, 18px) }};
@ -235,7 +235,6 @@ contactsCheckPosition: point(8px, 16px);
contactsAllAdminsTop: 15px; contactsAllAdminsTop: 15px;
contactsAboutBg: windowBgOver; contactsAboutBg: windowBgOver;
contactsAboutFg: windowSubTextFgOver; contactsAboutFg: windowSubTextFgOver;
contactsAboutShadow: #0000001F;
contactsAboutTop: 60px; contactsAboutTop: 60px;
contactsAboutBottom: 19px; contactsAboutBottom: 19px;
@ -277,16 +276,15 @@ contactsMultiSelect: MultiSelect {
textBg: transparent; textBg: transparent;
textMargins: margins(2px, 7px, 2px, 0px); textMargins: margins(2px, 7px, 2px, 0px);
placeholderFg: #999999; placeholderFg: placeholderFg;
placeholderFgActive: #aaaaaa; placeholderFgActive: placeholderFgActive;
placeholderFgError: #aaaaaa; placeholderFgError: placeholderFgActive;
placeholderMargins: margins(2px, 0px, 2px, 0px); placeholderMargins: margins(2px, 0px, 2px, 0px);
placeholderScale: 0.; placeholderScale: 0.;
placeholderFont: normalFont; placeholderFont: normalFont;
border: 0px; border: 0px;
borderActive: 0px; borderActive: 0px;
borderError: 0px;
heightMin: 32px; heightMin: 32px;
@ -329,8 +327,8 @@ contactsPhotoCheckbox: RoundImageCheckbox {
check: icon {{ "default_checkbox_check", windowFgActive, point(3px, 6px) }}; check: icon {{ "default_checkbox_check", windowFgActive, point(3px, 6px) }};
} }
} }
contactsPhotoDisabledCheckFg: #bbbbbb; contactsPhotoDisabledCheckFg: menuIconFg;
contactsNameCheckedFg: #2b88b8; contactsNameCheckedFg: windowActiveTextFg;
contactsRipple: defaultRippleAnimation; contactsRipple: defaultRippleAnimation;
contactsMarginTop: 4px; contactsMarginTop: 4px;
@ -360,7 +358,6 @@ notificationsBoxMonitorTop: 63px;
notificationsBoxMonitor: icon {{ "monitor", notificationsBoxMonitorFg }}; notificationsBoxMonitor: icon {{ "monitor", notificationsBoxMonitorFg }};
notificationsBoxScreenTop: 10px; notificationsBoxScreenTop: 10px;
notificationsBoxScreenSize: size(280px, 160px); notificationsBoxScreenSize: size(280px, 160px);
notificationsBoxScreenBg: #6389a8;
notificationsBoxCountLabelTop: 80px; notificationsBoxCountLabelTop: 80px;
notificationsBoxCountTop: 30px; notificationsBoxCountTop: 30px;
@ -383,17 +380,17 @@ sessionPadding: margins(21px, 10px, 21px, 0px);
sessionNameFont: msgNameFont; sessionNameFont: msgNameFont;
sessionNameFg: boxTextFg; sessionNameFg: boxTextFg;
sessionWhenFont: msgDateFont; sessionWhenFont: msgDateFont;
sessionWhenFg: #aaaaaa; sessionWhenFg: windowSubTextFg;
sessionInfoFont: msgFont; sessionInfoFont: msgFont;
sessionInfoFg: #888888; sessionInfoFg: windowSubTextFg;
sessionTerminateTop: 28px; sessionTerminateTop: 28px;
sessionTerminateSkip: 22px; sessionTerminateSkip: 22px;
sessionTerminate: IconButton { sessionTerminate: IconButton {
width: 20px; width: 20px;
height: 20px; height: 20px;
icon: simpleCloseIcon; icon: smallCloseIcon;
iconOver: simpleCloseIconOver; iconOver: smallCloseIconOver;
iconPosition: point(5px, 5px); iconPosition: point(5px, 5px);
rippleAreaPosition: point(0px, 0px); rippleAreaPosition: point(0px, 0px);
@ -421,7 +418,7 @@ passcodeTextLine: 28px;
passcodeLittleSkip: 5px; passcodeLittleSkip: 5px;
passcodeSkip: 20px; passcodeSkip: 20px;
newGroupAboutFg: #808080; newGroupAboutFg: windowSubTextFg;
newGroupPadding: margins(4px, 6px, 4px, 3px); newGroupPadding: margins(4px, 6px, 4px, 3px);
newGroupSkip: 27px; newGroupSkip: 27px;
newGroupInfoPadding: margins(0px, -4px, 0px, 1px); newGroupInfoPadding: margins(0px, -4px, 0px, 1px);
@ -431,7 +428,7 @@ newGroupLinkTop: 3px;
newGroupLinkFont: font(16px); newGroupLinkFont: font(16px);
newGroupPhotoSize: 76px; newGroupPhotoSize: 76px;
newGroupPhotoIcon: icon {{ "new_chat_photo", #ffffff }}; newGroupPhotoIcon: icon {{ "new_chat_photo", activeButtonFg }};
newGroupPhotoIconPosition: point(23px, 25px); newGroupPhotoIconPosition: point(23px, 25px);
newGroupPhotoDuration: 150; newGroupPhotoDuration: 150;
@ -521,6 +518,6 @@ usernameSkip: 49px;
usernameTextStyle: TextStyle(defaultTextStyle) { usernameTextStyle: TextStyle(defaultTextStyle) {
lineHeight: 20px; lineHeight: 20px;
} }
usernameDefaultFg: #777777; usernameDefaultFg: windowSubTextFg;
downloadPathSkip: 10px; downloadPathSkip: 10px;

View File

@ -1103,7 +1103,7 @@ void ContactsBox::Inner::paintEvent(QPaintEvent *e) {
} else if (_chat && _membersFilter == MembersFilter::Admins) { } else if (_chat && _membersFilter == MembersFilter::Admins) {
text = lang(lng_contacts_loading); text = lang(lng_contacts_loading);
p.fillRect(0, 0, width(), _aboutHeight - st::contactsPadding.bottom() - st::lineWidth, st::contactsAboutBg); p.fillRect(0, 0, width(), _aboutHeight - st::contactsPadding.bottom() - st::lineWidth, st::contactsAboutBg);
p.fillRect(0, _aboutHeight - st::contactsPadding.bottom() - st::lineWidth, width(), st::lineWidth, st::shadowColor); p.fillRect(0, _aboutHeight - st::contactsPadding.bottom() - st::lineWidth, width(), st::lineWidth, st::shadowFg);
int aboutw = width() - st::contactsPadding.left() - st::contactsPadding.right(); int aboutw = width() - st::contactsPadding.left() - st::contactsPadding.right();
(_allAdmins->checked() ? _aboutAllAdmins : _aboutAdmins).draw(p, st::contactsPadding.left(), st::contactsAboutTop, aboutw); (_allAdmins->checked() ? _aboutAllAdmins : _aboutAdmins).draw(p, st::contactsPadding.left(), st::contactsAboutTop, aboutw);

View File

@ -210,8 +210,8 @@ void StickersBox::getArchivedDone(uint64 offsetId, const MTPmessages_ArchivedSti
if (addedSet) { if (addedSet) {
_archived.widget()->updateSize(); _archived.widget()->updateSize();
} else { } else {
_allArchivedLoaded = v.isEmpty() || (offsetId != 0); _allArchivedLoaded = v.isEmpty() || (!changedSets && offsetId != 0);
if (changedSets && !_allArchivedLoaded) { if (changedSets) {
loadMoreArchived(); loadMoreArchived();
} }
} }

View File

@ -277,6 +277,10 @@ void StickerSetBox::Inner::mouseMoveEvent(QMouseEvent *e) {
} }
} }
void StickerSetBox::Inner::leaveEvent(QEvent *e) {
setSelected(-1);
}
void StickerSetBox::Inner::mouseReleaseEvent(QMouseEvent *e) { void StickerSetBox::Inner::mouseReleaseEvent(QMouseEvent *e) {
if (_previewShown >= 0) { if (_previewShown >= 0) {
_previewShown = -1; _previewShown = -1;
@ -296,13 +300,14 @@ void StickerSetBox::Inner::mouseReleaseEvent(QMouseEvent *e) {
} }
void StickerSetBox::Inner::updateSelected() { void StickerSetBox::Inner::updateSelected() {
auto index = stickerFromGlobalPos(QCursor::pos()); auto selected = stickerFromGlobalPos(QCursor::pos());
if (isMasksSet()) { setSelected(isMasksSet() ? -1 : selected);
index = -1;
} }
if (index != _selected) {
void StickerSetBox::Inner::setSelected(int selected) {
if (_selected != selected) {
startOverAnimation(_selected, 1., 0.); startOverAnimation(_selected, 1., 0.);
_selected = index; _selected = selected;
startOverAnimation(_selected, 0., 1.); startOverAnimation(_selected, 0., 1.);
setCursor(_selected >= 0 ? style::cur_pointer : style::cur_default); setCursor(_selected >= 0 ? style::cur_pointer : style::cur_default);
} }

View File

@ -86,6 +86,7 @@ protected:
void mouseMoveEvent(QMouseEvent *e) override; void mouseMoveEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override; void mouseReleaseEvent(QMouseEvent *e) override;
void paintEvent(QPaintEvent *e) override; void paintEvent(QPaintEvent *e) override;
void leaveEvent(QEvent *e) override;
private slots: private slots:
void onPreview(); void onPreview();
@ -96,6 +97,7 @@ signals:
private: private:
void updateSelected(); void updateSelected();
void setSelected(int selected);
void startOverAnimation(int index, float64 from, float64 to); void startOverAnimation(int index, float64 from, float64 to);
int stickerFromGlobalPos(const QPoint &p) const; int stickerFromGlobalPos(const QPoint &p) const;

View File

@ -510,7 +510,7 @@ structure::Value ParsedFile::readStringValue() {
structure::Value ParsedFile::readColorValue() { structure::Value ParsedFile::readColorValue() {
if (auto numberSign = file_.getToken(BasicType::Number)) { if (auto numberSign = file_.getToken(BasicType::Number)) {
if (options_.isPalette || true) { // enable for now if (options_.isPalette) {
auto color = file_.getAnyToken(); auto color = file_.getAnyToken();
if (color.type == BasicType::Int || color.type == BasicType::Name) { if (color.type == BasicType::Int || color.type == BasicType::Name) {
auto chars = tokenValue(color).toLower(); auto chars = tokenValue(color).toLower();

View File

@ -22,7 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "core/utils.h" #include "core/utils.h"
#define BETA_VERSION_MACRO (10020002ULL) #define BETA_VERSION_MACRO (10020003ULL)
constexpr int AppVersion = 10020; constexpr int AppVersion = 10020;
constexpr str_const AppVersionStr = "0.10.20"; constexpr str_const AppVersionStr = "0.10.20";

View File

@ -104,8 +104,8 @@ dialogsUnlockIconOver: icon {{ "dialogs_unlock", dialogsMenuIconFgOver }};
dialogsFilter: FlatInput(defaultFlatInput) { dialogsFilter: FlatInput(defaultFlatInput) {
font: font(fsize); font: font(fsize);
phColor: #949494; phColor: placeholderFg;
phFocusColor: #a4a4a4; phFocusColor: placeholderFgActive;
width: 240px; width: 240px;
height: 32px; height: 32px;
@ -169,10 +169,10 @@ dialogsVerifiedIconActive: icon {
{ "dialogs_verified_check", dialogsVerifiedIconFgActive, point(7px, 7px) }, { "dialogs_verified_check", dialogsVerifiedIconFgActive, point(7px, 7px) },
}; };
historySendingIcon: icon {{ "dialogs_sending", #98d292, point(5px, 5px) }}; historySendingIcon: icon {{ "dialogs_sending", historySendingOutIconFg, point(5px, 5px) }};
historySendingInvertedIcon: icon {{ "dialogs_sending", #ffffffc8, point(5px, 5px) }}; historySendingInvertedIcon: icon {{ "dialogs_sending", historySendingInvertedIconFg, point(5px, 5px) }};
historyViewsSendingIcon: icon {{ "dialogs_sending", #a0adb5, point(3px, 0px) }}; historyViewsSendingIcon: icon {{ "dialogs_sending", historySendingInIconFg, point(3px, 0px) }};
historyViewsSendingInvertedIcon: icon {{ "dialogs_sending", #ffffffc8, point(3px, 0px) }}; historyViewsSendingInvertedIcon: icon {{ "dialogs_sending", historySendingInvertedIconFg, point(3px, 0px) }};
dialogsUpdateButton: FlatButton { dialogsUpdateButton: FlatButton {
color: activeButtonFg; color: activeButtonFg;

View File

@ -166,8 +166,8 @@ void DialogsInner::paintRegion(Painter &p, const QRegion &region, bool paintingO
if (!paintingOther) { if (!paintingOther) {
auto &tag = result->tag; auto &tag = result->tag;
if (selected) { if (selected) {
int skip = (st::mentionHeight - st::simpleCloseIconOver.height()) / 2; int skip = (st::mentionHeight - st::smallCloseIconOver.height()) / 2;
st::simpleCloseIconOver.paint(p, QPoint(fullWidth - st::simpleCloseIconOver.width() - skip, skip), width()); st::smallCloseIconOver.paint(p, QPoint(fullWidth - st::smallCloseIconOver.width() - skip, skip), width());
} }
auto first = (_hashtagFilter.size() < 2) ? QString() : ('#' + tag.mid(0, _hashtagFilter.size() - 1)); auto first = (_hashtagFilter.size() < 2) ? QString() : ('#' + tag.mid(0, _hashtagFilter.size() - 1));
auto second = (_hashtagFilter.size() < 2) ? ('#' + tag) : tag.mid(_hashtagFilter.size() - 1); auto second = (_hashtagFilter.size() < 2) ? ('#' + tag) : tag.mid(_hashtagFilter.size() - 1);

View File

@ -593,9 +593,9 @@ void FieldAutocompleteInner::paintEvent(QPaintEvent *e) {
bool selected = (i == _sel); bool selected = (i == _sel);
if (selected) { if (selected) {
p.fillRect(0, i * st::mentionHeight, width(), st::mentionHeight, st::mentionBgOver); p.fillRect(0, i * st::mentionHeight, width(), st::mentionHeight, st::mentionBgOver);
int skip = (st::mentionHeight - st::simpleCloseIconOver.height()) / 2; int skip = (st::mentionHeight - st::smallCloseIconOver.height()) / 2;
if (!_hrows->isEmpty() || (!_mrows->isEmpty() && i < _recentInlineBotsInRows)) { if (!_hrows->isEmpty() || (!_mrows->isEmpty() && i < _recentInlineBotsInRows)) {
st::simpleCloseIconOver.paint(p, QPoint(width() - st::simpleCloseIconOver.width() - skip, i * st::mentionHeight + skip), width()); st::smallCloseIconOver.paint(p, QPoint(width() - st::smallCloseIconOver.width() - skip, i * st::mentionHeight + skip), width());
} }
} }
if (!_mrows->isEmpty()) { if (!_mrows->isEmpty()) {
@ -681,9 +681,9 @@ void FieldAutocompleteInner::paintEvent(QPaintEvent *e) {
} }
} }
} }
p.fillRect(Adaptive::OneColumn() ? 0 : st::lineWidth, _parent->innerBottom() - st::lineWidth, width() - (Adaptive::OneColumn() ? 0 : st::lineWidth), st::lineWidth, st::shadowColor->b); p.fillRect(Adaptive::OneColumn() ? 0 : st::lineWidth, _parent->innerBottom() - st::lineWidth, width() - (Adaptive::OneColumn() ? 0 : st::lineWidth), st::lineWidth, st::shadowFg);
} }
p.fillRect(Adaptive::OneColumn() ? 0 : st::lineWidth, _parent->innerTop(), width() - (Adaptive::OneColumn() ? 0 : st::lineWidth), st::lineWidth, st::shadowColor->b); p.fillRect(Adaptive::OneColumn() ? 0 : st::lineWidth, _parent->innerTop(), width() - (Adaptive::OneColumn() ? 0 : st::lineWidth), st::lineWidth, st::shadowFg);
} }
void FieldAutocompleteInner::resizeEvent(QResizeEvent *e) { void FieldAutocompleteInner::resizeEvent(QResizeEvent *e) {

View File

@ -23,10 +23,10 @@ using "dialogs/dialogs.style";
using "ui/widgets/widgets.style"; using "ui/widgets/widgets.style";
historyScroll: ScrollArea(defaultScrollArea) { historyScroll: ScrollArea(defaultScrollArea) {
barColor: #89a0b47a; bg: historyScrollBg;
bgColor: #89a0b44c; bgOver: historyScrollBgOver;
barOverColor: #89a0b4bc; barBg: historyScrollBarBg;
bgOverColor: #89a0b46b; barBgOver: historyScrollBarBgOver;
round: 3px; round: 3px;
@ -42,8 +42,8 @@ historyScroll: ScrollArea(defaultScrollArea) {
historyPaddingBottom: 8px; historyPaddingBottom: 8px;
historyToDownPosition: point(12px, 10px); historyToDownPosition: point(12px, 10px);
historyToDownAbove: icon {{ "history_down_arrow", #b9b9b9, point(17px, 23px) }}; historyToDownAbove: icon {{ "history_down_arrow", menuIconFg, point(17px, 23px) }};
historyToDownAboveOver: icon {{ "history_down_arrow", #a3a3a3, point(17px, 23px) }}; historyToDownAboveOver: icon {{ "history_down_arrow", menuIconFgOver, point(17px, 23px) }};
historyToDownPaddingTop: 10px; historyToDownPaddingTop: 10px;
historyToDown: TwoIconButton { historyToDown: TwoIconButton {
width: 52px; width: 52px;
@ -139,62 +139,38 @@ historyReceivedInvertedIcon: icon {{ "history_received", historyIconFgInverted,
historyViewsSpace: 11px; historyViewsSpace: 11px;
historyViewsWidth: 20px; historyViewsWidth: 20px;
historyViewsTop: -15px; historyViewsTop: -15px;
historyViewsInIcon: icon {{ "history_views", #a0acb6 }}; historyViewsInIcon: icon {{ "history_views", msgInDateFg }};
historyViewsInSelectedIcon: icon {{ "history_views", #6a9bc5 }}; historyViewsInSelectedIcon: icon {{ "history_views", msgInDateFgSelected }};
historyViewsOutIcon: icon {{ "history_views", historyOutIconFg }}; historyViewsOutIcon: icon {{ "history_views", historyOutIconFg }};
historyViewsOutSelectedIcon: icon {{ "history_views", historyOutIconFgSelected }}; historyViewsOutSelectedIcon: icon {{ "history_views", historyOutIconFgSelected }};
historyViewsInvertedIcon: icon {{ "history_views", #ffffffe6 }}; historyViewsInvertedIcon: icon {{ "history_views", historySendingInvertedIconFg }};
historyPeer1NameFg: #c03d33; // red
historyPeer1UserpicBg: #ed9482;
historyPeer1UserpicFg: #d3644b;
historyPeer1UserpicPerson: icon {{ size(120px, 120px), historyPeer1UserpicBg }, { "userpic_person", historyPeer1UserpicFg }}; historyPeer1UserpicPerson: icon {{ size(120px, 120px), historyPeer1UserpicBg }, { "userpic_person", historyPeer1UserpicFg }};
historyPeer1UserpicChat: icon {{ size(120px, 120px), historyPeer1UserpicBg }, { "userpic_chat", historyPeer1UserpicFg }}; historyPeer1UserpicChat: icon {{ size(120px, 120px), historyPeer1UserpicBg }, { "userpic_chat", historyPeer1UserpicFg }};
historyPeer1UserpicChannel: icon {{ size(120px, 120px), historyPeer1UserpicBg }, { "userpic_channel", historyPeer1UserpicFg }}; historyPeer1UserpicChannel: icon {{ size(120px, 120px), historyPeer1UserpicBg }, { "userpic_channel", historyPeer1UserpicFg }};
historyPeer2NameFg: #4fad2d; // green
historyPeer2UserpicBg: #a8db92;
historyPeer2UserpicFg: #75c057;
historyPeer2UserpicPerson: icon {{ size(120px, 120px), historyPeer2UserpicBg }, { "userpic_person", historyPeer2UserpicFg }}; historyPeer2UserpicPerson: icon {{ size(120px, 120px), historyPeer2UserpicBg }, { "userpic_person", historyPeer2UserpicFg }};
historyPeer2UserpicChat: icon {{ size(120px, 120px), historyPeer2UserpicBg }, { "userpic_chat", historyPeer2UserpicFg }}; historyPeer2UserpicChat: icon {{ size(120px, 120px), historyPeer2UserpicBg }, { "userpic_chat", historyPeer2UserpicFg }};
historyPeer2UserpicChannel: icon {{ size(120px, 120px), historyPeer2UserpicBg }, { "userpic_channel", historyPeer2UserpicFg }}; historyPeer2UserpicChannel: icon {{ size(120px, 120px), historyPeer2UserpicBg }, { "userpic_channel", historyPeer2UserpicFg }};
historyPeer3NameFg: #d09306; // yellow
historyPeer3UserpicBg: #efd289;
historyPeer3UserpicFg: #e4a861;
historyPeer3UserpicPerson: icon {{ size(120px, 120px), historyPeer3UserpicBg }, { "userpic_person", historyPeer3UserpicFg }}; historyPeer3UserpicPerson: icon {{ size(120px, 120px), historyPeer3UserpicBg }, { "userpic_person", historyPeer3UserpicFg }};
historyPeer3UserpicChat: icon {{ size(120px, 120px), historyPeer3UserpicBg }, { "userpic_chat", historyPeer3UserpicFg }}; historyPeer3UserpicChat: icon {{ size(120px, 120px), historyPeer3UserpicBg }, { "userpic_chat", historyPeer3UserpicFg }};
historyPeer3UserpicChannel: icon {{ size(120px, 120px), historyPeer3UserpicBg }, { "userpic_channel", historyPeer3UserpicFg }}; historyPeer3UserpicChannel: icon {{ size(120px, 120px), historyPeer3UserpicBg }, { "userpic_channel", historyPeer3UserpicFg }};
historyPeer4NameFg: windowActiveTextFg; // blue
historyPeer4UserpicBg: #8fbfe9;
historyPeer4UserpicFg: #649fd3;
historyPeer4UserpicPerson: icon {{ size(120px, 120px), historyPeer4UserpicBg }, { "userpic_person", historyPeer4UserpicFg }}; historyPeer4UserpicPerson: icon {{ size(120px, 120px), historyPeer4UserpicBg }, { "userpic_person", historyPeer4UserpicFg }};
historyPeer4UserpicChat: icon {{ size(120px, 120px), historyPeer4UserpicBg }, { "userpic_chat", historyPeer4UserpicFg }}; historyPeer4UserpicChat: icon {{ size(120px, 120px), historyPeer4UserpicBg }, { "userpic_chat", historyPeer4UserpicFg }};
historyPeer4UserpicChannel: icon {{ size(120px, 120px), historyPeer4UserpicBg }, { "userpic_channel", historyPeer4UserpicFg }}; historyPeer4UserpicChannel: icon {{ size(120px, 120px), historyPeer4UserpicBg }, { "userpic_channel", historyPeer4UserpicFg }};
historyPeer5NameFg: #8544d6; // purple
historyPeer5UserpicBg: #9992e4;
historyPeer5UserpicFg: #7b72cf;
historyPeer5UserpicPerson: icon {{ size(120px, 120px), historyPeer5UserpicBg }, { "userpic_person", historyPeer5UserpicFg }}; historyPeer5UserpicPerson: icon {{ size(120px, 120px), historyPeer5UserpicBg }, { "userpic_person", historyPeer5UserpicFg }};
historyPeer6NameFg: #cd4073; // pink
historyPeer6UserpicBg: #ffa9c3;
historyPeer6UserpicFg: #e87497;
historyPeer6UserpicPerson: icon {{ size(120px, 120px), historyPeer6UserpicBg }, { "userpic_person", historyPeer6UserpicFg }}; historyPeer6UserpicPerson: icon {{ size(120px, 120px), historyPeer6UserpicBg }, { "userpic_person", historyPeer6UserpicFg }};
historyPeer7NameFg: #2996ad; // sea
historyPeer7UserpicBg: #8eccdb;
historyPeer7UserpicFg: #5eb2c7;
historyPeer7UserpicPerson: icon {{ size(120px, 120px), historyPeer7UserpicBg }, { "userpic_person", historyPeer7UserpicFg }}; historyPeer7UserpicPerson: icon {{ size(120px, 120px), historyPeer7UserpicBg }, { "userpic_person", historyPeer7UserpicFg }};
historyPeer8NameFg: #ce671b; // orange
historyPeer8UserpicBg: #f7b37c;
historyPeer8UserpicFg: #de8d62;
historyPeer8UserpicPerson: icon {{ size(120px, 120px), historyPeer8UserpicBg }, { "userpic_person", historyPeer8UserpicFg }}; historyPeer8UserpicPerson: icon {{ size(120px, 120px), historyPeer8UserpicBg }, { "userpic_person", historyPeer8UserpicFg }};
historyComposeField: FlatTextarea { historyComposeField: FlatTextarea {
textColor: #000000; textColor: historyComposeAreaFg;
bgColor: historyComposeAreaBg; bgColor: historyComposeAreaBg;
align: align(left); align: align(left);
textMrg: margins(5px, 5px, 5px, 5px); textMrg: margins(5px, 5px, 5px, 5px);
font: msgFont; font: msgFont;
phColor: #999999; phColor: placeholderFg;
phFocusColor: #aaaaaa; phFocusColor: placeholderFgActive;
phAlign: align(topleft); phAlign: align(topleft);
phPos: point(2px, 0px); phPos: point(2px, 0px);
phShift: 50px; phShift: 50px;
@ -226,8 +202,8 @@ historyComposeButton: FlatButton {
} }
} }
historyUnblock: FlatButton(historyComposeButton) { historyUnblock: FlatButton(historyComposeButton) {
color: #d15948; color: attentionButtonFg;
overColor: #d15948; overColor: attentionButtonFgOver;
} }
historySendIcon: icon {{ "send_control_send", historySendIconFg }}; historySendIcon: icon {{ "send_control_send", historySendIconFg }};
@ -288,13 +264,13 @@ historyRecordVoice: icon {{ "send_control_record", historyRecordVoiceFg }};
historyRecordVoiceOver: icon {{ "send_control_record", historyRecordVoiceFgOver }}; historyRecordVoiceOver: icon {{ "send_control_record", historyRecordVoiceFgOver }};
historyRecordVoiceActive: icon {{ "send_control_record", historyRecordVoiceFgActive }}; historyRecordVoiceActive: icon {{ "send_control_record", historyRecordVoiceFgActive }};
historyRecordVoiceRippleBgActive: lightButtonBgOver; historyRecordVoiceRippleBgActive: lightButtonBgOver;
historyRecordSignalColor: #f17077; historyRecordSignalColor: attentionButtonFg;
historyRecordSignalMin: 5px; historyRecordSignalMin: 5px;
historyRecordSignalMax: 12px; historyRecordSignalMax: 12px;
historyRecordCancel: #aaaaaa; historyRecordCancel: windowSubTextFg;
historyRecordCancelActive: #ec6466; historyRecordCancelActive: windowActiveTextFg;
historyRecordFont: font(13px); historyRecordFont: font(13px);
historyRecordDurationFg: #000000; historyRecordDurationFg: historyComposeAreaFg;
historyRecordTextTop: 14px; historyRecordTextTop: 14px;
historySilentToggle: IconButton(historyBotKeyboardShow) { historySilentToggle: IconButton(historyBotKeyboardShow) {
@ -349,22 +325,19 @@ reportSpamHide: FlatButton {
overFont: font(fsize underline); overFont: font(fsize underline);
} }
reportSpamSeparator: 30px; reportSpamSeparator: 30px;
reportSpamBg: #fffffff0;
reportSpamFg: #000000;
msgBotKbDuration: 200; msgBotKbDuration: 200;
msgBotKbFont: semiboldFont; msgBotKbFont: semiboldFont;
msgBotKbOverBg: #ffffff20;
msgBotKbIconPadding: 2px; msgBotKbIconPadding: 2px;
msgBotKbUrlIcon: icon {{ "inline_button_url", #ffffff }}; msgBotKbUrlIcon: icon {{ "inline_button_url", msgBotKbIconFg }};
msgBotKbSwitchPmIcon: icon {{ "inline_button_switch", #ffffff }}; msgBotKbSwitchPmIcon: icon {{ "inline_button_switch", msgBotKbIconFg }};
msgBotKbButton: BotKeyboardButton { msgBotKbButton: BotKeyboardButton {
margin: 5px; margin: 5px;
padding: 10px; padding: 10px;
height: 36px; height: 36px;
textTop: 8px; textTop: 8px;
ripple: RippleAnimation(defaultRippleAnimation) { ripple: RippleAnimation(defaultRippleAnimation) {
color: #00000020; color: msgBotKbRippleBg;
} }
} }
@ -401,12 +374,12 @@ mentionFont: linkFont;
mentionNameFg: windowFg; mentionNameFg: windowFg;
mentionNameFgOver: windowFgOver; mentionNameFgOver: windowFgOver;
mentionPhotoSize: msgPhotoSize; mentionPhotoSize: msgPhotoSize;
mentionBg: #ffffff; mentionBg: windowBg;
mentionBgOver: #f5f5f5; mentionBgOver: windowBgOver;
mentionFg: #777777; mentionFg: windowSubTextFg;
mentionFgOver: #707070; mentionFgOver: windowSubTextFgOver;
mentionFgActive: #0080c0; mentionFgActive: windowActiveTextFg;
mentionFgOverActive: #0077b3; mentionFgOverActive: windowActiveTextFg;
historyDateFadeDuration: 200; historyDateFadeDuration: 200;
@ -420,3 +393,14 @@ historyBubbleTailInRight: icon {{ "bubble_tail-flip_horizontal", msgInBg }};
historyBubbleTailInRightSelected: icon {{ "bubble_tail-flip_horizontal", msgInBgSelected }}; historyBubbleTailInRightSelected: icon {{ "bubble_tail-flip_horizontal", msgInBgSelected }};
historyBubbleTailOutRight: icon {{ "bubble_tail-flip_horizontal", msgOutBg }}; historyBubbleTailOutRight: icon {{ "bubble_tail-flip_horizontal", msgOutBg }};
historyBubbleTailOutRightSelected: icon {{ "bubble_tail-flip_horizontal", msgOutBgSelected }}; historyBubbleTailOutRightSelected: icon {{ "bubble_tail-flip_horizontal", msgOutBgSelected }};
historyStatusFg: windowSubTextFg;
historyStatusFgActive: windowActiveTextFg;
historyStatusFgTyping: historyStatusFgActive;
historyUnreadBarHeight: 32px;
historyUnreadBarMargin: 8px;
historyUnreadBarFont: semiboldFont;
historyForwardChooseMargins: margins(30px, 10px, 30px, 10px);
historyForwardChooseFont: font(16px);

View File

@ -502,18 +502,18 @@ void HistoryMessageUnreadBar::init(int count) {
} }
int HistoryMessageUnreadBar::height() { int HistoryMessageUnreadBar::height() {
return st::unreadBarHeight + st::unreadBarMargin; return st::historyUnreadBarHeight + st::historyUnreadBarMargin;
} }
int HistoryMessageUnreadBar::marginTop() { int HistoryMessageUnreadBar::marginTop() {
return st::lineWidth + st::unreadBarMargin; return st::lineWidth + st::historyUnreadBarMargin;
} }
void HistoryMessageUnreadBar::paint(Painter &p, int y, int w) const { void HistoryMessageUnreadBar::paint(Painter &p, int y, int w) const {
p.fillRect(0, y + marginTop(), w, height() - marginTop() - st::lineWidth, st::unreadBarBG); p.fillRect(0, y + marginTop(), w, height() - marginTop() - st::lineWidth, st::historyUnreadBarBg);
p.fillRect(0, y + height() - st::lineWidth, w, st::lineWidth, st::unreadBarBorder); p.fillRect(0, y + height() - st::lineWidth, w, st::lineWidth, st::historyUnreadBarBorder);
p.setFont(st::unreadBarFont); p.setFont(st::historyUnreadBarFont);
p.setPen(st::unreadBarColor); p.setPen(st::historyUnreadBarFg);
int left = st::msgServiceMargin.left(); int left = st::msgServiceMargin.left();
int maxwidth = w; int maxwidth = w;
@ -522,7 +522,7 @@ void HistoryMessageUnreadBar::paint(Painter &p, int y, int w) const {
} }
w = maxwidth; w = maxwidth;
p.drawText((w - _width) / 2, y + marginTop() + (st::unreadBarHeight - 2 * st::lineWidth - st::unreadBarFont->height) / 2 + st::unreadBarFont->ascent, _text); p.drawText((w - _width) / 2, y + marginTop() + (st::historyUnreadBarHeight - 2 * st::lineWidth - st::historyUnreadBarFont->height) / 2 + st::historyUnreadBarFont->ascent, _text);
} }
void HistoryMessageDate::init(const QDateTime &date) { void HistoryMessageDate::init(const QDateTime &date) {

View File

@ -783,7 +783,7 @@ void HistoryVideo::draw(Painter &p, const QRect &r, TextSelection selection, Tim
int32 statusH = st::normalFont->height + 2 * st::msgDateImgPadding.y(); int32 statusH = st::normalFont->height + 2 * st::msgDateImgPadding.y();
App::roundRect(p, rtlrect(statusX - st::msgDateImgPadding.x(), statusY - st::msgDateImgPadding.y(), statusW, statusH, _width), selected ? st::msgDateImgBgSelected : st::msgDateImgBg, selected ? DateSelectedCorners : DateCorners); App::roundRect(p, rtlrect(statusX - st::msgDateImgPadding.x(), statusY - st::msgDateImgPadding.y(), statusW, statusH, _width), selected ? st::msgDateImgBgSelected : st::msgDateImgBg, selected ? DateSelectedCorners : DateCorners);
p.setFont(st::normalFont); p.setFont(st::normalFont);
p.setPen(st::msgDateImgColor); p.setPen(st::msgDateImgFg);
p.drawTextLeft(statusX, statusY, _width, _statusText, statusW - 2 * st::msgDateImgPadding.x()); p.drawTextLeft(statusX, statusY, _width, _statusText, statusW - 2 * st::msgDateImgPadding.x());
// date // date
@ -1775,7 +1775,7 @@ void HistoryGif::draw(Painter &p, const QRect &r, TextSelection selection, TimeM
int32 statusH = st::normalFont->height + 2 * st::msgDateImgPadding.y(); int32 statusH = st::normalFont->height + 2 * st::msgDateImgPadding.y();
App::roundRect(p, rtlrect(statusX - st::msgDateImgPadding.x(), statusY - st::msgDateImgPadding.y(), statusW, statusH, _width), selected ? st::msgDateImgBgSelected : st::msgDateImgBg, selected ? DateSelectedCorners : DateCorners); App::roundRect(p, rtlrect(statusX - st::msgDateImgPadding.x(), statusY - st::msgDateImgPadding.y(), statusW, statusH, _width), selected ? st::msgDateImgBgSelected : st::msgDateImgBg, selected ? DateSelectedCorners : DateCorners);
p.setFont(st::normalFont); p.setFont(st::normalFont);
p.setPen(st::msgDateImgColor); p.setPen(st::msgDateImgFg);
p.drawTextLeft(statusX, statusY, _width, _statusText, statusW - 2 * st::msgDateImgPadding.x()); p.drawTextLeft(statusX, statusY, _width, _statusText, statusW - 2 * st::msgDateImgPadding.x());
} }
} }
@ -2055,7 +2055,7 @@ void HistorySticker::draw(Painter &p, const QRect &r, TextSelection selection, T
// Make the bottom of the rect at the same level as the bottom of the info rect. // Make the bottom of the rect at the same level as the bottom of the info rect.
recty -= st::msgDateImgDelta; recty -= st::msgDateImgDelta;
App::roundRect(p, rectx, recty, rectw, recth, selected ? st::msgServiceSelectBg : st::msgServiceBg, selected ? StickerSelectedCorners : StickerCorners); App::roundRect(p, rectx, recty, rectw, recth, selected ? st::msgServiceBgSelected : st::msgServiceBg, selected ? StickerSelectedCorners : StickerCorners);
rectx += st::msgReplyPadding.left(); rectx += st::msgReplyPadding.left();
rectw -= st::msgReplyPadding.left() + st::msgReplyPadding.right(); rectw -= st::msgReplyPadding.left() + st::msgReplyPadding.right();
if (via) { if (via) {
@ -2741,7 +2741,7 @@ void HistoryWebPage::draw(Painter &p, const QRect &r, TextSelection selection, T
App::roundRect(p, dateX, dateY, dateW, dateH, selected ? st::msgDateImgBgSelected : st::msgDateImgBg, selected ? DateSelectedCorners : DateCorners); App::roundRect(p, dateX, dateY, dateW, dateH, selected ? st::msgDateImgBgSelected : st::msgDateImgBg, selected ? DateSelectedCorners : DateCorners);
p.setFont(st::msgDateFont); p.setFont(st::msgDateFont);
p.setPen(st::msgDateImgColor); p.setPen(st::msgDateImgFg);
p.drawTextLeft(dateX + st::msgDateImgPadding.x(), dateY + st::msgDateImgPadding.y(), pixwidth, _duration); p.drawTextLeft(dateX + st::msgDateImgPadding.x(), dateY + st::msgDateImgPadding.y(), pixwidth, _duration);
} }
} }
@ -3103,7 +3103,7 @@ void HistoryGame::draw(Painter &p, const QRect &r, TextSelection selection, Time
App::roundRect(p, rtlrect(gameX, gameY, gameW, gameH, pixwidth), selected ? st::msgDateImgBgSelected : st::msgDateImgBg, selected ? DateSelectedCorners : DateCorners); App::roundRect(p, rtlrect(gameX, gameY, gameW, gameH, pixwidth), selected ? st::msgDateImgBgSelected : st::msgDateImgBg, selected ? DateSelectedCorners : DateCorners);
p.setFont(st::msgDateFont); p.setFont(st::msgDateFont);
p.setPen(st::msgDateImgColor); p.setPen(st::msgDateImgFg);
p.drawTextLeft(gameX + st::msgDateImgPadding.x(), gameY + st::msgDateImgPadding.y(), pixwidth, lang(lng_game_tag).toUpper()); p.drawTextLeft(gameX + st::msgDateImgPadding.x(), gameY + st::msgDateImgPadding.y(), pixwidth, lang(lng_game_tag).toUpper());
p.translate(-attachLeft, -attachTop); p.translate(-attachLeft, -attachTop);

View File

@ -282,27 +282,27 @@ void HistoryMessageReply::paint(Painter &p, const HistoryItem *holder, int x, in
p.drawText(x + st::msgReplyBarSkip + previewSkip + replyToName.maxWidth() + st::msgServiceFont->spacew, y + st::msgReplyPadding.top() + st::msgServiceFont->ascent, _replyToVia->_text); p.drawText(x + st::msgReplyBarSkip + previewSkip + replyToName.maxWidth() + st::msgServiceFont->spacew, y + st::msgReplyPadding.top() + st::msgServiceFont->ascent, _replyToVia->_text);
} }
HistoryMessage *replyToAsMsg = replyToMsg->toHistoryMessage(); auto replyToAsMsg = replyToMsg->toHistoryMessage();
if (!(flags & PaintInBubble)) { if (!(flags & PaintInBubble)) {
} else if ((replyToAsMsg && replyToAsMsg->emptyText()) || replyToMsg->serviceMsg()) { } else if ((replyToAsMsg && replyToAsMsg->emptyText()) || replyToMsg->serviceMsg()) {
auto &date = outbg ? (selected ? st::msgOutDateFgSelected : st::msgOutDateFg) : (selected ? st::msgInDateFgSelected : st::msgInDateFg); auto &date = outbg ? (selected ? st::msgOutDateFgSelected : st::msgOutDateFg) : (selected ? st::msgInDateFgSelected : st::msgInDateFg);
p.setPen(date); p.setPen(date);
} else { } else {
p.setPen(st::msgColor); p.setPen(outbg ? st::historyTextOutFg : st::historyTextInFg);
} }
replyToText.drawLeftElided(p, x + st::msgReplyBarSkip + previewSkip, y + st::msgReplyPadding.top() + st::msgServiceNameFont->height, w - st::msgReplyBarSkip - previewSkip, w + 2 * x); replyToText.drawLeftElided(p, x + st::msgReplyBarSkip + previewSkip, y + st::msgReplyPadding.top() + st::msgServiceNameFont->height, w - st::msgReplyBarSkip - previewSkip, w + 2 * x);
} }
} else { } else {
p.setFont(st::msgDateFont); p.setFont(st::msgDateFont);
auto &date = outbg ? (selected ? st::msgOutDateFgSelected : st::msgOutDateFg) : (selected ? st::msgInDateFgSelected : st::msgInDateFg); auto &date = outbg ? (selected ? st::msgOutDateFgSelected : st::msgOutDateFg) : (selected ? st::msgInDateFgSelected : st::msgInDateFg);
p.setPen((flags & PaintInBubble) ? date : st::msgDateImgColor); p.setPen((flags & PaintInBubble) ? date : st::msgDateImgFg);
p.drawTextLeft(x + st::msgReplyBarSkip, y + st::msgReplyPadding.top() + (st::msgReplyBarSize.height() - st::msgDateFont->height) / 2, w + 2 * x, st::msgDateFont->elided(lang(replyToMsgId ? lng_profile_loading : lng_deleted_message), w - st::msgReplyBarSkip)); p.drawTextLeft(x + st::msgReplyBarSkip, y + st::msgReplyPadding.top() + (st::msgReplyBarSize.height() - st::msgDateFont->height) / 2, w + 2 * x, st::msgDateFont->elided(lang(replyToMsgId ? lng_profile_loading : lng_deleted_message), w - st::msgReplyBarSkip));
} }
} }
} }
void HistoryMessage::KeyboardStyle::startPaint(Painter &p) const { void HistoryMessage::KeyboardStyle::startPaint(Painter &p) const {
p.setPen(st::msgServiceColor); p.setPen(st::msgServiceFg);
} }
style::font HistoryMessage::KeyboardStyle::textFont() const { style::font HistoryMessage::KeyboardStyle::textFont() const {
@ -322,7 +322,7 @@ void HistoryMessage::KeyboardStyle::paintButtonBg(Painter &p, const QRect &rect,
if (howMuchOver > 0) { if (howMuchOver > 0) {
auto o = p.opacity(); auto o = p.opacity();
p.setOpacity(o * howMuchOver); p.setOpacity(o * howMuchOver);
App::roundRect(p, rect, st::msgBotKbOverBg, BotKbOverCorners); App::roundRect(p, rect, st::msgBotKbOverBgAdd, BotKbOverCorners);
p.setOpacity(o); p.setOpacity(o);
} }
} }
@ -1139,12 +1139,12 @@ void HistoryMessage::drawInfo(Painter &p, int32 right, int32 bottom, int32 width
case InfoDisplayOverImage: case InfoDisplayOverImage:
infoRight -= st::msgDateImgDelta + st::msgDateImgPadding.x(); infoRight -= st::msgDateImgDelta + st::msgDateImgPadding.x();
infoBottom -= st::msgDateImgDelta + st::msgDateImgPadding.y(); infoBottom -= st::msgDateImgDelta + st::msgDateImgPadding.y();
p.setPen(st::msgDateImgColor); p.setPen(st::msgDateImgFg);
break; break;
case InfoDisplayOverBackground: case InfoDisplayOverBackground:
infoRight -= st::msgDateImgDelta + st::msgDateImgPadding.x(); infoRight -= st::msgDateImgDelta + st::msgDateImgPadding.x();
infoBottom -= st::msgDateImgDelta + st::msgDateImgPadding.y(); infoBottom -= st::msgDateImgDelta + st::msgDateImgPadding.y();
p.setPen(st::msgServiceColor); p.setPen(st::msgServiceFg);
break; break;
} }
@ -1158,7 +1158,7 @@ void HistoryMessage::drawInfo(Painter &p, int32 right, int32 bottom, int32 width
App::roundRect(p, dateX - st::msgDateImgPadding.x(), dateY - st::msgDateImgPadding.y(), dateW, dateH, selected ? st::msgDateImgBgSelected : st::msgDateImgBg, selected ? DateSelectedCorners : DateCorners); App::roundRect(p, dateX - st::msgDateImgPadding.x(), dateY - st::msgDateImgPadding.y(), dateW, dateH, selected ? st::msgDateImgBgSelected : st::msgDateImgBg, selected ? DateSelectedCorners : DateCorners);
} else if (type == InfoDisplayOverBackground) { } else if (type == InfoDisplayOverBackground) {
int32 dateW = infoW + 2 * st::msgDateImgPadding.x(), dateH = st::msgDateFont->height + 2 * st::msgDateImgPadding.y(); int32 dateW = infoW + 2 * st::msgDateImgPadding.x(), dateH = st::msgDateFont->height + 2 * st::msgDateImgPadding.y();
App::roundRect(p, dateX - st::msgDateImgPadding.x(), dateY - st::msgDateImgPadding.y(), dateW, dateH, selected ? st::msgServiceSelectBg : st::msgServiceBg, selected ? StickerSelectedCorners : StickerCorners); App::roundRect(p, dateX - st::msgDateImgPadding.x(), dateY - st::msgDateImgPadding.y(), dateW, dateH, selected ? st::msgServiceBgSelected : st::msgServiceBg, selected ? StickerSelectedCorners : StickerCorners);
} }
dateX += HistoryMessage::timeLeft(); dateX += HistoryMessage::timeLeft();

View File

@ -177,7 +177,7 @@ void paintPreparedDate(Painter &p, const QString &dateText, int dateTextWidth, i
ServiceMessagePainter::paintBubble(p, left, y + st::msgServiceMargin.top(), dateTextWidth + st::msgServicePadding.left() + st::msgServicePadding.left(), height); ServiceMessagePainter::paintBubble(p, left, y + st::msgServiceMargin.top(), dateTextWidth + st::msgServicePadding.left() + st::msgServicePadding.left(), height);
p.setFont(st::msgServiceFont); p.setFont(st::msgServiceFont);
p.setPen(st::msgServiceColor); p.setPen(st::msgServiceFg);
p.drawText(left + st::msgServicePadding.left(), y + st::msgServiceMargin.top() + st::msgServicePadding.top() + st::msgServiceFont->ascent, dateText); p.drawText(left + st::msgServicePadding.left(), y + st::msgServiceMargin.top() + st::msgServicePadding.top() + st::msgServiceFont->ascent, dateText);
} }
@ -225,7 +225,7 @@ void ServiceMessagePainter::paint(Painter &p, const HistoryService *message, con
} }
p.setBrush(Qt::NoBrush); p.setBrush(Qt::NoBrush);
p.setPen(st::msgServiceColor); p.setPen(st::msgServiceFg);
p.setFont(st::msgServiceFont); p.setFont(st::msgServiceFont);
message->_text.draw(p, trect.x(), trect.y(), trect.width(), Qt::AlignCenter, 0, -1, context.selection, false); message->_text.draw(p, trect.x(), trect.y(), trect.width(), Qt::AlignCenter, 0, -1, context.selection, false);

View File

@ -2430,7 +2430,7 @@ void ReportSpamPanel::resizeEvent(QResizeEvent *e) {
void ReportSpamPanel::paintEvent(QPaintEvent *e) { void ReportSpamPanel::paintEvent(QPaintEvent *e) {
Painter p(this); Painter p(this);
p.fillRect(QRect(0, 0, width(), height() - st::lineWidth), st::reportSpamBg); p.fillRect(QRect(0, 0, width(), height() - st::lineWidth), st::reportSpamBg);
p.fillRect(Adaptive::OneColumn() ? 0 : st::lineWidth, height() - st::lineWidth, width() - (Adaptive::OneColumn() ? 0 : st::lineWidth), st::lineWidth, st::shadowColor->b); p.fillRect(Adaptive::OneColumn() ? 0 : st::lineWidth, height() - st::lineWidth, width() - (Adaptive::OneColumn() ? 0 : st::lineWidth), st::lineWidth, st::shadowFg);
if (!_clear->isHidden()) { if (!_clear->isHidden()) {
p.setPen(st::reportSpamFg); p.setPen(st::reportSpamFg);
p.setFont(st::msgFont); p.setFont(st::msgFont);
@ -2715,7 +2715,7 @@ void HistoryHider::init() {
connect(_cancel, SIGNAL(clicked()), this, SLOT(startHide())); connect(_cancel, SIGNAL(clicked()), this, SLOT(startHide()));
subscribe(Global::RefPeerChooseCancel(), [this] { startHide(); }); subscribe(Global::RefPeerChooseCancel(), [this] { startHide(); });
_chooseWidth = st::forwardFont->width(lang(_botAndQuery.isEmpty() ? lng_forward_choose : lng_inline_switch_choose)); _chooseWidth = st::historyForwardChooseFont->width(lang(_botAndQuery.isEmpty() ? lng_forward_choose : lng_inline_switch_choose));
resizeEvent(0); resizeEvent(0);
_a_opacity.start([this] { update(); }, 0., 1., st::boxDuration); _a_opacity.start([this] { update(); }, 0., 1., st::boxDuration);
@ -2740,7 +2740,7 @@ void HistoryHider::paintEvent(QPaintEvent *e) {
p.fillRect(rect(), st::layerBg); p.fillRect(rect(), st::layerBg);
} }
if (_cacheForAnim.isNull() || !_offered) { if (_cacheForAnim.isNull() || !_offered) {
p.setFont(st::forwardFont); p.setFont(st::historyForwardChooseFont);
if (_offered) { if (_offered) {
Ui::Shadow::paint(p, _box, width(), st::boxRoundShadow); Ui::Shadow::paint(p, _box, width(), st::boxRoundShadow);
App::roundRect(p, _box, st::boxBg, BoxCorners); App::roundRect(p, _box, st::boxBg, BoxCorners);
@ -2750,11 +2750,11 @@ void HistoryHider::paintEvent(QPaintEvent *e) {
_toText.drawLeftElided(p, _box.left() + st::boxPadding.left(), _box.y() + st::boxTopMargin + st::boxPadding.top(), _toTextWidth + 2, width(), 1, style::al_left); _toText.drawLeftElided(p, _box.left() + st::boxPadding.left(), _box.y() + st::boxTopMargin + st::boxPadding.top(), _toTextWidth + 2, width(), 1, style::al_left);
textstyleRestore(); textstyleRestore();
} else { } else {
auto w = st::forwardMargins.left() + _chooseWidth + st::forwardMargins.right(); auto w = st::historyForwardChooseMargins.left() + _chooseWidth + st::historyForwardChooseMargins.right();
auto h = st::forwardMargins.top() + st::forwardFont->height + st::forwardMargins.bottom(); auto h = st::historyForwardChooseMargins.top() + st::historyForwardChooseFont->height + st::historyForwardChooseMargins.bottom();
App::roundRect(p, (width() - w) / 2, (height() - h) / 2, w, h, st::forwardBg, ForwardCorners); App::roundRect(p, (width() - w) / 2, (height() - h) / 2, w, h, st::historyForwardChooseBg, ForwardCorners);
p.setPen(st::forwardFg); p.setPen(st::historyForwardChooseFg);
p.drawText(_box, lang(_botAndQuery.isEmpty() ? lng_forward_choose : lng_inline_switch_choose), QTextOption(style::al_center)); p.drawText(_box, lang(_botAndQuery.isEmpty() ? lng_forward_choose : lng_inline_switch_choose), QTextOption(style::al_center));
} }
} else { } else {
@ -2844,7 +2844,7 @@ void HistoryHider::resizeEvent(QResizeEvent *e) {
} }
h += st::boxTopMargin + qMax(st::boxTextFont->height, st::boxTextStyle.lineHeight) + st::boxButtonPadding.top() + _send->height() + st::boxButtonPadding.bottom(); h += st::boxTopMargin + qMax(st::boxTextFont->height, st::boxTextStyle.lineHeight) + st::boxButtonPadding.top() + _send->height() + st::boxButtonPadding.bottom();
} else { } else {
h += st::forwardFont->height; h += st::historyForwardChooseFont->height;
_send->hide(); _send->hide();
_cancel->hide(); _cancel->hide();
} }
@ -3050,7 +3050,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent)
, _attachDragDocument(this) , _attachDragDocument(this)
, _attachDragPhoto(this) , _attachDragPhoto(this)
, _fileLoader(this, FileLoaderQueueStopTimeout) , _fileLoader(this, FileLoaderQueueStopTimeout)
, _topShadow(this, st::shadowColor) { , _topShadow(this, st::shadowFg) {
setAcceptDrops(true); setAcceptDrops(true);
subscribe(FileDownload::ImageLoaded(), [this] { update(); }); subscribe(FileDownload::ImageLoaded(), [this] { update(); });
@ -6186,8 +6186,8 @@ bool HistoryWidget::paintTopBar(Painter &p, int decreaseWidth, TimeMs ms) {
auto statustop = st::topBarHeight - st::topBarArrowPadding.bottom() - st::dialogsTextFont->height; auto statustop = st::topBarHeight - st::topBarArrowPadding.bottom() - st::dialogsTextFont->height;
auto namewidth = width() - decreaseWidth - st::topBarArrowPadding.left() - st::topBarArrowPadding.right(); auto namewidth = width() - decreaseWidth - st::topBarArrowPadding.left() - st::topBarArrowPadding.right();
p.setFont(st::dialogsTextFont); p.setFont(st::dialogsTextFont);
if (!_history->paintSendAction(p, nameleft, statustop, namewidth, width(), st::statusFgActive, ms)) { if (!_history->paintSendAction(p, nameleft, statustop, namewidth, width(), st::historyStatusFgTyping, ms)) {
p.setPen(_titlePeerTextOnline ? st::statusFgActive : st::statusFg); p.setPen(_titlePeerTextOnline ? st::historyStatusFgActive : st::historyStatusFg);
p.drawText(nameleft, st::topBarHeight - st::topBarArrowPadding.bottom() - st::dialogsTextFont->height + st::dialogsTextFont->ascent, _titlePeerText); p.drawText(nameleft, st::topBarHeight - st::topBarArrowPadding.bottom() - st::dialogsTextFont->height + st::dialogsTextFont->ascent, _titlePeerText);
} }
@ -7266,7 +7266,7 @@ void HistoryWidget::updateListSize(bool initial, bool loadedDown, const ScrollCh
} }
} else if (_history->showFrom) { } else if (_history->showFrom) {
toY = _list->itemTop(_history->showFrom); toY = _list->itemTop(_history->showFrom);
if (toY < _scroll->scrollTopMax() + st::unreadBarHeight) { if (toY < _scroll->scrollTopMax() + st::historyUnreadBarHeight) {
_history->addUnreadBar(); _history->addUnreadBar();
if (_history->unreadBar) { if (_history->unreadBar) {
setMsgId(ShowAtUnreadMsgId); setMsgId(ShowAtUnreadMsgId);
@ -7614,7 +7614,7 @@ void HistoryWidget::onInlineResultSend(InlineBots::Result *result, UserData *bot
HistoryWidget::PinnedBar::PinnedBar(MsgId msgId, HistoryWidget *parent) HistoryWidget::PinnedBar::PinnedBar(MsgId msgId, HistoryWidget *parent)
: msgId(msgId) : msgId(msgId)
, cancel(parent, st::historyReplyCancel) , cancel(parent, st::historyReplyCancel)
, shadow(parent, st::shadowColor) { , shadow(parent, st::shadowFg) {
} }
HistoryWidget::PinnedBar::~PinnedBar() { HistoryWidget::PinnedBar::~PinnedBar() {
@ -8589,11 +8589,11 @@ void HistoryWidget::drawField(Painter &p, const QRect &rect) {
} else { } else {
_replyToName.drawElided(p, replyLeft, backy + st::msgReplyPadding.top(), width() - replyLeft - _fieldBarCancel->width() - st::msgReplyPadding.right()); _replyToName.drawElided(p, replyLeft, backy + st::msgReplyPadding.top(), width() - replyLeft - _fieldBarCancel->width() - st::msgReplyPadding.right());
} }
p.setPen(((drawMsgText->toHistoryMessage() && drawMsgText->toHistoryMessage()->emptyText()) || drawMsgText->serviceMsg()) ? st::msgInDateFg : st::msgColor); p.setPen(((drawMsgText->toHistoryMessage() && drawMsgText->toHistoryMessage()->emptyText()) || drawMsgText->serviceMsg()) ? st::historyComposeAreaFgService : st::historyComposeAreaFg);
_replyEditMsgText.drawElided(p, replyLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - replyLeft - _fieldBarCancel->width() - st::msgReplyPadding.right()); _replyEditMsgText.drawElided(p, replyLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - replyLeft - _fieldBarCancel->width() - st::msgReplyPadding.right());
} else { } else {
p.setFont(st::msgDateFont); p.setFont(st::msgDateFont);
p.setPen(st::msgInDateFg); p.setPen(st::historyComposeAreaFgService);
p.drawText(replyLeft, backy + st::msgReplyPadding.top() + (st::msgReplyBarSize.height() - st::msgDateFont->height) / 2 + st::msgDateFont->ascent, st::msgDateFont->elided(lang(lng_profile_loading), width() - replyLeft - _fieldBarCancel->width() - st::msgReplyPadding.right())); p.drawText(replyLeft, backy + st::msgReplyPadding.top() + (st::msgReplyBarSize.height() - st::msgDateFont->height) / 2 + st::msgDateFont->ascent, st::msgDateFont->elided(lang(lng_profile_loading), width() - replyLeft - _fieldBarCancel->width() - st::msgReplyPadding.right()));
} }
} }
@ -8613,13 +8613,13 @@ void HistoryWidget::drawField(Painter &p, const QRect &rect) {
} }
p.setPen(st::historyReplyNameFg); p.setPen(st::historyReplyNameFg);
from->drawElided(p, forwardLeft, backy + st::msgReplyPadding.top(), width() - forwardLeft - _fieldBarCancel->width() - st::msgReplyPadding.right()); from->drawElided(p, forwardLeft, backy + st::msgReplyPadding.top(), width() - forwardLeft - _fieldBarCancel->width() - st::msgReplyPadding.right());
p.setPen(serviceColor ? st::msgInDateFg : st::msgColor); p.setPen(serviceColor ? st::historyComposeAreaFgService : st::historyComposeAreaFg);
text->drawElided(p, forwardLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - forwardLeft - _fieldBarCancel->width() - st::msgReplyPadding.right()); text->drawElided(p, forwardLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - forwardLeft - _fieldBarCancel->width() - st::msgReplyPadding.right());
} }
} }
if (drawPreview) { if (drawPreview) {
int32 previewLeft = st::historyReplySkip + st::webPageLeft; int32 previewLeft = st::historyReplySkip + st::webPageLeft;
p.fillRect(st::historyReplySkip, backy + st::msgReplyPadding.top(), st::webPageBar, st::msgReplyBarSize.height(), st::msgInReplyBarColor->b); p.fillRect(st::historyReplySkip, backy + st::msgReplyPadding.top(), st::webPageBar, st::msgReplyBarSize.height(), st::msgInReplyBarColor);
if ((_previewData->photo && !_previewData->photo->thumb->isNull()) || (_previewData->document && !_previewData->document->thumb->isNull())) { if ((_previewData->photo && !_previewData->photo->thumb->isNull()) || (_previewData->document && !_previewData->document->thumb->isNull())) {
ImagePtr replyPreview = _previewData->photo ? _previewData->photo->makeReplyPreview() : _previewData->document->makeReplyPreview(); ImagePtr replyPreview = _previewData->photo ? _previewData->photo->makeReplyPreview() : _previewData->document->makeReplyPreview();
if (!replyPreview->isNull()) { if (!replyPreview->isNull()) {
@ -8635,7 +8635,7 @@ void HistoryWidget::drawField(Painter &p, const QRect &rect) {
} }
p.setPen(st::historyReplyNameFg); p.setPen(st::historyReplyNameFg);
_previewTitle.drawElided(p, previewLeft, backy + st::msgReplyPadding.top(), width() - previewLeft - _fieldBarCancel->width() - st::msgReplyPadding.right()); _previewTitle.drawElided(p, previewLeft, backy + st::msgReplyPadding.top(), width() - previewLeft - _fieldBarCancel->width() - st::msgReplyPadding.right());
p.setPen(st::msgColor); p.setPen(st::historyComposeAreaFg);
_previewDescription.drawElided(p, previewLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - previewLeft - _fieldBarCancel->width() - st::msgReplyPadding.right()); _previewDescription.drawElided(p, previewLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - previewLeft - _fieldBarCancel->width() - st::msgReplyPadding.right());
} }
} }
@ -8684,7 +8684,7 @@ void HistoryWidget::paintEditHeader(Painter &p, const QRect &rect, int left, int
if (!editTimeLeftText.isEmpty()) { if (!editTimeLeftText.isEmpty()) {
p.setFont(st::normalFont); p.setFont(st::normalFont);
p.setPen(st::msgInDateFg); p.setPen(st::historyComposeAreaFgService);
p.drawText(left + st::msgServiceNameFont->width(lang(lng_edit_message)) + st::normalFont->spacew, top + st::msgReplyPadding.top() + st::msgServiceNameFont->ascent, editTimeLeftText); p.drawText(left + st::msgServiceNameFont->width(lang(lng_edit_message)) + st::normalFont->spacew, top + st::msgReplyPadding.top() + st::msgServiceNameFont->ascent, editTimeLeftText);
} }
} }
@ -8762,11 +8762,11 @@ void HistoryWidget::drawPinnedBar(Painter &p) {
p.setFont(st::msgServiceNameFont); p.setFont(st::msgServiceNameFont);
p.drawText(left, st::msgReplyPadding.top() + st::msgServiceNameFont->ascent, lang(lng_pinned_message)); p.drawText(left, st::msgReplyPadding.top() + st::msgServiceNameFont->ascent, lang(lng_pinned_message));
p.setPen((((_pinnedBar->msg->toHistoryMessage() && _pinnedBar->msg->toHistoryMessage()->emptyText()) || _pinnedBar->msg->serviceMsg()) ? st::msgInDateFg : st::msgColor)->p); p.setPen(((_pinnedBar->msg->toHistoryMessage() && _pinnedBar->msg->toHistoryMessage()->emptyText()) || _pinnedBar->msg->serviceMsg()) ? st::historyComposeAreaFgService : st::historyComposeAreaFg);
_pinnedBar->text.drawElided(p, left, st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - left - _pinnedBar->cancel->width() - st::msgReplyPadding.right()); _pinnedBar->text.drawElided(p, left, st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - left - _pinnedBar->cancel->width() - st::msgReplyPadding.right());
} else { } else {
p.setFont(st::msgDateFont); p.setFont(st::msgDateFont);
p.setPen(st::msgInDateFg); p.setPen(st::historyComposeAreaFgService);
p.drawText(left, st::msgReplyPadding.top() + (st::msgReplyBarSize.height() - st::msgDateFont->height) / 2 + st::msgDateFont->ascent, st::msgDateFont->elided(lang(lng_profile_loading), width() - left - _pinnedBar->cancel->width() - st::msgReplyPadding.right())); p.drawText(left, st::msgReplyPadding.top() + (st::msgReplyBarSize.height() - st::msgDateFont->height) / 2 + st::msgDateFont->ascent, st::msgDateFont->elided(lang(lng_profile_loading), width() - left - _pinnedBar->cancel->width() - st::msgReplyPadding.right()));
} }
} }
@ -8856,7 +8856,7 @@ void HistoryWidget::paintEvent(QPaintEvent *e) {
QRect tr((width() - w) / 2, (height() - _field->height() - 2 * st::historySendPadding - h) / 2, w, h); QRect tr((width() - w) / 2, (height() - _field->height() - 2 * st::historySendPadding - h) / 2, w, h);
HistoryLayout::ServiceMessagePainter::paintBubble(p, tr.x(), tr.y(), tr.width(), tr.height()); HistoryLayout::ServiceMessagePainter::paintBubble(p, tr.x(), tr.y(), tr.width(), tr.height());
p.setPen(st::msgServiceColor->p); p.setPen(st::msgServiceFg);
p.setFont(font->f); p.setFont(font->f);
p.drawText(tr.left() + st::msgPadding.left(), tr.top() + st::msgServicePadding.top() + 1 + font->ascent, lang(lng_willbe_history)); p.drawText(tr.left() + st::msgPadding.left(), tr.top() + st::msgServicePadding.top() + 1 + font->ascent, lang(lng_willbe_history));
} }

View File

@ -609,7 +609,7 @@ void Video::paint(Painter &p, const QRect &clip, const PaintContext *context) co
int durationW = _durationWidth + 2 * st::msgDateImgPadding.x(), durationH = st::normalFont->height + 2 * st::msgDateImgPadding.y(); int durationW = _durationWidth + 2 * st::msgDateImgPadding.x(), durationH = st::normalFont->height + 2 * st::msgDateImgPadding.y();
int durationX = (st::inlineThumbSize - durationW) / 2, durationY = st::inlineRowMargin + st::inlineThumbSize - durationH; int durationX = (st::inlineThumbSize - durationW) / 2, durationY = st::inlineRowMargin + st::inlineThumbSize - durationH;
App::roundRect(p, durationX, durationY - st::msgDateImgPadding.y(), durationW, durationH, st::msgDateImgBg, DateCorners); App::roundRect(p, durationX, durationY - st::msgDateImgPadding.y(), durationW, durationH, st::msgDateImgBg, DateCorners);
p.setPen(st::msgDateImgColor); p.setPen(st::msgDateImgFg);
p.setFont(st::normalFont); p.setFont(st::normalFont);
p.drawText(durationX + st::msgDateImgPadding.x(), durationTop + st::normalFont->ascent, _duration); p.drawText(durationX + st::msgDateImgPadding.x(), durationTop + st::normalFont->ascent, _duration);
} }
@ -1029,10 +1029,10 @@ void Article::paint(Painter &p, const QRect &clip, const PaintContext *context)
if (thumb->isNull() && !_thumbLetter.isEmpty()) { if (thumb->isNull() && !_thumbLetter.isEmpty()) {
int32 index = (_thumbLetter.at(0).unicode() % 4); int32 index = (_thumbLetter.at(0).unicode() % 4);
const style::color *colors[] = { const style::color *colors[] = {
&st::msgFileRedColor, &st::msgFile3Bg,
&st::msgFileYellowColor, &st::msgFile4Bg,
&st::msgFileGreenColor, &st::msgFile2Bg,
&st::msgFileBlueColor &st::msgFile1Bg
}; };
p.fillRect(rthumb, *colors[index]); p.fillRect(rthumb, *colors[index]);

View File

@ -24,18 +24,15 @@ using "ui/widgets/widgets.style";
countryRipple: defaultRippleAnimation; countryRipple: defaultRippleAnimation;
introCoverHeight: 208px; introCoverHeight: 208px;
introCoverTopBg: #0f89d0;
introCoverBottomBg: #39b0f0;
introCoverIconsFg: #5ec6ff;
introCoverMaxWidth: 880px; introCoverMaxWidth: 880px;
introCoverIconsMinSkip: 120px; introCoverIconsMinSkip: 120px;
introCoverLeft: icon {{ "intro_left", introCoverIconsFg }}; introCoverLeft: icon {{ "intro_left", introCoverIconsFg }};
introCoverRight: icon {{ "intro_right", introCoverIconsFg }}; introCoverRight: icon {{ "intro_right", introCoverIconsFg }};
introCoverIcon: icon { introCoverIcon: icon {
{ "intro_plane_trace", #5ec6ff69 }, { "intro_plane_trace", introCoverPlaneTrace },
{ "intro_plane_inner", #c6d8e8 }, { "intro_plane_inner", introCoverPlaneInner },
{ "intro_plane_outer", #a1bed4 }, { "intro_plane_outer", introCoverPlaneOuter },
{ "intro_plane_top", #ffffff }, { "intro_plane_top", introCoverPlaneTop },
}; };
introCoverIconLeft: 50px; introCoverIconLeft: 50px;
introCoverIconTop: 46px; introCoverIconTop: 46px;

View File

@ -212,46 +212,46 @@ int32 documentColorIndex(DocumentData *document, QString &ext) {
const style::color &documentColor(int32 colorIndex) { const style::color &documentColor(int32 colorIndex) {
static const style::color *colors[] = { static const style::color *colors[] = {
&st::msgFileBlueColor, &st::msgFile1Bg,
&st::msgFileGreenColor, &st::msgFile2Bg,
&st::msgFileRedColor, &st::msgFile3Bg,
&st::msgFileYellowColor &st::msgFile4Bg
}; };
return *colors[colorIndex & 3]; return *colors[colorIndex & 3];
} }
const style::color &documentDarkColor(int32 colorIndex) { const style::color &documentDarkColor(int32 colorIndex) {
static const style::color *colors[] = { static const style::color *colors[] = {
&st::msgFileBlueDark, &st::msgFile1BgDark,
&st::msgFileGreenDark, &st::msgFile2BgDark,
&st::msgFileRedDark, &st::msgFile3BgDark,
&st::msgFileYellowDark &st::msgFile4BgDark
}; };
return *colors[colorIndex & 3]; return *colors[colorIndex & 3];
} }
const style::color &documentOverColor(int32 colorIndex) { const style::color &documentOverColor(int32 colorIndex) {
static const style::color *colors[] = { static const style::color *colors[] = {
&st::msgFileBlueOver, &st::msgFile1BgOver,
&st::msgFileGreenOver, &st::msgFile2BgOver,
&st::msgFileRedOver, &st::msgFile3BgOver,
&st::msgFileYellowOver &st::msgFile4BgOver
}; };
return *colors[colorIndex & 3]; return *colors[colorIndex & 3];
} }
const style::color &documentSelectedColor(int32 colorIndex) { const style::color &documentSelectedColor(int32 colorIndex) {
static const style::color *colors[] = { static const style::color *colors[] = {
&st::msgFileBlueSelected, &st::msgFile1BgSelected,
&st::msgFileGreenSelected, &st::msgFile2BgSelected,
&st::msgFileRedSelected, &st::msgFile3BgSelected,
&st::msgFileYellowSelected &st::msgFile4BgSelected
}; };
return *colors[colorIndex & 3]; return *colors[colorIndex & 3];
} }
RoundCorners documentCorners(int32 colorIndex) { RoundCorners documentCorners(int32 colorIndex) {
return RoundCorners(DocBlueCorners + (colorIndex & 3)); return RoundCorners(Doc1Corners + (colorIndex & 3));
} }
bool documentIsValidMediaFile(const QString &filepath) { bool documentIsValidMediaFile(const QString &filepath) {

View File

@ -54,10 +54,10 @@ enum RoundCorners {
BotKeyboardDownCorners, BotKeyboardDownCorners,
PhotoSelectOverlayCorners, PhotoSelectOverlayCorners,
DocBlueCorners, Doc1Corners,
DocGreenCorners, Doc2Corners,
DocRedCorners, Doc3Corners,
DocYellowCorners, Doc4Corners,
InShadowCorners, // for photos without bg InShadowCorners, // for photos without bg
InSelectedShadowCorners, InSelectedShadowCorners,

View File

@ -70,7 +70,7 @@ StackItemSection::~StackItemSection() {
MainWidget::MainWidget(QWidget *parent) : TWidget(parent) MainWidget::MainWidget(QWidget *parent) : TWidget(parent)
, _dialogsWidth(st::dialogsWidthMin) , _dialogsWidth(st::dialogsWidthMin)
, _sideShadow(this, st::shadowColor) , _sideShadow(this, st::shadowFg)
, _dialogs(this) , _dialogs(this)
, _history(this) , _history(this)
, _topBar(this) , _topBar(this)

View File

@ -135,7 +135,7 @@ void audioInit() {
alGenBuffers(1, &notifyBuffer); alGenBuffers(1, &notifyBuffer);
if (!_checkALError()) return audioFinish(); if (!_checkALError()) return audioFinish();
QFile notify(st::newMsgSound); QFile notify(":/gui/art/newmsg.wav");
if (!notify.open(QIODevice::ReadOnly)) return audioFinish(); if (!notify.open(QIODevice::ReadOnly)) return audioFinish();
QByteArray blob = notify.readAll(); QByteArray blob = notify.readAll();

View File

@ -23,10 +23,6 @@ using "basic.style";
using "ui/widgets/widgets.style"; using "ui/widgets/widgets.style";
using "overview/overview.style"; using "overview/overview.style";
mediaPlayerBg: windowBg;
mediaPlayerActiveFg: windowBgActive;
mediaPlayerInactiveFg: #dfebf2;
mediaPlayerButton: MediaPlayerButton { mediaPlayerButton: MediaPlayerButton {
playPosition: point(2px, 0px); playPosition: point(2px, 0px);
playOuter: size(17px, 15px); playOuter: size(17px, 15px);
@ -159,7 +155,7 @@ mediaPlayerPlayback: FilledSlider {
lineWidth: 2px; lineWidth: 2px;
activeFg: mediaPlayerActiveFg; activeFg: mediaPlayerActiveFg;
inactiveFg: mediaPlayerInactiveFg; inactiveFg: mediaPlayerInactiveFg;
disabledFg: #9dd1ef; disabledFg: mediaPlayerDisabledFg;
duration: 150; duration: 150;
} }

View File

@ -91,7 +91,7 @@ Widget::Widget(QWidget *parent) : TWidget(parent)
, _volumeToggle(this, st::mediaPlayerVolumeToggle) , _volumeToggle(this, st::mediaPlayerVolumeToggle)
, _repeatTrack(this, st::mediaPlayerRepeatButton) , _repeatTrack(this, st::mediaPlayerRepeatButton)
, _close(this, st::mediaPlayerClose) , _close(this, st::mediaPlayerClose)
, _shadow(this, st::shadowColor) , _shadow(this, st::shadowFg)
, _playback(std_::make_unique<Clip::Playback>(new Ui::FilledSlider(this, st::mediaPlayerPlayback))) { , _playback(std_::make_unique<Clip::Playback>(new Ui::FilledSlider(this, st::mediaPlayerPlayback))) {
setAttribute(Qt::WA_OpaquePaintEvent); setAttribute(Qt::WA_OpaquePaintEvent);
setMouseTracking(true); setMouseTracking(true);

View File

@ -211,7 +211,7 @@ void Controller::paintEvent(QPaintEvent *e) {
return; return;
} }
App::roundRect(p, rect(), st::medviewSaveMsg, MediaviewSaveCorners); App::roundRect(p, rect(), st::mediaviewSaveMsgBg, MediaviewSaveCorners);
} }
void Controller::mousePressEvent(QMouseEvent *e) { void Controller::mousePressEvent(QMouseEvent *e) {

View File

@ -23,10 +23,7 @@ using "basic.style";
using "ui/widgets/widgets.style"; using "ui/widgets/widgets.style";
mediaviewOverDuration: 150; mediaviewOverDuration: 150;
mediaviewPlaybackActive: #c7c7c7;
mediaviewPlaybackInactive: #252525;
mediaviewPlaybackActiveOver: #ffffff;
mediaviewPlaybackInactiveOver: #474747;
mediaviewPlayback: MediaSlider { mediaviewPlayback: MediaSlider {
width: 3px; width: 3px;
activeFg: mediaviewPlaybackActive; activeFg: mediaviewPlaybackActive;
@ -42,32 +39,32 @@ mediaviewPlayback: MediaSlider {
mediaviewControllerSize: size(600px, 50px); mediaviewControllerSize: size(600px, 50px);
mediaviewPlayProgressLabel: LabelSimple(defaultLabelSimple) { mediaviewPlayProgressLabel: LabelSimple(defaultLabelSimple) {
font: semiboldFont; font: semiboldFont;
textFg: #ffffffc7; textFg: mediaviewPlaybackProgressFg;
} }
mediaviewPlayProgressTop: 11px; mediaviewPlayProgressTop: 11px;
mediaviewPlayButton: IconButton { mediaviewPlayButton: IconButton {
width: 25px; width: 25px;
height: 24px; height: 24px;
icon: icon {{ "media_play", #c7c7c7, point(3px, 0px) }}; icon: icon {{ "media_play", mediaviewPlaybackIconFg, point(3px, 0px) }};
iconOver: icon {{ "media_play", #ffffff, point(3px, 0px) }}; iconOver: icon {{ "media_play", mediaviewPlaybackIconFgOver, point(3px, 0px) }};
iconPosition: point(3px, 1px); iconPosition: point(3px, 1px);
duration: mediaviewOverDuration; duration: mediaviewOverDuration;
} }
mediaviewPauseIcon: icon {{ "media_pause", #c7c7c7, point(1px, 1px) }}; mediaviewPauseIcon: icon {{ "media_pause", mediaviewPlaybackIconFg, point(1px, 1px) }};
mediaviewPauseIconOver: icon {{ "media_pause", #ffffff, point(1px, 1px) }}; mediaviewPauseIconOver: icon {{ "media_pause", mediaviewPlaybackIconFgOver, point(1px, 1px) }};
mediaviewPlayPauseLeft: 17px; mediaviewPlayPauseLeft: 17px;
mediaviewFullScreenLeft: 17px; mediaviewFullScreenLeft: 17px;
mediaviewVolumeLeft: 15px; mediaviewVolumeLeft: 15px;
mediaviewFullScreenButton: IconButton(mediaviewPlayButton) { mediaviewFullScreenButton: IconButton(mediaviewPlayButton) {
icon: icon {{ "media_fullscreen_to", #c7c7c7, point(0px, 0px) }}; icon: icon {{ "media_fullscreen_to", mediaviewPlaybackIconFg, point(0px, 0px) }};
iconOver: icon {{ "media_fullscreen_to", #ffffff, point(0px, 0px) }}; iconOver: icon {{ "media_fullscreen_to", mediaviewPlaybackIconFgOver, point(0px, 0px) }};
iconPosition: point(0px, 1px); iconPosition: point(0px, 1px);
} }
mediaviewFullScreenOutIcon: icon {{ "media_fullscreen_from", #c7c7c7, point(0px, 0px) }}; mediaviewFullScreenOutIcon: icon {{ "media_fullscreen_from", mediaviewPlaybackIconFg, point(0px, 0px) }};
mediaviewFullScreenOutIconOver: icon {{ "media_fullscreen_from", #ffffff, point(0px, 0px) }}; mediaviewFullScreenOutIconOver: icon {{ "media_fullscreen_from", mediaviewPlaybackIconFgOver, point(0px, 0px) }};
mediaviewPlaybackTop: 28px; mediaviewPlaybackTop: 28px;
@ -78,11 +75,11 @@ mediaviewVolumeOnIconOver: icon {{ "media_volume", mediaviewPlaybackActiveOver,
mediaviewVolumeIconTop: 8px; mediaviewVolumeIconTop: 8px;
mediaviewControllerRadius: 25px; mediaviewControllerRadius: 25px;
mediaviewLeft: icon {{ "mediaview_next-flip_horizontal", #ffffff }}; mediaviewLeft: icon {{ "mediaview_next-flip_horizontal", mediaviewControlFg }};
mediaviewRight: icon {{ "mediaview_next", #ffffff }}; mediaviewRight: icon {{ "mediaview_next", mediaviewControlFg }};
mediaviewClose: icon {{ "mediaview_close", #ffffff }}; mediaviewClose: icon {{ "mediaview_close", mediaviewControlFg }};
mediaviewSave: icon {{ "mediaview_download", #ffffff }}; mediaviewSave: icon {{ "mediaview_download", mediaviewControlFg }};
mediaviewMore: icon {{ "mediaview_more", #ffffff }}; mediaviewMore: icon {{ "mediaview_more", mediaviewControlFg }};
mediaviewFileRed: icon { mediaviewFileRed: icon {
{ size(25px, 25px), mediaviewFileBg }, { size(25px, 25px), mediaviewFileBg },
@ -112,13 +109,8 @@ mediaviewFileExtPadding: 10px;
mediaviewFileLinksTop: 57px; mediaviewFileLinksTop: 57px;
mediaviewFileIconSize: 80px; mediaviewFileIconSize: 80px;
mediaviewFileLink: LinkButton(defaultLinkButton) { mediaviewFileLink: defaultLinkButton;
color: #4595d3;
overColor: #4595d3;
}
mediaviewTransparentBg: #ffffff;
mediaviewTransparentFg: #cccccc;
mediaviewTransparentSize: 4px; mediaviewTransparentSize: 4px;
mediaviewMenu: Menu(defaultMenu) { mediaviewMenu: Menu(defaultMenu) {

View File

@ -1612,11 +1612,11 @@ void MediaView::paintEvent(QPaintEvent *e) {
_saveMsgOpacity.update(qMin(progress, 1.), anim::linear); _saveMsgOpacity.update(qMin(progress, 1.), anim::linear);
if (_saveMsgOpacity.current() > 0) { if (_saveMsgOpacity.current() > 0) {
p.setOpacity(_saveMsgOpacity.current()); p.setOpacity(_saveMsgOpacity.current());
App::roundRect(p, _saveMsg, st::medviewSaveMsg, MediaviewSaveCorners); App::roundRect(p, _saveMsg, st::mediaviewSaveMsgBg, MediaviewSaveCorners);
st::medviewSaveMsgCheck.paint(p, _saveMsg.topLeft() + st::medviewSaveMsgCheckPos, width()); st::medviewSaveMsgCheck.paint(p, _saveMsg.topLeft() + st::medviewSaveMsgCheckPos, width());
p.setPen(st::medviewSaveMsgFg); p.setPen(st::mediaviewSaveMsgFg);
textstyleSet(&st::medviewSaveAsTextStyle); textstyleSet(&st::mediaviewTextStyle);
_saveMsgText.draw(p, _saveMsg.x() + st::medviewSaveMsgPadding.left(), _saveMsg.y() + st::medviewSaveMsgPadding.top(), _saveMsg.width() - st::medviewSaveMsgPadding.left() - st::medviewSaveMsgPadding.right()); _saveMsgText.draw(p, _saveMsg.x() + st::medviewSaveMsgPadding.left(), _saveMsg.y() + st::medviewSaveMsgPadding.top(), _saveMsg.width() - st::medviewSaveMsgPadding.left() - st::medviewSaveMsgPadding.right());
textstyleRestore(); textstyleRestore();
p.setOpacity(1); p.setOpacity(1);
@ -1736,7 +1736,7 @@ void MediaView::paintEvent(QPaintEvent *e) {
st::mediaviewMore.paintInCenter(p, _moreNavIcon); st::mediaviewMore.paintInCenter(p, _moreNavIcon);
} }
p.setPen(st::mvControlFg); p.setPen(st::mediaviewControlFg);
p.setFont(st::mvThickFont); p.setFont(st::mvThickFont);
// header // header
@ -1782,12 +1782,12 @@ void MediaView::paintEvent(QPaintEvent *e) {
QRect outer(_captionRect.marginsAdded(st::mvCaptionPadding)); QRect outer(_captionRect.marginsAdded(st::mvCaptionPadding));
if (outer.intersects(r)) { if (outer.intersects(r)) {
p.setOpacity(co); p.setOpacity(co);
p.setBrush(st::mvCaptionBg); p.setBrush(st::mediaviewCaptionBg);
p.setPen(Qt::NoPen); p.setPen(Qt::NoPen);
p.drawRoundedRect(outer, st::mvCaptionRadius, st::mvCaptionRadius); p.drawRoundedRect(outer, st::mvCaptionRadius, st::mvCaptionRadius);
if (_captionRect.intersects(r)) { if (_captionRect.intersects(r)) {
textstyleSet(&st::medviewSaveAsTextStyle); textstyleSet(&st::mediaviewTextStyle);
p.setPen(st::mvCaptionFg); p.setPen(st::mediaviewCaptionFg);
_caption.drawElided(p, _captionRect.x(), _captionRect.y(), _captionRect.width(), _captionRect.height() / st::mvCaptionFont->height); _caption.drawElided(p, _captionRect.x(), _captionRect.y(), _captionRect.width(), _captionRect.height() / st::mvCaptionFont->height);
textstyleRestore(); textstyleRestore();
} }

View File

@ -50,9 +50,6 @@ OverviewFileLayout {
overviewLeftMin: 28px; overviewLeftMin: 28px;
overviewLeftMax: 42px; overviewLeftMax: 42px;
overviewCheckBg: #00000040;
overviewCheckFg: windowBg;
overviewCheckFgActive: windowBg;
overviewCheckPressedSize: 0.8; overviewCheckPressedSize: 0.8;
overviewCheck: RoundCheckbox(defaultRoundCheckbox) { overviewCheck: RoundCheckbox(defaultRoundCheckbox) {
bgInactive: overviewCheckBg; bgInactive: overviewCheckBg;
@ -63,18 +60,16 @@ overviewCheck: RoundCheckbox(defaultRoundCheckbox) {
overviewCheckSkip: 5px; overviewCheckSkip: 5px;
overviewPhotoSkip: 10px; overviewPhotoSkip: 10px;
overviewPhotoBg: #F1F1F1; overviewPhotoBg: windowBgOver;
overviewPhotoMinSize: minPhotoSize; overviewPhotoMinSize: minPhotoSize;
overviewPhotoSelectOverlay: #40ace333; overviewVideoBg: imageBg;
overviewVideoBg: #000000; overviewFileThumbBg: imageBg;
overviewFileThumbBg: #000000;
overviewFileChecked: windowBgActive; overviewFileChecked: windowBgActive;
overviewFileCheck: #00000066; overviewFileCheck: overviewCheckBg;
overviewFileExtPadding: 5px; overviewFileExtPadding: 5px;
overviewFileExtTop: 24px; overviewFileExtTop: 24px;
overviewFileExtFg: #ffffff; overviewFileExtFg: windowFgActive;
overviewFileExtFont: font(18px semibold); overviewFileExtFont: font(18px semibold);
overviewSongPause: icon {{ "playlist_pause", msgInBg }}; overviewSongPause: icon {{ "playlist_pause", msgInBg }};
@ -118,14 +113,14 @@ playlistPadding: 10px;
linksSearchTop: 30px; linksSearchTop: 30px;
linksMaxWidth: 520px; linksMaxWidth: 520px;
linksLetterFg: #ffffff; linksLetterFg: windowFgActive;
linksLetterFont: font(24px); linksLetterFont: font(24px);
linksMargin: margins(0px, 7px, 0px, 5px); linksMargin: margins(0px, 7px, 0px, 5px);
linksTextFg: #000000; linksTextFg: windowFg;
linksTextTop: 6px; linksTextTop: 6px;
linksBorder: 1px; linksBorder: 1px;
linksBorderFg: #eaeaea; linksBorderFg: shadowFg;
linksDateColor: #808080; linksDateColor: windowSubTextFg;
linksDateMargin: margins(0px, 15px, 0px, 2px); linksDateMargin: margins(0px, 15px, 0px, 2px);
linksPhotoSize: 46px; linksPhotoSize: 46px;
linksPhotoPadding: 12px; linksPhotoPadding: 12px;
@ -140,8 +135,8 @@ overviewLinksChecked: icon {
overviewFilter: FlatInput(defaultFlatInput) { overviewFilter: FlatInput(defaultFlatInput) {
font: font(fsize); font: font(fsize);
phColor: #949494; phColor: placeholderFg;
phFocusColor: #a4a4a4; phFocusColor: placeholderFgActive;
icon: fieldSearchIcon; icon: fieldSearchIcon;
width: 240px; width: 240px;

View File

@ -367,7 +367,7 @@ void Video::paint(Painter &p, const QRect &clip, TextSelection selection, const
statusX = _width - statusW + statusX; statusX = _width - statusW + statusX;
p.fillRect(rtlrect(statusX - st::msgDateImgPadding.x(), statusY - st::msgDateImgPadding.y(), statusW, statusH, _width), selected ? st::msgDateImgBgSelected : st::msgDateImgBg); p.fillRect(rtlrect(statusX - st::msgDateImgPadding.x(), statusY - st::msgDateImgPadding.y(), statusW, statusH, _width), selected ? st::msgDateImgBgSelected : st::msgDateImgBg);
p.setFont(st::normalFont); p.setFont(st::normalFont);
p.setPen(st::msgDateImgColor); p.setPen(st::msgDateImgFg);
p.drawTextLeft(statusX, statusY, _width, _status.text(), statusW - 2 * st::msgDateImgPadding.x()); p.drawTextLeft(statusX, statusY, _width, _status.text(), statusW - 2 * st::msgDateImgPadding.x());
} }
} }
@ -377,7 +377,7 @@ void Video::paint(Painter &p, const QRect &clip, TextSelection selection, const
int32 statusH = st::normalFont->height + 2 * st::msgDateImgPadding.y(); int32 statusH = st::normalFont->height + 2 * st::msgDateImgPadding.y();
p.fillRect(rtlrect(statusX - st::msgDateImgPadding.x(), statusY - st::msgDateImgPadding.y(), statusW, statusH, _width), selected ? st::msgDateImgBgSelected : st::msgDateImgBg); p.fillRect(rtlrect(statusX - st::msgDateImgPadding.x(), statusY - st::msgDateImgPadding.y(), statusW, statusH, _width), selected ? st::msgDateImgBgSelected : st::msgDateImgBg);
p.setFont(st::normalFont); p.setFont(st::normalFont);
p.setPen(st::msgDateImgColor); p.setPen(st::msgDateImgFg);
p.drawTextLeft(statusX, statusY, _width, _duration, statusW - 2 * st::msgDateImgPadding.x()); p.drawTextLeft(statusX, statusY, _width, _duration, statusW - 2 * st::msgDateImgPadding.x());
} }
@ -1132,10 +1132,10 @@ void Link::paint(Painter &p, const QRect &clip, TextSelection selection, const P
} else { } else {
int32 index = _letter.isEmpty() ? 0 : (_letter.at(0).unicode() % 4); int32 index = _letter.isEmpty() ? 0 : (_letter.at(0).unicode() % 4);
switch (index) { switch (index) {
case 0: App::roundRect(p, rtlrect(0, top, st::linksPhotoSize, st::linksPhotoSize, _width), st::msgFileRedColor, DocRedCorners); break; case 0: App::roundRect(p, rtlrect(0, top, st::linksPhotoSize, st::linksPhotoSize, _width), st::msgFile1Bg, Doc1Corners); break;
case 1: App::roundRect(p, rtlrect(0, top, st::linksPhotoSize, st::linksPhotoSize, _width), st::msgFileYellowColor, DocYellowCorners); break; case 1: App::roundRect(p, rtlrect(0, top, st::linksPhotoSize, st::linksPhotoSize, _width), st::msgFile2Bg, Doc2Corners); break;
case 2: App::roundRect(p, rtlrect(0, top, st::linksPhotoSize, st::linksPhotoSize, _width), st::msgFileGreenColor, DocGreenCorners); break; case 2: App::roundRect(p, rtlrect(0, top, st::linksPhotoSize, st::linksPhotoSize, _width), st::msgFile3Bg, Doc3Corners); break;
case 3: App::roundRect(p, rtlrect(0, top, st::linksPhotoSize, st::linksPhotoSize, _width), st::msgFileBlueColor, DocBlueCorners); break; case 3: App::roundRect(p, rtlrect(0, top, st::linksPhotoSize, st::linksPhotoSize, _width), st::msgFile4Bg, Doc4Corners); break;
} }
if (!_letter.isEmpty()) { if (!_letter.isEmpty()) {

View File

@ -1902,7 +1902,7 @@ OverviewInner::~OverviewInner() {
OverviewWidget::OverviewWidget(QWidget *parent, PeerData *peer, MediaOverviewType type) : TWidget(parent) OverviewWidget::OverviewWidget(QWidget *parent, PeerData *peer, MediaOverviewType type) : TWidget(parent)
, _scroll(this, st::settingsScroll, false) , _scroll(this, st::settingsScroll, false)
, _topShadow(this, st::shadowColor) { , _topShadow(this, st::shadowFg) {
_inner = _scroll->setOwnedWidget(object_ptr<OverviewInner>(this, _scroll, peer, type)); _inner = _scroll->setOwnedWidget(object_ptr<OverviewInner>(this, _scroll, peer, type));
_scroll->move(0, 0); _scroll->move(0, 0);
_inner->move(0, 0); _inner->move(0, 0);

View File

@ -109,7 +109,7 @@ void PasscodeWidget::showAnimated(const QPixmap &bgAnimCache, bool back) {
_a_show.finish(); _a_show.finish();
showAll(); showAll();
setFocus(); setInnerFocus();
_passcode->finishAnimations(); _passcode->finishAnimations();
(_showBack ? _cacheUnder : _cacheOver) = myGrab(this); (_showBack ? _cacheUnder : _cacheOver) = myGrab(this);
hideAll(); hideAll();
@ -187,5 +187,5 @@ void PasscodeWidget::resizeEvent(QResizeEvent *e) {
} }
void PasscodeWidget::setInnerFocus() { void PasscodeWidget::setInnerFocus() {
_passcode->setFocus(); _passcode->setFocusFast();
} }

View File

@ -41,7 +41,7 @@ profileNameLabel: FlatLabel(defaultFlatLabel) {
font: font(16px semibold); font: font(16px semibold);
width: 160px; width: 160px;
maxHeight: 24px; maxHeight: 24px;
textFg: #333333; textFg: windowBoldFg;
} }
profileNameTextStyle: TextStyle(defaultTextStyle) { profileNameTextStyle: TextStyle(defaultTextStyle) {
} }
@ -91,7 +91,7 @@ profileBlockMarginRight: 10px;
profileBlockMarginBottom: 7px; profileBlockMarginBottom: 7px;
profileBlockTitleHeight: 24px; profileBlockTitleHeight: 24px;
profileBlockTitleFont: font(14px semibold); profileBlockTitleFont: font(14px semibold);
profileBlockTitleFg: #333333; profileBlockTitleFg: windowBoldFg;
profileBlockTitlePosition: point(24px, 0px); profileBlockTitlePosition: point(24px, 0px);
profileBlockLabel: FlatLabel(defaultFlatLabel) { profileBlockLabel: FlatLabel(defaultFlatLabel) {
textFg: windowSubTextFg; textFg: windowSubTextFg;
@ -121,7 +121,7 @@ profileMemberItem: ProfilePeerListItem {
bottom: profileBlockMarginBottom; bottom: profileBlockMarginBottom;
button: defaultLeftOutlineButton; button: defaultLeftOutlineButton;
statusFg: windowSubTextFg; statusFg: windowSubTextFg;
statusFgOver: #7c99b2; statusFgOver: profileStatusFgOver;
statusFgActive: windowActiveTextFg; statusFgActive: windowActiveTextFg;
} }
profileMemberHeight: 58px; profileMemberHeight: 58px;
@ -129,7 +129,7 @@ profileMemberPaddingLeft: 16px;
profileMemberPhotoSize: 46px; profileMemberPhotoSize: 46px;
profileMemberPhotoPosition: point(12px, 6px); profileMemberPhotoPosition: point(12px, 6px);
profileMemberNamePosition: point(68px, 11px); profileMemberNamePosition: point(68px, 11px);
profileMemberNameFg: #222222; profileMemberNameFg: windowBoldFg;
profileMemberStatusPosition: point(68px, 31px); profileMemberStatusPosition: point(68px, 31px);
profileMemberAdminIcon: icon {{ "profile_admin_star", windowBgActive, point(4px, 3px) }}; profileMemberAdminIcon: icon {{ "profile_admin_star", windowBgActive, point(4px, 3px) }};
profileLimitReachedLabel: FlatLabel(defaultFlatLabel) { profileLimitReachedLabel: FlatLabel(defaultFlatLabel) {

View File

@ -334,7 +334,7 @@ InnerWidget::~InnerWidget() {
Widget::Widget(QWidget *parent, PeerData *peer) : Window::SectionWidget(parent) Widget::Widget(QWidget *parent, PeerData *peer) : Window::SectionWidget(parent)
, _scroll(this, st::settingsScroll) , _scroll(this, st::settingsScroll)
, _fixedBar(this) , _fixedBar(this)
, _fixedBarShadow(this, st::shadowColor) { , _fixedBarShadow(this, st::shadowFg) {
_fixedBar->move(0, 0); _fixedBar->move(0, 0);
_fixedBar->resizeToWidth(width()); _fixedBar->resizeToWidth(width());
_fixedBar->show(); _fixedBar->show();

View File

@ -125,7 +125,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
int shadowLeft = _blocksLeft + _leftColumnWidth + _columnDivider; int shadowLeft = _blocksLeft + _leftColumnWidth + _columnDivider;
int shadowTop = _blocksTop + st::profileBlockMarginTop; int shadowTop = _blocksTop + st::profileBlockMarginTop;
p.fillRect(rtlrect(shadowLeft, shadowTop, st::lineWidth, shadowHeight - st::profileBlockMarginTop, width()), st::shadowColor); p.fillRect(rtlrect(shadowLeft, shadowTop, st::lineWidth, shadowHeight - st::profileBlockMarginTop, width()), st::shadowFg);
} }
} }

View File

@ -36,7 +36,7 @@ namespace Profile {
Widget::Widget(QWidget *parent, PeerData *peer) : Window::SectionWidget(parent) Widget::Widget(QWidget *parent, PeerData *peer) : Window::SectionWidget(parent)
, _scroll(this, st::settingsScroll) , _scroll(this, st::settingsScroll)
, _fixedBar(this, peer) , _fixedBar(this, peer)
, _fixedBarShadow(this, object_ptr<Ui::PlainShadow>(this, st::shadowColor)) { , _fixedBarShadow(this, object_ptr<Ui::PlainShadow>(this, st::shadowFg)) {
_fixedBar->move(0, 0); _fixedBar->move(0, 0);
_fixedBar->resizeToWidth(width()); _fixedBar->resizeToWidth(width());
_fixedBar->show(); _fixedBar->show();

View File

@ -53,7 +53,7 @@ settingsNameLabel: FlatLabel(defaultFlatLabel) {
font: font(16px semibold); font: font(16px semibold);
width: 160px; width: 160px;
maxHeight: 24px; maxHeight: 24px;
textFg: #333333; textFg: windowBoldFg;
} }
settingsNameTextStyle: TextStyle(defaultTextStyle) { settingsNameTextStyle: TextStyle(defaultTextStyle) {
} }
@ -73,7 +73,7 @@ settingsEditButton: IconButton {
width: 24px; width: 24px;
height: 34px; height: 34px;
icon: icon {{ "settings_edit_name", #b7b7b7 }}; icon: icon {{ "settings_edit_name", menuIconFg }};
iconPosition: point(3px, 9px); iconPosition: point(3px, 9px);
} }
@ -84,7 +84,7 @@ settingsBlockMarginRight: 10px;
settingsBlockMarginBottom: 10px; settingsBlockMarginBottom: 10px;
settingsBlockTitleHeight: 31px; settingsBlockTitleHeight: 31px;
settingsBlockTitleFont: font(15px semibold); settingsBlockTitleFont: font(15px semibold);
settingsBlockTitleFg: #333333; settingsBlockTitleFg: windowBoldFg;
settingsBlockTitleTop: 0px; settingsBlockTitleTop: 0px;
settingsPrimaryLabel: FlatLabel(defaultFlatLabel) { settingsPrimaryLabel: FlatLabel(defaultFlatLabel) {
font: boxTextFont; font: boxTextFont;
@ -106,4 +106,4 @@ settingsActionPadding: margins(0px, 4px, 0px, 5px);
settingsBackgroundSize: 120px; settingsBackgroundSize: 120px;
settingsUpdateFg: #999999; settingsUpdateFg: windowSubTextFg;

View File

@ -36,7 +36,7 @@ stickersTrendingHeaderFont: semiboldFont;
stickersTrendingHeaderFg: windowFg; stickersTrendingHeaderFg: windowFg;
stickersTrendingHeaderTop: 0px; stickersTrendingHeaderTop: 0px;
stickersTrendingSubheaderFont: normalFont; stickersTrendingSubheaderFont: normalFont;
stickersTrendingSubheaderFg: #777777; stickersTrendingSubheaderFg: windowSubTextFg;
stickersTrendingSubheaderTop: 20px; stickersTrendingSubheaderTop: 20px;
stickersTrendingAddTop: 3px; stickersTrendingAddTop: 3px;
@ -94,11 +94,11 @@ stickersScroll: ScrollArea(boxLayerScroll) {
deltab: 9px; deltab: 9px;
} }
stickersReorderPadding: margins(0px, 12px, 0px, 12px); stickersReorderPadding: margins(0px, 12px, 0px, 12px);
stickersReorderFg: #777777; stickersReorderFg: windowSubTextFg;
stickersRowDisabledOpacity: 0.4; stickersRowDisabledOpacity: 0.4;
stickersRowDuration: 200; stickersRowDuration: 200;
emojiIconFg: #b3b3b3; emojiIconFg: checkboxFg;
emojiIconFgActive: windowBgActive; emojiIconFgActive: windowBgActive;
stickersSettings: icon {{ "emoji_settings", emojiIconFg }}; stickersSettings: icon {{ "emoji_settings", emojiIconFg }};
stickersTrending: icon {{ "emoji_trending", emojiIconFg }}; stickersTrending: icon {{ "emoji_trending", emojiIconFg }};
@ -165,7 +165,7 @@ emojiPanHeaderTop: 12px;
emojiColorsPadding: 5px; emojiColorsPadding: 5px;
emojiColorsSep: 1px; emojiColorsSep: 1px;
emojiColorsSepColor: #d5d5d5; emojiColorsSepColor: shadowFg;
emojiSwitchSkip: 27px; emojiSwitchSkip: 27px;
emojiSwitchImgSkip: 21px; emojiSwitchImgSkip: 21px;
@ -176,8 +176,8 @@ emojiSwitchEmoji: icon {{ "emoji_switch-flip_horizontal", emojiSwitchColor }};
stickerPanSize: size(64px, 64px); stickerPanSize: size(64px, 64px);
stickerPanPadding: 11px; stickerPanPadding: 11px;
stickerPanDelete: icon { stickerPanDelete: icon {
{ "emoji_delete_bg", #000000cc }, { "emoji_delete_bg", stickerPanDeleteBg },
{ "emoji_delete", #ffffff }, { "emoji_delete", stickerPanDeleteFg },
}; };
stickerPanDeleteOpacity: 0.5; stickerPanDeleteOpacity: 0.5;
stickerIconPadding: 5px; stickerIconPadding: 5px;
@ -186,15 +186,14 @@ stickerIconSel: 2px;
stickerIconSelColor: emojiIconFgActive; stickerIconSelColor: emojiIconFgActive;
stickerIconMove: 400; stickerIconMove: 400;
stickerPreviewDuration: 150; stickerPreviewDuration: 150;
stickerPreviewBg: #FFFFFFB0;
stickerPreviewMin: 0.1; stickerPreviewMin: 0.1;
hashtagClose: IconButton { hashtagClose: IconButton {
width: 30px; width: 30px;
height: 30px; height: 30px;
icon: simpleCloseIcon; icon: smallCloseIcon;
iconOver: simpleCloseIconOver; iconOver: smallCloseIconOver;
iconPosition: point(10px, 10px); iconPosition: point(10px, 10px);
rippleAreaPosition: point(5px, 5px); rippleAreaPosition: point(5px, 5px);

View File

@ -50,7 +50,7 @@ ScrollBar::ScrollBar(ScrollArea *parent, bool vert, const style::ScrollArea *st)
connect(&_hideTimer, SIGNAL(timeout()), this, SLOT(onHideTimer())); connect(&_hideTimer, SIGNAL(timeout()), this, SLOT(onHideTimer()));
connect(_connected, SIGNAL(valueChanged(int)), this, SLOT(onValueChanged())); connect(_connected, SIGNAL(valueChanged(int)), this, SLOT(onValueChanged()));
connect(_connected, SIGNAL(rangeChanged(int, int)), this, SLOT(updateBar())); connect(_connected, SIGNAL(rangeChanged(int, int)), this, SLOT(onRangeChanged()));
updateBar(); updateBar();
} }
@ -64,6 +64,11 @@ void ScrollBar::onValueChanged() {
updateBar(); updateBar();
} }
void ScrollBar::onRangeChanged() {
area()->onInnerResized();
updateBar();
}
void ScrollBar::updateBar(bool force) { void ScrollBar::updateBar(bool force) {
QRect newBar; QRect newBar;
if (_connected->maximum() != _scrollMax) { if (_connected->maximum() != _scrollMax) {
@ -180,9 +185,9 @@ void ScrollBar::paintEvent(QPaintEvent *e) {
auto deltal = _vertical ? _st->deltax : 0, deltar = _vertical ? _st->deltax : 0; auto deltal = _vertical ? _st->deltax : 0, deltar = _vertical ? _st->deltax : 0;
auto deltat = _vertical ? 0 : _st->deltax, deltab = _vertical ? 0 : _st->deltax; auto deltat = _vertical ? 0 : _st->deltax, deltab = _vertical ? 0 : _st->deltax;
p.setPen(Qt::NoPen); p.setPen(Qt::NoPen);
auto bg = anim::color(_st->bgColor, _st->bgOverColor, _a_over.current(ms, (_over || _moving) ? 1. : 0.)); auto bg = anim::color(_st->bg, _st->bgOver, _a_over.current(ms, (_over || _moving) ? 1. : 0.));
bg.setAlpha(anim::interpolate(0, bg.alpha(), opacity)); bg.setAlpha(anim::interpolate(0, bg.alpha(), opacity));
auto bar = anim::color(_st->barColor, _st->barOverColor, _a_barOver.current(ms, (_overbar || _moving) ? 1. : 0.)); auto bar = anim::color(_st->barBg, _st->barBgOver, _a_barOver.current(ms, (_overbar || _moving) ? 1. : 0.));
bar.setAlpha(anim::interpolate(0, bar.alpha(), opacity)); bar.setAlpha(anim::interpolate(0, bar.alpha(), opacity));
if (_st->round) { if (_st->round) {
PainterHighQualityEnabler hq(p); PainterHighQualityEnabler hq(p);
@ -387,6 +392,10 @@ void ScrollArea::onScrolled() {
} }
} }
void ScrollArea::onInnerResized() {
emit innerResized();
}
int ScrollArea::scrollWidth() const { int ScrollArea::scrollWidth() const {
QWidget *w(widget()); QWidget *w(widget());
return w ? qMax(w->width(), width()) : width(); return w ? qMax(w->width(), width()) : width();

View File

@ -58,12 +58,13 @@ public:
ScrollBar(ScrollArea *parent, bool vertical, const style::ScrollArea *st); ScrollBar(ScrollArea *parent, bool vertical, const style::ScrollArea *st);
void recountSize(); void recountSize();
void updateBar(bool force = false);
void hideTimeout(TimeMs dt); void hideTimeout(TimeMs dt);
public slots: private slots:
void onValueChanged(); void onValueChanged();
void updateBar(bool force = false); void onRangeChanged();
void onHideTimer(); void onHideTimer();
signals: signals:
@ -222,6 +223,7 @@ public slots:
void scrollToY(int toTop, int toBottom = -1); void scrollToY(int toTop, int toBottom = -1);
void disableScroll(bool dis); void disableScroll(bool dis);
void onScrolled(); void onScrolled();
void onInnerResized();
void onTouchTimer(); void onTouchTimer();
void onTouchScrollTimer(); void onTouchScrollTimer();
@ -233,6 +235,7 @@ public slots:
signals: signals:
void scrolled(); void scrolled();
void innerResized();
void scrollStarted(); void scrollStarted();
void scrollFinished(); void scrollFinished();
void geometryChanged(); void geometryChanged();

View File

@ -118,10 +118,10 @@ Checkbox {
} }
ScrollArea { ScrollArea {
barColor: color; bg: color;
bgColor: color; bgOver: color;
barOverColor: color; barBg: color;
bgOverColor: color; barBgOver: color;
round: pixels; round: pixels;
@ -170,7 +170,6 @@ FlatInput {
borderWidth: pixels; borderWidth: pixels;
borderColor: color; borderColor: color;
borderActive: color; borderActive: color;
borderError: color;
phColor: color; phColor: color;
phFocusColor: color; phFocusColor: color;
@ -203,7 +202,6 @@ InputField {
border: pixels; border: pixels;
borderActive: pixels; borderActive: pixels;
borderError: pixels;
font: font; font: font;
@ -490,10 +488,10 @@ defaultLightButton: RoundButton(defaultActiveButton) {
} }
defaultScrollArea: ScrollArea { defaultScrollArea: ScrollArea {
barColor: #00000053; bg: scrollBg;
bgColor: #0000001a; bgOver: scrollBgOver;
barOverColor: #0000007a; barBg: scrollBarBg;
bgOverColor: #0000002c; barBgOver: scrollBarBgOver;
round: 2px; round: 2px;
@ -505,7 +503,7 @@ defaultScrollArea: ScrollArea {
topsh: 2px; topsh: 2px;
bottomsh: 2px; bottomsh: 2px;
shColor: #00000012; shColor: shadowFg;
duration: 150; duration: 150;
hiding: 1000; hiding: 1000;
@ -525,9 +523,9 @@ defaultSolidScroll: ScrollArea(defaultScrollArea) {
defaultInputFont: font(17px); defaultInputFont: font(17px);
defaultFlatInput: FlatInput { defaultFlatInput: FlatInput {
textColor: #000000; textColor: windowFg;
bgColor: windowBgOver; bgColor: windowBgOver;
bgActive: #ffffff; bgActive: windowBg;
width: 210px; width: 210px;
height: 40px; height: 40px;
align: align(left); align: align(left);
@ -536,11 +534,10 @@ defaultFlatInput: FlatInput {
borderWidth: 2px; borderWidth: 2px;
borderColor: windowBgOver; borderColor: windowBgOver;
borderActive: #54c3f3; borderActive: filterInputBorderFg;
borderError: #ed8080;
phColor: #808080; phColor: placeholderFg;
phFocusColor: #aaaaaa; phFocusColor: placeholderFgActive;
phAlign: align(left); phAlign: align(left);
phPos: point(2px, 0px); phPos: point(2px, 0px);
phShift: 50px; phShift: 50px;
@ -549,11 +546,11 @@ defaultFlatInput: FlatInput {
defaultLeftOutlineButton: OutlineButton { defaultLeftOutlineButton: OutlineButton {
outlineWidth: 3px; outlineWidth: 3px;
outlineFg: windowBg; outlineFg: outlineButtonBg;
outlineFgOver: windowBgActive; outlineFgOver: outlineButtonOutlineFg;
textBg: windowBg; textBg: outlineButtonBg;
textBgOver: #f2f7fa; textBgOver: outlineButtonBgOver;
textFg: windowActiveTextFg; textFg: windowActiveTextFg;
textFgOver: windowActiveTextFg; textFgOver: windowActiveTextFg;
@ -562,7 +559,7 @@ defaultLeftOutlineButton: OutlineButton {
padding: margins(11px, 5px, 11px, 5px); padding: margins(11px, 5px, 11px, 5px);
ripple: RippleAnimation(defaultRippleAnimation) { ripple: RippleAnimation(defaultRippleAnimation) {
color: lightButtonBgRipple; color: outlineButtonBgRipple;
} }
} }
attentionLeftOutlineButton: OutlineButton(defaultLeftOutlineButton) { attentionLeftOutlineButton: OutlineButton(defaultLeftOutlineButton) {
@ -594,13 +591,12 @@ defaultInputField: InputField {
placeholderFont: font(semibold 14px); placeholderFont: font(semibold 14px);
duration: 150; duration: 150;
borderFg: #e0e0e0; borderFg: inputBorderFg;
borderFgActive: activeLineFg; borderFgActive: activeLineFg;
borderFgError: #e48383; borderFgError: activeLineFgError;
border: 1px; border: 1px;
borderActive: 2px; borderActive: 2px;
borderError: 2px;
font: boxTextFont; font: boxTextFont;
@ -614,7 +610,7 @@ defaultCheckbox: Checkbox {
textFg: windowFg; textFg: windowFg;
checkBg: transparent; checkBg: transparent;
checkFg: #b3b3b3; checkFg: checkboxFg;
checkFgActive: windowBgActive; checkFgActive: windowBgActive;
width: -44px; width: -44px;
@ -633,7 +629,7 @@ defaultCheckbox: Checkbox {
rippleAreaSize: 38px; rippleAreaSize: 38px;
rippleAreaPosition: point(0px, 0px); rippleAreaPosition: point(0px, 0px);
rippleBg: windowBgOver; rippleBg: windowBgOver;
rippleBgActive: #e0f2fa; rippleBgActive: lightButtonBgOver;
ripple: defaultRippleAnimation; ripple: defaultRippleAnimation;
} }
@ -644,8 +640,8 @@ defaultIconButton: IconButton {
widgetSlideDuration: 200; widgetSlideDuration: 200;
widgetFadeDuration: 200; widgetFadeDuration: 200;
fieldSearchIcon: icon {{ "box_search", #aaaaaa, point(9px, 8px) }}; fieldSearchIcon: icon {{ "box_search", menuIconFg, point(9px, 8px) }};
boxFieldSearchIcon: icon {{ "box_search", #aaaaaa, point(10px, 9px) }}; boxFieldSearchIcon: icon {{ "box_search", menuIconFg, point(10px, 9px) }};
SettingsSlider { SettingsSlider {
height: pixels; height: pixels;
@ -671,8 +667,8 @@ defaultSettingsSlider: SettingsSlider {
barTop: 5px; barTop: 5px;
barSkip: 3px; barSkip: 3px;
barStroke: 3px; barStroke: 3px;
barFg: #e1eaef; barFg: sliderBgInactive;
barFgActive: windowBgActive; barFgActive: sliderBgActive;
labelTop: 17px; labelTop: 17px;
labelFont: normalFont; labelFont: normalFont;
labelFg: windowActiveTextFg; labelFg: windowActiveTextFg;
@ -687,11 +683,11 @@ defaultTabsSlider: SettingsSlider(defaultSettingsSlider) {
barFg: transparent; barFg: transparent;
labelTop: 16px; labelTop: 16px;
labelFont: semiboldFont; labelFont: semiboldFont;
labelFg: #999999; labelFg: windowSubTextFg;
labelFgActive: lightButtonFg; labelFgActive: lightButtonFg;
rippleBottomSkip: 1px; rippleBottomSkip: 1px;
rippleBg: windowBgOver; rippleBg: windowBgOver;
rippleBgActive: #e0f2fa; rippleBgActive: lightButtonBgOver;
ripple: defaultRippleAnimation; ripple: defaultRippleAnimation;
} }
@ -732,7 +728,7 @@ defaultRoundCheckbox: RoundCheckbox {
duration: 150; duration: 150;
} }
defaultMenuArrow: icon {{ "dropdown_submenu_arrow", #373737 }}; defaultMenuArrow: icon {{ "dropdown_submenu_arrow", menuSubmenuArrowFg }};
defaultMenu: Menu { defaultMenu: Menu {
skip: 0px; skip: 0px;
@ -740,17 +736,17 @@ defaultMenu: Menu {
itemBgOver: windowBgOver; itemBgOver: windowBgOver;
itemFg: windowFg; itemFg: windowFg;
itemFgOver: windowFgOver; itemFgOver: windowFgOver;
itemFgDisabled: #cccccc; itemFgDisabled: menuFgDisabled;
itemFgShortcut: windowSubTextFg; itemFgShortcut: windowSubTextFg;
itemFgShortcutOver: windowSubTextFgOver; itemFgShortcutOver: windowSubTextFgOver;
itemFgShortcutDisabled: #cccccc; itemFgShortcutDisabled: menuFgDisabled;
itemIconPosition: point(0px, 0px); itemIconPosition: point(0px, 0px);
itemPadding: margins(17px, 8px, 17px, 7px); itemPadding: margins(17px, 8px, 17px, 7px);
itemFont: normalFont; itemFont: normalFont;
separatorPadding: margins(0px, 5px, 0px, 5px); separatorPadding: margins(0px, 5px, 0px, 5px);
separatorWidth: 1px; separatorWidth: 1px;
separatorFg: #f1f1f1; separatorFg: menuSeparatorFg;
arrow: defaultMenuArrow; arrow: defaultMenuArrow;
@ -789,19 +785,19 @@ defaultDropdownMenu: DropdownMenu {
} }
historyToDownBelow: icon { historyToDownBelow: icon {
{ "history_down_shadow", #00000040 }, { "history_down_shadow", historyToDownShadow },
{ "history_down_circle", windowBg, point(4px, 4px) }, { "history_down_circle", windowBg, point(4px, 4px) },
}; };
historyToDownBelowOver: icon { historyToDownBelowOver: icon {
{ "history_down_shadow", #00000040 }, { "history_down_shadow", historyToDownShadow },
{ "history_down_circle", windowBgOver, point(4px, 4px) }, { "history_down_circle", windowBgOver, point(4px, 4px) },
}; };
contactsAddIconBelow: icon { contactsAddIconBelow: icon {
{ "history_down_shadow", #00000040 }, { "history_down_shadow", historyToDownShadow },
{ "history_down_circle", activeButtonBg, point(4px, 4px) }, { "history_down_circle", activeButtonBg, point(4px, 4px) },
}; };
contactsAddIconBelowOver: icon { contactsAddIconBelowOver: icon {
{ "history_down_shadow", #00000040 }, { "history_down_shadow", historyToDownShadow },
{ "history_down_circle", activeButtonBgOver, point(4px, 4px) }, { "history_down_circle", activeButtonBgOver, point(4px, 4px) },
}; };

View File

@ -33,7 +33,7 @@ windowShadowShift: 1px;
adaptiveNormalWidth: 640px; adaptiveNormalWidth: 640px;
adaptiveWideWidth: 1366px; adaptiveWideWidth: 1366px;
notifyBorder: #f1f1f1; notifyBorder: windowShadowFgFallback;
notifyBorderWidth: 1px; notifyBorderWidth: 1px;
notifySlowHide: 4000; notifySlowHide: 4000;
notifyPhotoSize: 62px; notifyPhotoSize: 62px;
@ -44,8 +44,8 @@ notifyClose: IconButton {
width: 30px; width: 30px;
height: 30px; height: 30px;
icon: simpleCloseIcon; icon: smallCloseIcon;
iconOver: simpleCloseIconOver; iconOver: smallCloseIconOver;
iconPosition: point(10px, 10px); iconPosition: point(10px, 10px);
@ -73,14 +73,14 @@ notifyReplyArea: InputField(defaultInputField) {
textMargins: margins(8px, 8px, 8px, 6px); textMargins: margins(8px, 8px, 8px, 6px);
heightMin: 36px; heightMin: 36px;
heightMax: 72px; heightMax: 72px;
placeholderFgActive: #aaaaaa; placeholderFg: placeholderFg;
placeholderFgError: #aaaaaa; placeholderFgActive: placeholderFgActive;
placeholderFgError: placeholderFgActive;
placeholderMargins: margins(2px, 0px, 2px, 0px); placeholderMargins: margins(2px, 0px, 2px, 0px);
placeholderScale: 0.; placeholderScale: 0.;
placeholderFont: normalFont; placeholderFont: normalFont;
border: 0px; border: 0px;
borderActive: 0px; borderActive: 0px;
borderError: 0px;
} }
notifySendReply: IconButton(historySend) { notifySendReply: IconButton(historySend) {
width: 36px; width: 36px;
@ -91,10 +91,7 @@ notifySendReply: IconButton(historySend) {
titleUnreadCounterTop: 5px; titleUnreadCounterTop: 5px;
titleUnreadCounterRight: 35px; titleUnreadCounterRight: 35px;
mainMenuBg: #ffffff;
mainMenuWidth: 274px; mainMenuWidth: 274px;
mainMenuCoverBg: #419fd9;
mainMenuCoverFg: windowFgActive;
mainMenuCoverHeight: 140px; mainMenuCoverHeight: 140px;
mainMenuUserpicLeft: 24px; mainMenuUserpicLeft: 24px;
mainMenuUserpicTop: 22px; mainMenuUserpicTop: 22px;
@ -182,7 +179,7 @@ titleButtonClose: IconButton(titleButtonMinimize) {
topBarHeight: 54px; topBarHeight: 54px;
topBarMenuPosition: point(-2px, 35px); topBarMenuPosition: point(-2px, 35px);
topBarDuration: 200; topBarDuration: 200;
topBarBackward: icon {{ "title_back", #a3a3a3 }}; topBarBackward: icon {{ "title_back", menuIconFg }};
topBarForwardAlpha: 0.6; topBarForwardAlpha: 0.6;
topBarBack: icon {{ "title_back", lightButtonFg }}; topBarBack: icon {{ "title_back", lightButtonFg }};
topBarArrowPadding: margins(39px, 8px, 17px, 8px); topBarArrowPadding: margins(39px, 8px, 17px, 8px);

View File

@ -44,7 +44,7 @@ void SlideAnimation::paintContents(Painter &p, const QRect &update) const {
if (_topBarShadowEnabled) { if (_topBarShadowEnabled) {
p.setOpacity(1); p.setOpacity(1);
p.fillRect(0, st::topBarHeight, _cacheOver.width() / retina, st::lineWidth, st::shadowColor); p.fillRect(0, st::topBarHeight, _cacheOver.width() / retina, st::lineWidth, st::shadowFg);
} }
} }

View File

@ -328,13 +328,20 @@ QImage prepareBackgroundImage(QImage &&image) {
return std_::move(image); return std_::move(image);
} }
void initColor(const style::color &color, float64 hue, float64 saturation) {
auto original = color->c;
original.setHslF(hue, saturation, original.lightnessF(), original.alphaF());
color.set(original.red(), original.green(), original.blue(), original.alpha());
}
void initColorsFromBackground(const QImage &img) { void initColorsFromBackground(const QImage &img) {
uint64 components[3] = { 0 }, componentsScroll[3] = { 0 }; uint64 components[3] = { 0 };
uint64 componentsScroll[3] = { 0 };
auto w = img.width(); auto w = img.width();
auto h = img.height(); auto h = img.height();
auto size = w * h; auto size = w * h;
if (auto pix = img.constBits()) { if (auto pix = img.constBits()) {
for (int i = 0, l = size * 4; i != l; i += 4) { for (auto i = 0, l = size * 4; i != l; i += 4) {
components[2] += pix[i + 0]; components[2] += pix[i + 0];
components[1] += pix[i + 1]; components[1] += pix[i + 1];
components[0] += pix[i + 2]; components[0] += pix[i + 2];
@ -342,74 +349,20 @@ void initColorsFromBackground(const QImage &img) {
} }
if (size) { if (size) {
for (int i = 0; i != 3; ++i) { for (auto i = 0; i != 3; ++i) {
components[i] /= size; components[i] /= size;
} }
} }
int maxtomin[3] = { 0, 1, 2 };
if (components[maxtomin[0]] < components[maxtomin[1]]) {
qSwap(maxtomin[0], maxtomin[1]);
}
if (components[maxtomin[1]] < components[maxtomin[2]]) {
qSwap(maxtomin[1], maxtomin[2]);
if (components[maxtomin[0]] < components[maxtomin[1]]) {
qSwap(maxtomin[0], maxtomin[1]);
}
}
uint64 max = qMax(1ULL, components[maxtomin[0]]), mid = qMax(1ULL, components[maxtomin[1]]), min = qMax(1ULL, components[maxtomin[2]]); auto bgColor = QColor(components[0], components[1], components[2]);
auto hue = bgColor.hslHueF();
memcpy(componentsScroll, components, sizeof(components)); auto saturation = bgColor.hslSaturationF();
initColor(st::msgServiceBg, hue, saturation);
if (max != min) { initColor(st::msgServiceBgSelected, hue, saturation);
if (min > uint64(qRound(0.77 * max))) { initColor(st::historyScroll.bg, hue, saturation);
uint64 newmin = qRound(0.77 * max); // min saturation 23% initColor(st::historyScroll.bgOver, hue, saturation);
uint64 newmid = max - ((max - mid) * (max - newmin)) / (max - min); initColor(st::historyScroll.barBg, hue, saturation);
components[maxtomin[1]] = newmid; initColor(st::historyScroll.barBgOver, hue, saturation);
components[maxtomin[2]] = newmin;
}
uint64 newmin = qRound(0.77 * max); // saturation 23% for scroll
uint64 newmid = max - ((max - mid) * (max - newmin)) / (max - min);
componentsScroll[maxtomin[1]] = newmid;
componentsScroll[maxtomin[2]] = newmin;
}
float64 luminance = 0.299 * componentsScroll[0] + 0.587 * componentsScroll[1] + 0.114 * componentsScroll[2];
uint64 maxScroll = max;
if (luminance < 0.5 * 0xFF) {
maxScroll += qRound(0.2 * 0xFF);
} else {
maxScroll -= qRound(0.2 * 0xFF);
}
componentsScroll[maxtomin[2]] = qMin(uint64(float64(componentsScroll[maxtomin[2]]) * maxScroll / float64(componentsScroll[maxtomin[0]])), 0xFFULL);
componentsScroll[maxtomin[1]] = qMin(uint64(float64(componentsScroll[maxtomin[1]]) * maxScroll / float64(componentsScroll[maxtomin[0]])), 0xFFULL);
componentsScroll[maxtomin[0]] = qMin(maxScroll, 0xFFULL);
if (max > uint64(qRound(0.2 * 0xFF))) { // brightness greater than 20%
max -= qRound(0.2 * 0xFF);
} else {
max = 0;
}
components[maxtomin[2]] = uint64(float64(components[maxtomin[2]]) * max / float64(components[maxtomin[0]]));
components[maxtomin[1]] = uint64(float64(components[maxtomin[1]]) * max / float64(components[maxtomin[0]]));
components[maxtomin[0]] = max;
uchar r = uchar(components[0]);
uchar g = uchar(components[1]);
uchar b = uchar(components[2]);
st::msgServiceBg.set(r, g, b, st::msgServiceBg->c.alpha());
float64 alphaSel = st::msgServiceSelectBg->c.alphaF(), addSel = (1. - ((1. - alphaSel) / (1. - st::msgServiceBg->c.alphaF()))) * 0xFF;
uchar rsel = snap(qRound(((1. - alphaSel) * r + addSel) / alphaSel), 0, 0xFF);
uchar gsel = snap(qRound(((1. - alphaSel) * g + addSel) / alphaSel), 0, 0xFF);
uchar bsel = snap(qRound(((1. - alphaSel) * b + addSel) / alphaSel), 0, 0xFF);
st::msgServiceSelectBg.set(r, g, b, qRound(alphaSel * 0xFF));
uchar rScroll = uchar(componentsScroll[0]), gScroll = uchar(componentsScroll[1]), bScroll = uchar(componentsScroll[2]);
st::historyScroll.barColor.set(rScroll, gScroll, bScroll, st::historyScroll.barColor->c.alpha());
st::historyScroll.bgColor.set(rScroll, gScroll, bScroll, st::historyScroll.bgColor->c.alpha());
st::historyScroll.barOverColor.set(rScroll, gScroll, bScroll, st::historyScroll.barOverColor->c.alpha());
st::historyScroll.bgOverColor.set(rScroll, gScroll, bScroll, st::historyScroll.bgOverColor->c.alpha());
} }
} // namespace } // namespace
@ -461,7 +414,9 @@ void ChatBackground::setImage(int32 id, QImage &&image) {
} }
void ChatBackground::setPreparedImage(QImage &&image) { void ChatBackground::setPreparedImage(QImage &&image) {
if (_id != kThemeBackground && _id != internal::kTestingThemeBackground) {
initColorsFromBackground(image); initColorsFromBackground(image);
}
_image = App::pixmapFromImageInPlace(std_::move(image)); _image = App::pixmapFromImageInPlace(std_::move(image));
} }

View File

@ -3,4 +3,4 @@ AppVersionStrMajor 0.10
AppVersionStrSmall 0.10.20 AppVersionStrSmall 0.10.20
AppVersionStr 0.10.20 AppVersionStr 0.10.20
AlphaChannel 0 AlphaChannel 0
BetaVersion 10020002 BetaVersion 10020003