tdesktop/Telegram/SourceFiles/settings/settings.style

523 lines
18 KiB
Plaintext

/*
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
*/
using "ui/basic.style";
using "ui/widgets/widgets.style";
using "info/info.style";
using "boxes/boxes.style";
settingsButton: SettingsButton(infoProfileButton) {
style: boxTextStyle;
padding: margins(60px, 10px, 22px, 10px);
iconLeft: 20px;
}
settingsButtonLight: SettingsButton(settingsButton) {
textFg: lightButtonFg;
textFgOver: lightButtonFgOver;
}
settingsButtonNoIcon: SettingsButton(settingsButton) {
padding: margins(22px, 10px, 22px, 8px);
}
settingsButtonNoIconLocked : SettingsButton(settingsButtonNoIcon) {
toggle: Toggle(infoProfileToggle) {
lockIcon: icon {{ "info/info_rights_lock", menuIconFg }};
}
toggleOver: Toggle(infoProfileToggleOver) {
lockIcon: icon {{ "info/info_rights_lock", menuIconFgOver }};
}
}
settingsButtonActive: SettingsButton(infoMainButton, settingsButton) {
}
settingsAttentionButton: SettingsButton(settingsButtonNoIcon) {
textFg: attentionButtonFg;
textFgOver: attentionButtonFgOver;
}
settingsAttentionButtonWithIcon: SettingsButton(settingsButton) {
textFg: attentionButtonFg;
textFgOver: attentionButtonFgOver;
}
settingsOptionDisabled: SettingsButton(settingsButtonNoIcon) {
textFg: windowSubTextFg;
textFgOver: windowSubTextFg;
textBg: windowBg;
textBgOver: windowBg;
toggleOver: infoProfileToggle;
}
settingsSectionSkip: 6px;
settingsButtonRightSkip: 23px;
settingsScalePadding: margins(60px, 7px, 22px, 4px);
settingsBigScalePadding: margins(21px, 7px, 21px, 4px);
settingsSlider: SettingsSlider(defaultSettingsSlider) {
barFg: windowBgOver;
labelFg: windowSubTextFg;
labelFgActive: windowActiveTextFg;
}
settingsScale: MediaSlider(defaultContinuousSlider) {
seekSize: size(15px, 15px);
}
settingsScaleLabel: FlatLabel(defaultFlatLabel) {
textFg: windowActiveTextFg;
}
settingsUpdateToggle: SettingsButton(settingsButtonNoIcon) {
height: 40px;
padding: margins(22px, 8px, 22px, 8px);
}
settingsUpdateState: FlatLabel(defaultFlatLabel) {
textFg: windowSubTextFg;
}
settingsUpdate: SettingsButton(infoMainButton, settingsButtonNoIcon) {
}
settingsUpdateStatePosition: point(22px, 29px);
settingsDividerLabelPadding: margins(22px, 8px, 22px, 16px);
settingsIconAccount: icon {{ "settings/account", settingsIconFg }};
settingsIconNotifications: icon {{ "settings/notifications", settingsIconFg }};
settingsIconChat: icon {{ "settings/chat", settingsIconFg }};
settingsIconFolders: icon {{ "settings/folders", settingsIconFg }};
settingsIconGeneral: icon {{ "settings/advanced", settingsIconFg }};
settingsIconLock: icon {{ "settings/lock", settingsIconFg }};
settingsIconLanguage: icon {{ "settings/language", settingsIconFg }};
settingsIconInterfaceScale: icon {{ "settings/interface_scale", settingsIconFg }};
settingsIconFaq: icon {{ "settings/faq", settingsIconFg }};
settingsIconCalls: icon {{ "settings/calls", settingsIconFg }};
settingsIconAskQuestion: icon {{ "settings/ask_question", settingsIconFg }};
settingsIconTips: icon {{ "settings/tips", settingsIconFg }};
settingsIconStickers: icon {{ "settings/stickers", settingsIconFg }};
settingsIconEmoji: icon {{ "settings/emoji", settingsIconFg }};
settingsIconThemes: icon {{ "settings/palette", settingsIconFg }};
settingsIconGroup: icon {{ "settings/group", settingsIconFg }};
settingsIconChannel: icon {{ "settings/channel", settingsIconFg }};
settingsIconUser: icon {{ "settings/user", settingsIconFg }};
settingsIconSavedMessages: icon {{ "settings/saved_messages", settingsIconFg }};
settingsIconKey: icon {{ "settings/key", settingsIconFg }};
settingsIconReload: icon {{ "settings/reload", settingsIconFg }};
settingsIconNight: icon {{ "settings/night", settingsIconFg }};
settingsIconSettings: icon {{ "settings/settings", settingsIconFg }};
settingsIconArchive: icon {{ "settings/archive", settingsIconFg }};
settingsIconPlus: icon {{ "settings/plus", settingsIconFg }};
settingsIconMinus: icon {{ "settings/minus", settingsIconFg }};
settingsIconTimer: icon {{ "settings/timer", settingsIconFg }};
settingsIconLaptop: icon {{ "settings/laptop", settingsIconFg }};
settingsIconArrows: icon {{ "settings/arrows", settingsIconFg }};
settingsIconOnline: icon {{ "settings/online", settingsIconFg }};
settingsIconVideoCalls: icon {{ "settings/video_calls", settingsIconFg }};
settingsIconEmail: icon {{ "settings/email", settingsIconFg }};
settingsIconForward: icon {{ "settings/forward", settingsIconFg }};
settingsIconSound: icon {{ "settings/sound", settingsIconFg }};
settingsIconDock: icon {{ "settings/dock", settingsIconFg }};
settingsIconPin: icon {{ "settings/pin", settingsIconFg }};
settingsIconDownload: icon {{ "settings/download", settingsIconFg }};
settingsIconMention: icon {{ "settings/mention", settingsIconFg }};
settingsIconTopics: icon {{ "settings/topics", settingsIconFg }};
settingsIconTTL: icon {{ "settings/ttl", settingsIconFg }};
settingsIconPhoto: icon {{ "settings/photo", settingsIconFg }};
settingsPremiumIconChannelsOff: icon {{ "settings/premium/channels_off", settingsIconFg }};
settingsPremiumIconDouble: icon {{ "settings/premium/double", settingsIconFg }};
settingsPremiumIconStatus: icon {{ "settings/premium/status", settingsIconFg }};
settingsPremiumIconLike: icon {{ "settings/premium/like", settingsIconFg }};
settingsPremiumIconPlay: icon {{ "settings/premium/play", settingsIconFg }};
settingsPremiumIconSpeed: icon {{ "settings/premium/speed", settingsIconFg }};
settingsPremiumIconStar: icon {{ "settings/premium/star", settingsIconFg }};
settingsPremiumIconVoice: icon {{ "settings/premium/voice", settingsIconFg }};
settingsPremiumIconFiles: icon {{ "settings/premium/files", settingsIconFg }};
settingsPremiumIconTranslations: icon {{ "settings/premium/translations", settingsIconFg }};
settingsTTLChatsOff: icon {{ "settings/ttl/autodelete_off", windowSubTextFg }};
settingsTTLChatsOn: icon {{ "settings/ttl/autodelete_on", windowActiveTextFg }};
settingsIconAdd: icon {{ "settings/add", windowFgActive }};
settingsIconRemove: icon {{ "settings/remove", windowFgActive }};
settingsCheckbox: Checkbox(defaultBoxCheckbox) {
textPosition: point(15px, 1px);
}
settingsCheckboxPadding: margins(22px, 10px, 10px, 10px);
settingsLink: boxLinkButton;
settingsCheckboxesSkip: 12px;
settingsSendType: settingsCheckbox;
settingsSendTypePadding: margins(22px, 5px, 10px, 5px);
settingsSendTypeSkip: 5px;
settingsBackgroundThumb: 76px;
settingsThumbSkip: 16px;
settingsSubsectionTitle: FlatLabel(defaultFlatLabel) {
style: TextStyle(semiboldTextStyle) {
font: font(boxFontSize semibold);
linkFont: font(boxFontSize semibold);
linkFontOver: font(boxFontSize semibold underline);
}
textFg: windowActiveTextFg;
minWidth: 240px;
}
settingsSubsectionTitleRight: FlatLabel(settingsSubsectionTitle) {
minWidth: 0px;
}
settingsSubsectionTitlePadding: margins(22px, 7px, 10px, 9px);
settingsBackgroundPadding: margins(22px, 11px, 10px, 12px);
settingsTileSkip: 15px;
settingsFromGalleryTop: 2px;
settingsFromFileTop: 14px;
settingsPrivacyOption: Checkbox(settingsCheckbox) {
textPosition: point(13px, 1px);
}
settingsPrivacySecurityPadding: 12px;
settingsPrivacySkip: 14px;
settingsPrivacySkipTop: 4px;
settingsCloudPasswordIconSize: 100px;
settingLocalPasscodeInputField: InputField(defaultInputField) {
width: 256px;
}
settingLocalPasscodeDescription: FlatLabel(changePhoneDescription) {
minWidth: 256px;
}
settingLocalPasscodeDescriptionHeight: 52px;
settingLocalPasscodeError: FlatLabel(changePhoneError) {
minWidth: 256px;
}
settingLocalPasscodeDescriptionBottomSkip: 15px;
settingLocalPasscodeIconPadding: margins(0px, 19px, 0px, 5px);
settingLocalPasscodeButtonPadding: margins(0px, 19px, 0px, 35px);
settingsInfoPhotoHeight: 161px;
settingsInfoPhotoSize: 100px;
settingsInfoPhoto: UserpicButton(defaultUserpicButton) {
size: size(settingsInfoPhotoSize, settingsInfoPhotoSize);
photoSize: settingsInfoPhotoSize;
}
settingsInfoPhotoTop: 0px;
settingsInfoPhotoSkip: 7px;
settingsInfoNameSkip: -1px;
settingsInfoUploadLeft: 6px;
settingsInfoPeerBadge: InfoPeerBadge {
premium: icon {{ "dialogs/dialogs_premium", dialogsVerifiedIconBg }};
premiumFg: dialogsVerifiedIconBg;
sizeTag: 0; // Normal
}
settingsBio: InputField(defaultInputField) {
textBg: transparent;
textMargins: margins(0px, 7px, 0px, 13px);
placeholderFg: placeholderFg;
placeholderFgActive: placeholderFgActive;
placeholderFgError: placeholderFgActive;
placeholderMargins: margins(2px, 0px, 2px, 0px);
placeholderScale: 0.;
placeholderFont: normalFont;
border: 0px;
borderActive: 0px;
heightMin: 32px;
font: boxTextFont;
}
settingsBioMargins: margins(22px, 6px, 22px, 4px);
settingsBioCountdown: FlatLabel(defaultFlatLabel) {
style: boxTextStyle;
textFg: windowSubTextFg;
}
settingsCoverName: FlatLabel(defaultFlatLabel) {
maxHeight: 24px;
style: TextStyle(defaultTextStyle) {
font: font(17px semibold);
linkFont: font(17px semibold);
linkFontOver: font(17px semibold);
}
}
settingsCoverStatus: FlatLabel(defaultFlatLabel) {
textFg: windowSubTextFg;
}
settingsThemesTopSkip: 10px;
settingsThemesBottomSkip: 8px;
settingsTheme: Checkbox(defaultCheckbox) {
textFg: windowSubTextFg;
textFgActive: windowActiveTextFg;
width: 80px;
margin: margins(0px, 0px, 0px, 0px);
textPosition: point(0px, 99px);
checkPosition: point(0px, 0px);
style: defaultTextStyle;
disabledOpacity: 0.5;
}
settingsThemePreviewSize: size(80px, 92px);
settingsThemeBubbleSize: size(40px, 14px);
settingsThemeBubbleRadius: 2px;
settingsThemeBubblePosition: point(6px, 8px);
settingsThemeBubbleSkip: 6px;
settingsThemeRadioBottom: 12px;
settingsThemeMinSkip: 4px;
settingsThemeNotSupportedBg: windowBgOver;
settingsThemeNotSupportedIcon: icon {{ "theme_preview", menuIconFg }};
autoDownloadLimitButton: SettingsButton(settingsButtonNoIcon) {
padding: margins(22px, 10px, 22px, 0px);
}
settingsLevelMeterPadding: margins(22px, 10px, 20px, 10px);
settingsForwardPrivacyPadding: 10px;
settingsForwardPrivacyArrowSkip: 32px;
settingsForwardPrivacyArrowSize: 7px;
settingsForwardPrivacyTooltipPadding: margins(12px, 7px, 12px, 7px);
settingsAccentColorSize: 24px;
settingsAccentColorSkip: 4px;
settingsAccentColorLine: 3px;
settingsFilterDividerLabel: FlatLabel(boxDividerLabel) {
minWidth: 258px;
maxHeight: 0px;
align: align(top);
}
settingsFilterDividerLabelPadding: margins(0px, 16px, 0px, 22px);
settingsFilterIconSize: 74px;
settingsFilterIconPadding: margins(0px, 17px, 0px, 5px);
settingsDeviceName: InputField(defaultInputField) {
textBg: transparent;
textMargins: margins(1px, 3px, 1px, 4px);
placeholderFg: placeholderFg;
placeholderFgActive: placeholderFgActive;
placeholderFgError: placeholderFgActive;
placeholderMargins: margins(1px, 0px, 1px, 0px);
placeholderScale: 0.;
placeholderFont: normalFont;
heightMin: 29px;
font: boxTextFont;
}
dictionariesSectionButton: SettingsButton(settingsUpdateToggle) {
style: TextStyle(defaultTextStyle) {
font: font(14px semibold);
linkFont: font(14px semibold);
linkFontOver: font(14px semibold underline);
}
}
sessionsScroll: boxScroll;
sessionsHeight: 350px;
sessionLocationTop: 54px;
sessionCurrentSkip: 8px;
sessionSubtitleSkip: 14px;
sessionInfoFg: windowSubTextFg;
sessionTerminateTop: 9px;
sessionTerminateSkip: 12px;
sessionTerminate: IconButton {
width: 20px;
height: 20px;
icon: smallCloseIcon;
iconOver: smallCloseIconOver;
iconPosition: point(5px, 5px);
rippleAreaPosition: point(0px, 0px);
rippleAreaSize: 20px;
ripple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
}
sessionIconWindows: icon{{ "settings/devices/device_desktop_win", historyPeerUserpicFg }};
sessionIconMac: icon{{ "settings/devices/device_desktop_mac", historyPeerUserpicFg }};
sessionIconUbuntu: icon{{ "settings/devices/device_linux_ubuntu", historyPeerUserpicFg }};
sessionIconLinux: icon{{ "settings/devices/device_linux", historyPeerUserpicFg }};
sessionIconiPhone: icon{{ "settings/devices/device_phone_ios", historyPeerUserpicFg }};
sessionIconiPad: icon{{ "settings/devices/device_tablet_ios", historyPeerUserpicFg }};
sessionIconAndroid: icon{{ "settings/devices/device_phone_android", historyPeerUserpicFg }};
sessionIconWeb: icon{{ "settings/devices/device_web_other", historyPeerUserpicFg }};
sessionIconChrome: icon{{ "settings/devices/device_web_chrome", historyPeerUserpicFg }};
sessionIconEdge: icon{{ "settings/devices/device_web_edge", historyPeerUserpicFg }};
sessionIconFirefox: icon{{ "settings/devices/device_web_firefox", historyPeerUserpicFg }};
sessionIconSafari: icon{{ "settings/devices/device_web_safari", historyPeerUserpicFg }};
sessionIconOther: icon{{ "settings/devices/device_other", historyPeerUserpicFg }};
sessionBigUserpicSize: 70px;
sessionBigLottieSize: 52px;
sessionBigIconOther: icon{{ "settings/devices/device_other_large", historyPeerUserpicFg }};
sessionBigIconWeb: icon{{ "settings/devices/device_web_other_large", historyPeerUserpicFg }};
sessionBigCoverPadding: margins(0px, 18px, 0px, 7px);
sessionBigName: FlatLabel(defaultFlatLabel) {
textFg: boxTitleFg;
maxHeight: 29px;
style: TextStyle(defaultTextStyle) {
font: font(20px semibold);
linkFont: font(20px semibold);
linkFontOver: font(20px semibold underline);
}
align: align(top);
}
sessionDateLabel: FlatLabel(defaultFlatLabel) {
textFg: windowSubTextFg;
align: align(top);
}
sessionDateSkip: 19px;
sessionValuePadding: margins(0px, 5px, 0px, 2px);
sessionValueLabel: FlatLabel(defaultFlatLabel) {
textFg: windowSubTextFg;
}
sessionValueSkip: 8px;
sessionListItem: PeerListItem(defaultPeerListItem) {
button: OutlineButton(defaultPeerListButton) {
font: normalFont;
padding: margins(11px, 5px, 11px, 5px);
}
height: 84px;
photoPosition: point(21px, 10px);
nameStyle: TextStyle(defaultTextStyle) {
font: msgNameFont;
}
namePosition: point(78px, 11px);
statusPosition: point(78px, 32px);
photoSize: 42px;
statusFg: boxTextFg;
statusFgOver: boxTextFg;
}
sessionList: PeerList(defaultPeerList) {
item: sessionListItem;
padding: margins(0px, 4px, 0px, 0px);
}
settingsPhotoLeft: 22px;
settingsPhotoTop: 8px;
settingsPhotoBottom: 16px;
settingsNameLeft: 112px;
settingsNameTop: 12px;
settingsPhoneLeft: settingsNameLeft;
settingsPhoneTop: 37px;
settingsUsernameLeft: settingsNameLeft;
settingsUsernameTop: 58px;
settingsPeerToPeerSkip: 9px;
settingsIconRadius: 6px;
settingsReactionSize: 25px;
settingsReactionRightSkip: 0px;
settingsReactionCornerSize: size(28px, 22px);
settingsReactionCornerSkip: point(11px, -6px);
settingsReactionMessageSize: 18px;
settingsReactionRightIcon: 20px;
notifyPreviewMargins: margins(40px, 20px, 40px, 58px);
notifyPreviewUserpicSize: 36px;
notifyPreviewUserpicPosition: point(14px, 11px);
notifyPreviewTitlePosition: point(64px, 9px);
notifyPreviewTextPosition: point(64px, 30px);
notifyPreviewChecksSkip: 12px;
notifyPreviewBottomSkip: 9px;
settingsPremiumButtonPadding: margins(11px, 11px, 11px, 3px);
settingsPremiumTopBarBackIcon: icon {{ "info/info_back", premiumButtonFg }};
settingsPremiumTopBarBackIconOver: icon {{ "info/info_back", premiumButtonFg }};
settingsPremiumStarSize: size(84px, 81px);
settingsPremiumStarTopSkip: 37px;
settingsPremiumTopBarBack: IconButton(infoTopBarBack) {
icon: settingsPremiumTopBarBackIcon;
iconOver: settingsPremiumTopBarBackIconOver;
ripple: RippleAnimation(defaultRippleAnimation) {
color: callMuteRipple;
}
}
settingsPremiumLayerTopBarBack: IconButton(infoLayerTopBarBack) {
icon: settingsPremiumTopBarBackIcon;
iconOver: settingsPremiumTopBarBackIconOver;
ripple: RippleAnimation(defaultRippleAnimation) {
color: callMuteRipple;
}
}
settingsPremiumTopBarClose: IconButton(infoTopBarClose) {
icon: icon {{ "info/info_close", premiumButtonFg }};
iconOver: icon {{ "info/info_close", premiumButtonFg }};
ripple: RippleAnimation(defaultRippleAnimation) {
color: callMuteRipple;
}
}
settingsPremiumMoveLeft: IconButton(settingsPremiumLayerTopBarBack) {
width: 52px;
height: 56px;
iconPosition: point(-1px, -1px);
}
settingsPremiumMoveRightIcon: icon {{ "info/info_back-flip_horizontal", premiumButtonFg }};
settingsPremiumMoveRightIconOver: icon {{ "info/info_back-flip_horizontal", premiumButtonFg }};
settingsPremiumMoveRight: IconButton(settingsPremiumMoveLeft) {
icon: settingsPremiumMoveRightIcon;
iconOver: settingsPremiumMoveRightIconOver;
}
settingsPremiumRowTitlePadding: margins(59px, 5px, 46px, 1px);
settingsPremiumRowAboutPadding: margins(59px, 0px, 46px, 6px);
settingsPremiumPreviewTitlePadding: margins(24px, 13px, 24px, 3px);
settingsPremiumPreviewAboutPadding: margins(24px, 0px, 24px, 11px);
settingsPremiumPreviewLinePadding: margins(18px, 0px, 18px, 8px);
settingsPremiumTitlePadding: margins(0px, 18px, 0px, 11px);
settingsPremiumAboutTextStyle: TextStyle(defaultTextStyle) {
font: font(12px);
linkFont: font(12px underline);
linkFontOver: font(12px underline);
lineHeight: 18px;
}
settingsPremiumAbout: FlatLabel(defaultFlatLabel) {
style: settingsPremiumAboutTextStyle;
palette: TextPalette(defaultTextPalette) {
linkFg: premiumButtonFg;
}
align: align(top);
textFg: premiumButtonFg;
minWidth: 190px;
}
settingsPremiumArrowShift: point(-5px, -1px);
settingsPremiumArrow: icon{{ "settings/premium/arrow", menuIconFg }};
settingsPremiumArrowOver: icon{{ "settings/premium/arrow", menuIconFgOver }};
settingsPremiumOptionsPadding: margins(0px, 9px, 0px, 2px);
settingsPremiumTopHeight: 220px;
settingsPremiumUserHeight: 223px;
settingsPremiumUserTitlePadding: margins(0px, 16px, 0px, 6px);
settingsPremiumUserTitle: FlatLabel(boxTitle) {
style: TextStyle(defaultTextStyle) {
font: boxTitleFont;
linkFont: boxTitleFont;
linkFontOver: font(16px semibold underline);
lineHeight: 14px;
}
minWidth: 300px;
maxHeight: 0px;
align: align(top);
}
settingsPremiumUserAbout: FlatLabel(boxDividerLabel) {
style: settingsPremiumAboutTextStyle;
minWidth: 315px;
maxHeight: 0px;
align: align(top);
}
settingsPremiumLock: icon{{ "emoji/premium_lock", windowActiveTextFg, point(0px, 1px) }};
settingsPremiumLockSkip: 3px;
requestPeerRestriction: FlatLabel(defaultFlatLabel) {
minWidth: 240px;
textFg: membersAboutLimitFg;
style: TextStyle(boxTextStyle) {
lineHeight: 22px;
}
}