tdesktop/Telegram/Resources/basic.style

305 lines
8.0 KiB
Plaintext
Raw Normal View History

/*
This file is part of Telegram Desktop,
the official desktop version of Telegram messaging app, see https://telegram.org
Telegram Desktop is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
It is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
In addition, as a special exception, the copyright holders give permission
to link the code of portions of this program with the OpenSSL library.
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/
using "colors.palette";
TextPalette {
linkFg: color;
monoFg: color;
selectBg: color;
selectFg: color;
selectLinkFg: color;
selectMonoFg: color;
selectOverlay: color;
}
TextStyle {
font: font;
linkFont: font;
linkFontOver: font;
lineHeight: pixels;
}
semibold: "Open Sans Semibold";
fsize: 13px;
normalFont: font(fsize);
semiboldFont: font(fsize semibold);
boxFontSize: 14px;
boxTextFont: font(boxFontSize);
emojiImgSize: 18px; // exceptional value for retina
emojiSize: 18px;
emojiPadding: 1px;
lineWidth: 1px;
defaultTextPalette: TextPalette {
linkFg: windowActiveTextFg;
monoFg: windowSubTextFg;
selectBg: msgInBgSelected;
selectFg: transparent; // use painter current pen instead
selectLinkFg: historyLinkInFgSelected;
selectMonoFg: msgInMonoFgSelected;
selectOverlay: msgSelectOverlay;
}
defaultTextStyle: TextStyle {
font: normalFont;
linkFont: normalFont;
linkFontOver: font(fsize underline);
lineHeight: 0px;
}
semiboldTextStyle: TextStyle(defaultTextStyle) {
font: semiboldFont;
linkFont: semiboldFont;
linkFontOver: font(fsize semibold underline);
}
shadowToggleDuration: 200;
2016-10-26 12:24:21 +00:00
slideDuration: 240;
slideShift: 100px;
slideShadow: icon {{ "slide_shadow", slideFadeOutShadowFg }};
linkCropLimit: 360px;
linkFont: normalFont;
linkOverFont: font(fsize underline);
dateRadius: 6px;
buttonRadius: 3px;
setLittleSkip: 9px;
noContactsHeight: 100px;
noContactsFont: font(fsize);
noContactsColor: windowSubTextFg;
activeFadeInDuration: 500;
activeFadeOutDuration: 3000;
msgMaxWidth: 430px;
msgFont: font(fsize);
msgNameFont: semiboldFont;
msgNameStyle: semiboldTextStyle;
msgServiceFont: semiboldFont;
msgServiceNameFont: semiboldFont;
msgServicePhotoWidth: 100px;
msgDateFont: font(13px);
msgMinWidth: 190px;
msgPhotoSize: 33px;
msgPhotoSkip: 40px;
msgPadding: margins(13px, 7px, 13px, 8px);
msgMargin: margins(16px, 6px, 56px, 2px);
msgMarginTopAttached: 1px;
msgLnkPadding: 2px; // for media open / save links
msgShadow: 2px;
msgReplyPadding: margins(6px, 6px, 11px, 6px);
msgReplyBarPos: point(1px, 0px);
msgReplyBarSize: size(2px, 36px);
msgReplyBarSkip: 10px;
msgServicePadding: margins(12px, 3px, 12px, 4px);
msgServiceMargin: margins(10px, 10px, 80px, 2px);
msgDateSpace: 12px;
msgDateDelta: point(2px, 5px);
msgDateImgDelta: 4px;
msgDateImgPadding: point(8px, 2px);
msgDateImgCheckSpace: 4px;
messageTextStyle: defaultTextStyle;
msgDateTextStyle: defaultTextStyle;
serviceTextPalette: TextPalette(defaultTextPalette) {
linkFg: msgServiceFg;
monoFg: msgServiceFg;
selectBg: msgServiceBgSelected;
selectFg: msgServiceFg;
selectLinkFg: msgServiceFg;
selectMonoFg: msgServiceFg;
selectOverlay: msgServiceBgSelected;
}
serviceTextStyle: TextStyle(defaultTextStyle) {
font: msgServiceFont;
linkFont: msgServiceFont;
linkFontOver: font(fsize semibold underline);
}
inTextPalette: TextPalette(defaultTextPalette) {
linkFg: historyLinkInFg;
monoFg: msgInMonoFg;
selectBg: msgInBgSelected;
selectFg: historyTextInFgSelected;
selectLinkFg: historyLinkInFgSelected;
selectMonoFg: msgInMonoFgSelected;
selectOverlay: msgSelectOverlay;
}
inTextPaletteSelected: TextPalette(inTextPalette) {
linkFg: historyLinkInFgSelected;
monoFg: msgInMonoFgSelected;
}
outTextPalette: TextPalette(defaultTextPalette) {
linkFg: historyLinkOutFg;
monoFg: msgOutMonoFg;
selectBg: msgOutBgSelected;
selectFg: historyTextOutFgSelected;
selectLinkFg: historyLinkOutFgSelected;
selectMonoFg: msgOutMonoFgSelected;
selectOverlay: msgSelectOverlay;
}
outTextPaletteSelected: TextPalette(outTextPalette) {
linkFg: historyLinkOutFgSelected;
monoFg: msgOutMonoFgSelected;
}
fwdTextStyle: TextStyle(semiboldTextStyle) {
linkFontOver: semiboldFont;
}
inFwdTextPalette: TextPalette(defaultTextPalette) {
linkFg: msgInServiceFg;
}
outFwdTextPalette: TextPalette(defaultTextPalette) {
linkFg: msgOutServiceFg;
}
inFwdTextPaletteSelected: TextPalette(defaultTextPalette) {
linkFg: msgInServiceFgSelected;
}
outFwdTextPaletteSelected: TextPalette(defaultTextPalette) {
linkFg: msgOutServiceFgSelected;
}
mediaPadding: margins(0px, 0px, 0px, 0px);
mediaCaptionSkip: 5px;
mediaInBubbleSkip: 5px;
mediaThumbSize: 48px;
mediaNameTop: 3px;
mediaDetailsShift: 3px;
mediaUnreadSize: 7px;
mediaUnreadSkip: 5px;
mediaUnreadTop: 6px;
mediaInPalette: TextPalette(defaultTextPalette) {
linkFg: mediaInFg;
}
mediaInPaletteSelected: TextPalette(defaultTextPalette) {
linkFg: mediaInFgSelected;
}
textRectMargins: margins(-2px, -1px, -2px, -1px);
searchedBarHeight: 32px;
searchedBarFont: normalFont;
searchedBarPosition: point(17px, 7px);
smallCloseIcon: icon {{ "simple_close", smallCloseIconFg }};
smallCloseIconOver: icon {{ "simple_close", smallCloseIconFgOver }};
dialogsForwardCancelIcon: icon {{ "simple_close", dialogsForwardFg }};
emojiTextFont: font(15px);
emojiReplaceWidth: 52px;
emojiReplaceHeight: 56px;
emojiReplaceInnerHeight: 42px;
emojiReplacePadding: 14px;
connectingPadding: margins(5px, 5px, 5px, 5px);
dragFont: font(28px semibold);
dragSubfont: font(20px semibold);
dragColor: windowSubTextFg;
dragDropColor: windowActiveTextFg;
dragMargin: margins(0px, 10px, 0px, 10px);
dragPadding: margins(20px, 10px, 20px, 10px);
dragHeight: 72px;
minPhotoSize: 100px;
maxMediaSize: 420px;
maxStickerSize: 256px;
maxGifSize: 320px;
maxSignatureSize: 144px;
radialSize: size(50px, 50px);
radialLine: 3px;
radialDuration: 350;
radialPeriod: 3000;
youtubeIcon: icon {
{ "media_youtube_play_bg", youtubePlayIconBg },
{ "media_youtube_play", youtubePlayIconFg, point(24px, 12px) },
};
videoIcon: icon {
{ "media_video_play_bg", videoPlayIconBg },
{ "media_video_play", videoPlayIconFg, point(12px, 12px) },
};
locationSize: size(320px, 240px);
webPageLeft: 10px;
webPageBar: 2px;
webPageTitleFont: semiboldFont;
webPageTitleStyle: semiboldTextStyle;
2016-10-31 12:29:26 +00:00
webPageTitleOutFg: historyTextOutFg;
webPageTitleInFg: historyTextInFg;
webPageDescriptionOutFg: historyTextOutFg;
webPageDescriptionInFg: historyTextInFg;
webPageDescriptionFont: normalFont;
webPageDescriptionStyle: defaultTextStyle;
webPagePhotoSize: 100px;
webPagePhotoDelta: 8px;
mediaPlayerSuppressDuration: 150;
botDescSkip: 8px;
suppressAll: 0.2;
suppressSong: 0.05;
inlineResultsLeft: 11px;
inlineResultsSkip: 3px;
inlineMediaHeight: 96px;
inlineThumbSize: 64px;
inlineThumbSkip: 10px;
inlineTitleFg: windowFg;
inlineDescriptionFg: windowSubTextFg;
inlineRowMargin: 6px;
inlineRowBorder: 1px;
inlineRowBorderFg: shadowFg;
inlineRowFileNameTop: 2px;
inlineRowFileDescriptionTop: 23px;
inlineResultsMinWidth: 64px;
inlineDurationMargin: 3px;
toastTextStyle: defaultTextStyle;
toastMaxWidth: 480px;
toastMinMargin: 13px;
toastPadding: margins(19px, 13px, 19px, 12px);
toastFadeInDuration: 200;
toastFadeOutDuration: 1000;
historyReplyCancelIcon: icon {{ "box_button_close", historyReplyCancelFg }};
historyReplyCancelIconOver: icon {{ "box_button_close", historyReplyCancelFgOver }};
boxTitleCloseIcon: icon {{ "box_button_close", boxTitleCloseFg }};
boxTitleCloseIconOver: icon {{ "box_button_close", boxTitleCloseFgOver }};
notifyFadeRight: icon {{ "fade_horizontal", notificationBg }};
stickerIconLeft: icon {{ "fade_horizontal-flip_horizontal", emojiPanCategories }};
stickerIconRight: icon {{ "fade_horizontal", emojiPanCategories }};
transparentPlaceholderSize: 4px;