tdesktop/Telegram/Resources/basic.style

336 lines
8.6 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-2016 John Preston, https://desktop.telegram.org
*/
using "colors.palette";
using "basic_types.style";
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;
defaultTooltip: Tooltip {
textBg: tooltipBg;
textFg: tooltipFg;
textFont: normalFont;
textBorder: tooltipBorderFg;
textPadding: margins(5px, 2px, 5px, 2px);
shift: point(-20px, 20px);
skip: 10px;
widthMax: 800px;
linesMax: 12;
}
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;
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;
defaultTextStyle: TextStyle {
linkFlags: font(fsize);
linkFlagsOver: font(fsize underline);
linkFg: windowActiveTextFg;
linkFgDown: windowActiveTextFg;
monoFg: windowSubTextFg;
selectBg: msgInBgSelected;
selectOverlay: msgSelectOverlay;
lineHeight: 0px;
}
serviceTextStyle: TextStyle(defaultTextStyle) {
linkFlags: msgServiceFont;
linkFlagsOver: font(fsize semibold underline);
linkFg: msgServiceFg;
linkFgDown: msgServiceFg;
monoFg: msgServiceFg;
selectBg: msgServiceBgSelected;
selectOverlay: msgServiceBgSelected;
}
inTextStyle: TextStyle(defaultTextStyle) {
monoFg: msgInMonoFg;
selectBg: msgInBgSelected;
selectOverlay: msgSelectOverlay;
}
outTextStyle: TextStyle(defaultTextStyle) {
monoFg: msgOutMonoFg;
selectBg: msgOutBgSelected;
selectOverlay: msgSelectOverlay;
}
inFwdTextStyle: TextStyle(defaultTextStyle) {
linkFlags: semiboldFont;
linkFlagsOver: semiboldFont;
linkFg: msgInServiceFg;
linkFgDown: msgInServiceFg;
}
outFwdTextStyle: TextStyle(inFwdTextStyle) {
linkFg: msgOutServiceFg;
linkFgDown: msgOutServiceFg;
}
inFwdTextStyleSelected: TextStyle(inFwdTextStyle) {
linkFg: msgInServiceFgSelected;
linkFgDown: msgInServiceFgSelected;
}
outFwdTextStyleSelected: TextStyle(inFwdTextStyle) {
linkFg: msgOutServiceFgSelected;
linkFgDown: msgOutServiceFgSelected;
}
mediaviewTextStyle: TextStyle(defaultTextStyle) {
linkFg: mediaviewTextLinkFg;
linkFgDown: mediaviewTextLinkFg;
}
mediaPadding: margins(0px, 0px, 0px, 0px);
mediaCaptionSkip: 5px;
mediaInBubbleSkip: 5px;
mediaThumbSize: 48px;
mediaNameTop: 3px;
mediaDetailsShift: 3px;
mediaUnreadSize: 7px;
mediaUnreadSkip: 5px;
mediaUnreadTop: 6px;
mediaInStyle: TextStyle(defaultTextStyle) {
linkFg: mediaInFg;
linkFgDown: mediaInFg;
}
mediaInStyleSelected: TextStyle(defaultTextStyle) {
linkFg: mediaInFgSelected;
linkFgDown: mediaInFgSelected;
}
msgFileMenuSize: size(36px, 36px);
msgFileSize: 44px;
msgFilePadding: margins(14px, 12px, 11px, 12px);
msgFileThumbSize: 72px;
msgFileThumbPadding: margins(10px, 10px, 14px, 10px);
msgFileThumbNameTop: 12px;
msgFileThumbStatusTop: 32px;
msgFileThumbLinkTop: 60px;
msgFileNameTop: 16px;
msgFileStatusTop: 37px;
msgFileMinWidth: 294px;
msgFileOverDuration: 200;
msgFileRadialLine: 3px;
msgVideoSize: size(320px, 240px);
msgWaveformBar: 2px;
msgWaveformSkip: 1px;
msgWaveformMin: 2px;
msgWaveformMax: 20px;
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;
mvThickFont: semiboldFont;
mvFont: normalFont;
mvTextLeft: 16px;
mvTextSkip: 10px;
mvHeaderTop: 48px;
mvTextTop: 24px;
mvTextOpacity: 0.5;
mvTextOverOpacity: 1;
mvIconOpacity: 0.45;
mvIconOverOpacity: 1;
mvControlBgOpacity: 0.3;
mvControlMargin: 0px;
mvControlSize: 90px;
mvIconSize: size(60px, 56px);
mvWaitHide: 2000;
mvHideDuration: 1000;
mvShowDuration: 200;
mvFadeDuration: 150;
mvDeltaFromLastAction: 5px;
mvSwipeDistance: 80px;
mvCaptionPadding: margins(18px, 10px, 18px, 10px);
mvCaptionMargin: size(11px, 11px);
mvCaptionRadius: 2px;
mvCaptionFont: font(fsize);
medviewSaveMsgCheck: icon {{ "mediaview_save_check", mediaviewSaveMsgFg }};
medviewSaveMsgFont: font(16px);
medviewSaveMsgPadding: margins(55px, 19px, 29px, 20px);
medviewSaveMsgCheckPos: point(23px, 21px);
medviewSaveMsgShowing: 200;
medviewSaveMsgShown: 2000;
medviewSaveMsgHiding: 2500;
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;
2016-10-31 12:29:26 +00:00
webPageTitleOutFg: historyTextOutFg;
webPageTitleInFg: historyTextInFg;
webPageDescriptionOutFg: historyTextOutFg;
webPageDescriptionInFg: historyTextInFg;
webPageDescriptionFont: normalFont;
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;
toastFont: normalFont;
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 }};
boxSearchCancelIcon: icon {{ "box_button_close", boxSearchCancelIconFg }};
boxSearchCancelIconOver: icon {{ "box_button_close", boxSearchCancelIconFgOver }};
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 }};