tdesktop/Telegram/SourceFiles/chat_helpers/chat_helpers.style

426 lines
12 KiB
Plaintext
Raw Normal View History

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
2019-09-17 16:13:12 +00:00
using "ui/basic.style";
using "boxes/boxes.style";
2023-01-23 18:56:25 +00:00
using "ui/layers/layers.style";
2016-10-27 14:10:28 +00:00
using "ui/widgets/widgets.style";
2023-01-20 16:44:08 +00:00
TabbedSearch {
outer: color;
bg: color;
fg: color;
fgActive: color;
fadeLeft: icon;
fadeRight: icon;
field: InputField;
search: IconButton;
back: IconButton;
cancel: CrossButton;
defaultFieldWidth: pixels;
groupWidth: pixels;
groupSkip: pixels;
2023-01-20 16:44:08 +00:00
height: pixels;
}
EmojiPan {
margin: margins;
padding: margins;
desiredSize: pixels;
verticalSizeSub: pixels;
header: pixels;
headerLeft: pixels;
headerLockLeft: pixels;
headerLockedLeft: pixels;
headerTop: pixels;
footer: pixels;
iconSkip: pixels;
iconWidth: pixels;
iconArea: pixels;
bg: color;
overBg: color;
2023-01-23 18:56:25 +00:00
categoriesBg: color;
fadeLeft: icon;
fadeRight: icon;
2023-01-20 16:44:08 +00:00
search: TabbedSearch;
searchMargin: margins;
}
switchPmButton: RoundButton(defaultBoxButton) {
width: 320px;
height: 34px;
textTop: 7px;
}
stickersRestrictedLabel: FlatLabel(defaultFlatLabel) {
minWidth: 200px;
align: align(center);
textFg: noContactsColor;
}
2018-03-02 17:17:33 +00:00
stickersTrendingHeader: 56px;
stickersTrendingSkip: 4px;
2016-10-27 14:10:28 +00:00
stickersTrendingHeaderFont: semiboldFont;
stickersTrendingHeaderFg: windowFg;
2018-03-02 17:17:33 +00:00
stickersTrendingHeaderTop: 11px;
2016-10-27 14:10:28 +00:00
stickersTrendingSubheaderFont: normalFont;
stickersTrendingSubheaderFg: windowSubTextFg;
2018-03-02 17:17:33 +00:00
stickersTrendingSubheaderTop: 31px;
emojiPanButtonRight: 7px;
2023-01-24 05:32:27 +00:00
emojiPanButtonTop: 0px;
emojiPanButton: RoundButton(defaultActiveButton) {
width: -24px;
height: 23px;
textTop: 2px;
}
emojiPanExpand: RoundButton(defaultActiveButton) {
font: font(12px bold);
width: -8px;
height: 19px;
textTop: 1px;
}
2018-03-02 17:17:33 +00:00
stickersTrendingAddTop: 14px;
2016-10-27 14:10:28 +00:00
stickersTrendingAdd: RoundButton(defaultActiveButton) {
2016-11-22 09:48:13 +00:00
width: -16px;
height: 26px;
textTop: 4px;
}
2016-11-22 09:48:13 +00:00
stickersRemove: IconButton(defaultIconButton) {
width: 40px;
height: 40px;
2022-02-25 13:11:49 +00:00
icon: icon {{ "info/info_media_delete", menuIconFg }};
iconOver: icon {{ "info/info_media_delete", menuIconFgOver }};
2016-11-22 09:48:13 +00:00
rippleAreaSize: 40px;
rippleAreaPosition: point(0px, 0px);
ripple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
}
stickersUndoRemove: RoundButton(defaultLightButton) {
width: -16px;
height: 26px;
textTop: 4px;
}
stickersRemoveSkip: 4px;
stickersReorderIcon: icon {{ "stickers_reorder", menuIconFg }};
stickersReorderSkip: 13px;
stickersTabs: defaultTabsSlider;
2016-11-22 09:48:13 +00:00
stickerEmojiSkip: 5px;
2016-11-22 09:48:13 +00:00
stickersFeaturedBadgeFont: font(12px bold);
stickersFeaturedBadgeSize: 15px;
stickersFeaturedBadgeTextTop: -1px;
stickersFeaturedBadgePadding: 4px;
stickersFeaturedBadgeSkip: 4px;
stickersFeaturedBadgeTop: 9px;
stickersFeaturedPen: lightButtonFg;
stickersFeaturedUnreadBg: msgFileInBg;
stickersFeaturedUnreadSize: 5px;
stickersFeaturedUnreadSkip: 5px;
stickersFeaturedUnreadTop: 7px;
stickersFeaturedInstalled: icon {{ "chat/input_save", lightButtonFg }};
2016-10-27 14:10:28 +00:00
stickersMaxHeight: 320px;
stickersPadding: margins(19px, 13px, 19px, 13px);
2016-10-27 14:10:28 +00:00
stickersSize: size(64px, 64px);
2022-07-22 11:39:28 +00:00
emojiSetPadding: margins(12px, 0px, 12px, 0px);
emojiSetMaxHeight: 197px;
emojiSetSize: size(42px, 39px);
stickersScroll: ScrollArea(boxScroll) {
deltat: 19px;
2016-10-27 14:10:28 +00:00
deltab: 9px;
}
stickersReorderPadding: margins(0px, 12px, 0px, 12px);
stickersReorderFg: windowSubTextFg;
2016-10-27 14:10:28 +00:00
stickersRowDisabledOpacity: 0.4;
stickersRowDuration: 200;
2022-02-25 13:11:49 +00:00
stickersSettings: icon {{ "emoji/emoji_settings", emojiIconFg }};
stickersTrending: icon {{ "emoji/stickers_add", emojiIconFg }};
stickersTrendingUnread: icon {
2022-02-25 13:11:49 +00:00
{ "emoji/stickers_add_unread", emojiIconFg },
{ "emoji/stickers_add_dot", dialogsUnreadBg }
};
2022-05-19 13:25:59 +00:00
stickersRecent: icon {{ "emoji/emoji_recent", emojiIconFg }};
2023-01-20 16:44:08 +00:00
emojiStatusDefault: icon {{ "emoji/stickers_premium", emojiIconFg }};
2016-10-27 14:10:28 +00:00
stickersSettingsUnreadSize: 6px;
stickersSettingsUnreadPosition: point(6px, 10px);
2016-10-27 14:10:28 +00:00
2020-03-10 12:41:12 +00:00
filtersRemove: IconButton(stickersRemove) {
ripple: defaultRippleAnimation;
}
emojiPanMargins: margins(10px, 10px, 10px, 10px);
emojiTabs: SettingsSlider(defaultTabsSlider) {
2023-01-23 18:56:25 +00:00
height: 43px;
barTop: 40px;
labelTop: 12px;
}
2022-02-25 13:11:49 +00:00
emojiRecent: icon {{ "emoji/emoji_recent", emojiIconFg }};
2022-07-26 10:20:18 +00:00
emojiRecentActive: icon {{ "emoji/emoji_recent", emojiSubIconFgActive }};
2023-01-20 16:44:08 +00:00
emojiPeople: icon {{ "emoji/emoji_smile", emojiIconFg }};
emojiPeopleActive: icon {{ "emoji/emoji_smile", emojiSubIconFgActive }};
2022-02-25 13:11:49 +00:00
emojiNature: icon {{ "emoji/emoji_nature", emojiIconFg }};
2022-07-26 10:20:18 +00:00
emojiNatureActive: icon {{ "emoji/emoji_nature", emojiSubIconFgActive }};
2022-02-25 13:11:49 +00:00
emojiFood: icon {{ "emoji/emoji_food", emojiIconFg }};
2022-07-26 10:20:18 +00:00
emojiFoodActive: icon {{ "emoji/emoji_food", emojiSubIconFgActive }};
2023-01-20 16:44:08 +00:00
emojiActivity: icon {{ "emoji/emoji_activities", emojiIconFg }};
emojiActivityActive: icon {{ "emoji/emoji_activities", emojiSubIconFgActive }};
2022-02-25 13:11:49 +00:00
emojiTravel: icon {{ "emoji/emoji_travel", emojiIconFg }};
2022-07-26 10:20:18 +00:00
emojiTravelActive: icon {{ "emoji/emoji_travel", emojiSubIconFgActive }};
2022-02-25 13:11:49 +00:00
emojiObjects: icon {{ "emoji/emoji_objects", emojiIconFg }};
2022-07-26 10:20:18 +00:00
emojiObjectsActive: icon {{ "emoji/emoji_objects", emojiSubIconFgActive }};
2023-01-20 16:44:08 +00:00
emojiSymbols: icon {{ "emoji/emoji_love", emojiIconFg }};
emojiSymbolsActive: icon {{ "emoji/emoji_love", emojiSubIconFgActive }};
2016-10-27 14:10:28 +00:00
emojiCategoryIconTop: 6px;
emojiPanAnimation: PanelAnimation(defaultPanelAnimation) {
fadeBg: emojiPanBg;
2023-01-23 18:56:25 +00:00
shadow: boxRoundShadow;
}
2016-10-27 14:10:28 +00:00
emojiPanPadding: 12px;
emojiPanWidth: 345px;
emojiPanMinHeight: 278px;
emojiPanMaxHeight: 640px;
emojiPanHeightRatio: 0.75;
emojiPanShowDuration: 200;
emojiPanDuration: 200;
emojiPanHover: windowBgOver;
emojiPanSlideDuration: 200;
2022-07-21 17:09:30 +00:00
emojiPanArea: size(34px, 32px);
emojiPanLeft: 13px;
emojiPanRight: 17px;
emojiPanRadius: 8px;
2016-10-27 14:10:28 +00:00
2023-01-20 16:44:08 +00:00
defaultTabbedSearch: TabbedSearch {
outer: emojiPanBg;
bg: emojiPanCategories;
fg: emojiIconFg;
fgActive: emojiSubIconFgActive;
fadeLeft: icon {{ "fade_horizontal-flip_horizontal", emojiPanCategories }};
fadeRight: icon {{ "fade_horizontal", emojiPanCategories }};
field: InputField(defaultMultiSelectSearchField) {
textMargins: margins(2px, 7px, 2px, 0px);
}
search: IconButton(defaultIconButton) {
width: 33px;
height: 33px;
icon: icon{{ "emoji/emoji_search_input", emojiIconFg }};
iconOver: icon{{ "emoji/emoji_search_input", emojiIconFg }};
2023-01-23 18:56:25 +00:00
iconPosition: point(7px, -1px);
2023-01-20 16:44:08 +00:00
ripple: emptyRippleAnimation;
}
back: IconButton(defaultIconButton) {
width: 33px;
height: 33px;
icon: icon{{ "emoji/emoji_back", menuIconFg }};
iconOver: icon{{ "emoji/emoji_back", menuIconFg }};
2023-01-23 18:56:25 +00:00
iconPosition: point(7px, -1px);
2023-01-20 16:44:08 +00:00
ripple: emptyRippleAnimation;
}
cancel: CrossButton {
width: 33px;
height: 33px;
cross: CrossAnimation {
size: 27px;
skip: 8px;
stroke: 1.;
minScale: 0.3;
}
crossFg: menuIconFg;
crossFgOver: menuIconFg;
crossPosition: point(1px, 3px);
duration: 150;
loadingPeriod: 1000;
ripple: emptyRippleAnimation;
}
defaultFieldWidth: 103px;
2023-01-20 16:44:08 +00:00
groupWidth: 30px;
groupSkip: 2px;
2023-01-20 16:44:08 +00:00
height: 33px;
}
defaultEmojiPan: EmojiPan {
2023-01-23 18:56:25 +00:00
margin: margins(7px, 0px, 7px, 0px);
padding: margins(7px, 0px, 4px, 7px);
desiredSize: 37px;
verticalSizeSub: 1px;
header: 25px;
headerLeft: 14px;
headerLockLeft: 7px;
headerLockedLeft: 26px;
headerTop: 2px;
footer: 36px;
iconSkip: 3px;
iconWidth: 30px;
iconArea: 28px;
bg: emojiPanBg;
overBg: emojiPanHover;
2023-01-23 18:56:25 +00:00
categoriesBg: emojiPanCategories;
fadeLeft: icon {{ "fade_horizontal-flip_horizontal", emojiPanCategories }};
fadeRight: icon {{ "fade_horizontal", emojiPanCategories }};
2023-01-20 16:44:08 +00:00
search: defaultTabbedSearch;
2023-01-23 18:56:25 +00:00
searchMargin: margins(1px, 11px, 2px, 5px);
}
2023-01-24 16:44:25 +00:00
statusEmojiPan: EmojiPan(defaultEmojiPan) {
categoriesBg: windowBg;
fadeLeft: icon {{ "fade_horizontal-flip_horizontal", windowBg }};
fadeRight: icon {{ "fade_horizontal", windowBg }};
}
inlineResultsMinHeight: 278px;
inlineResultsMaxHeight: 640px;
2016-10-27 14:10:28 +00:00
emojiPanHeaderFont: semiboldFont;
2022-07-21 17:09:30 +00:00
emojiPanRemoveSkip: 10px;
2023-01-24 05:32:27 +00:00
emojiPanRemoveTop: 2px;
2016-10-27 14:10:28 +00:00
emojiColorsPadding: 5px;
emojiColorsSep: 1px;
emojiColorsSepColor: shadowFg;
2016-10-27 14:10:28 +00:00
2022-07-15 08:09:50 +00:00
emojiIconSelectSkip: 3px;
2022-07-15 11:21:42 +00:00
emojiPremiumRequired: icon{{ "emoji/premium_lock", windowSubTextFg }};
2022-07-12 16:10:40 +00:00
hashtagClose: IconButton {
width: 30px;
height: 30px;
icon: smallCloseIcon;
iconOver: smallCloseIconOver;
iconPosition: point(10px, 10px);
rippleAreaPosition: point(5px, 5px);
rippleAreaSize: 20px;
ripple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
}
stickerPanWidthMin: 64px;
stickerPanSize: size(stickerPanWidthMin, stickerPanWidthMin);
stickerPanPadding: 11px;
2022-02-25 13:11:49 +00:00
stickerPanDeleteIconBg: icon {{ "emoji/emoji_delete_bg", stickerPanDeleteBg }};
stickerPanDeleteIconFg: icon {{ "emoji/emoji_delete", stickerPanDeleteFg }};
stickerPanDeleteOpacityBg: 0.3;
stickerPanDeleteOpacityBgOver: 0.5;
stickerPanDeleteOpacityFg: 0.8;
stickerPanDeleteOpacityFgOver: 1.;
2023-01-24 05:32:27 +00:00
stickerPanRemoveSet: IconButton(hashtagClose) {
width: 20px;
height: 20px;
iconPosition: point(-1px, -1px);
rippleAreaPosition: point(0px, 0px);
}
stickerIconMove: 400;
stickerPreviewDuration: 150;
stickerPreviewMin: 0.1;
stickerGroupCategorySize: 28px;
stickerGroupCategoryAbout: defaultTextStyle;
stickerGroupCategoryAddMargin: margins(0px, 10px, 0px, 5px);
stickerGroupCategoryAdd: stickersTrendingAdd;
2020-04-29 14:52:40 +00:00
stickersToast: Toast(defaultToast) {
minWidth: 340px;
maxWidth: 340px;
padding: margins(16px, 13px, 16px, 12px);
}
2018-03-02 17:17:33 +00:00
stickersEmpty: icon {{ "stickers_empty", windowSubTextFg }};
inlineBotsScroll: ScrollArea(defaultSolidScroll) {
deltat: stickerPanPadding;
deltab: stickerPanPadding;
}
2017-03-31 15:50:02 +00:00
2023-01-24 09:20:57 +00:00
gifsPadding: margins(9px, 5px, 3px, 9px);
emojiSuggestionsDropdown: InnerDropdown(defaultInnerDropdown) {
2019-03-30 10:00:31 +00:00
scrollMargin: margins(0px, emojiColorsPadding, 0px, emojiColorsPadding);
scrollPadding: margins(0px, 0px, 0px, 0px);
}
2019-03-30 10:00:31 +00:00
emojiSuggestionSize: 40px;
emojiSuggestionsScrolledWidth: 240px;
emojiSuggestionsPadding: margins(emojiColorsPadding, 0px, emojiColorsPadding, 0px);
emojiSuggestionsFadeAfter: 20px;
mentionHeight: 40px;
mentionPadding: margins(8px, 5px, 8px, 5px);
mentionTop: 11px;
mentionFont: linkFont;
mentionNameFg: windowFg;
mentionNameFgOver: windowFgOver;
mentionPhotoSize: 33px;
mentionBg: windowBg;
mentionBgOver: windowBgOver;
mentionFg: windowSubTextFg;
mentionFgOver: windowSubTextFgOver;
mentionFgActive: windowActiveTextFg;
mentionFgOverActive: windowActiveTextFg;
autocompleteSearchPadding: margins(16px, 5px, 16px, 5px);
autocompleteRowPadding: margins(16px, 5px, 16px, 5px);
autocompleteRowTitle: semiboldTextStyle;
autocompleteRowKeys: defaultTextStyle;
autocompleteRowAnswer: defaultTextStyle;
2018-12-26 14:00:08 +00:00
2019-01-02 12:11:13 +00:00
manageEmojiPreview: 22px;
manageEmojiPreviewWidth: 48px;
manageEmojiPreviewHeight: 48px;
2020-04-29 08:08:34 +00:00
manageEmojiPreviewPadding: margins(22px, 9px, 19px, 9px);
2019-01-02 12:11:13 +00:00
manageEmojiMarginRight: 21px;
manageEmojiNameTop: 3px;
manageEmojiStatusTop: 25px;
2020-10-19 15:37:59 +00:00
inlineRadialSize: 44px;
inlineFileSize: 44px;
2022-05-20 14:57:01 +00:00
stickersPremiumLock: icon{{ "emoji/premium_lock", premiumButtonFg }};
2022-08-17 18:03:57 +00:00
reactStripExtend: margins(21px, 49px, 39px, 0px);
reactStripHeight: 40px;
2022-08-18 14:31:38 +00:00
reactStripSize: 32px;
reactStripMinWidth: 60px;
reactStripImage: 26px;
2022-08-18 14:31:38 +00:00
reactStripSkip: 7px;
reactStripBubble: icon{
{ "chat/reactions_bubble_shadow", windowShadowFg },
{ "chat/reactions_bubble", windowBg },
};
reactStripBubbleRight: 20px;
2023-01-24 16:44:25 +00:00
reactPanelEmojiPan: EmojiPan(statusEmojiPan) {
margin: margins(reactStripSkip, 0px, reactStripSkip, 0px);
padding: margins(reactStripSkip, 0px, reactStripSkip, reactStripSkip);
desiredSize: reactStripSize;
verticalSizeSub: 0px;
overBg: transparent;
}
reactPanelScroll: ScrollArea(defaultSolidScroll) {
deltat: 3px;
deltab: 3px;
round: 1px;
width: 7px;
deltax: 2px;
hiding: 0;
}
2023-01-23 18:56:25 +00:00
emojiScroll: reactPanelScroll;
emojiSuggestionsFadeLeft: icon {{ "fade_horizontal-flip_horizontal", boxBg }};
emojiSuggestionsFadeRight: icon {{ "fade_horizontal", boxBg }};