tdesktop/Telegram/SourceFiles/window/window.style

357 lines
11 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";
2016-10-27 14:10:28 +00:00
using "ui/widgets/widgets.style";
using "history/history.style";
2019-09-18 08:05:37 +00:00
using "boxes/boxes.style"; // UserpicButton
windowMinWidth: 380px;
windowMinHeight: 480px;
windowDefaultWidth: 800px;
windowDefaultHeight: 600px;
windowBigDefaultWidth: 1024px;
windowBigDefaultHeight: 768px;
windowResizeArea: 4px;
columnMinimalWidthLeft: 260px;
2017-11-12 16:50:58 +00:00
columnMaximalWidthLeft: 540px;
columnMinimalWidthMain: 380px;
columnDesiredWidthMain: 512px;
2017-11-16 07:45:55 +00:00
columnMinimalWidthThird: 292px;
columnMaximalWidthThird: 392px;
adaptiveChatWideWidth: 880px;
notifyBorder: windowShadowFgFallback;
notifyBorderWidth: 1px;
notifySlowHide: 4000;
notifyPhotoSize: 62px;
notifyMacPhotoSize: 64px;
notifyPhotoPos: point(9px, 9px);
notifyClosePos: point(1px, 2px);
notifyClose: IconButton {
width: 30px;
height: 30px;
icon: smallCloseIcon;
iconOver: smallCloseIconOver;
iconPosition: point(10px, 10px);
rippleAreaPosition: point(5px, 5px);
rippleAreaSize: 20px;
ripple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
}
notifyItemTop: 12px;
notifyTextLeft: 12px;
notifyTextTop: 7px;
notifyWaitLongHide: 3000;
notifyFastAnim: 150;
notifyWidth: 320px;
notifyMinHeight: 80px;
notifyDeltaX: 6px;
notifyDeltaY: 7px;
notifyActionsDuration: 200;
notifyHideAllHeight: 36px;
notifyReplyArea: InputField(defaultInputField) {
font: normalFont;
textMargins: margins(8px, 8px, 8px, 6px);
heightMin: 36px;
heightMax: 72px;
placeholderFg: placeholderFg;
placeholderFgActive: placeholderFgActive;
placeholderFgError: placeholderFgActive;
placeholderMargins: margins(2px, 0px, 2px, 0px);
placeholderScale: 0.;
placeholderFont: normalFont;
border: 0px;
borderActive: 0px;
}
notifySendReply: IconButton {
width: 36px;
height: 36px;
icon: historySendIcon;
iconOver: historySendIconOver;
iconPosition: point(6px, 6px);
}
titleUnreadCounterTop: 6px;
titleUnreadCounterRight: 35px;
2016-11-11 19:51:59 +00:00
mainMenuWidth: 274px;
mainMenuCoverHeight: 134px;
2016-11-11 19:51:59 +00:00
mainMenuUserpicLeft: 24px;
mainMenuUserpicTop: 20px;
mainMenuUserpic: UserpicButton(defaultUserpicButton) {
size: size(48px, 48px);
photoSize: 48px;
}
mainMenuCloudButton: IconButton {
width: 48px;
height: 48px;
icon: icon {
// { "menu_cloud", mainMenuCloudFg },
};
iconPosition: point(22px, 22px);
}
mainMenuCloudSize: 32px;
mainMenuResetScaleFont: font(20px semibold);
mainMenuResetScaleLeft: 36px;
mainMenuResetScaleRight: 12px;
mainMenuResetScaleTop: 2px;
mainMenuResetScaleIconLeft: 5px;
2016-11-11 19:51:59 +00:00
mainMenuCoverTextLeft: 30px;
mainMenuCoverNameTop: 84px;
mainMenuCoverStatusTop: 102px;
mainMenuSkip: 10px;
mainMenu: Menu(defaultMenu) {
itemFg: windowBoldFg;
itemFgOver: windowBoldFgOver;
2019-09-11 07:27:34 +00:00
itemStyle: semiboldTextStyle;
2018-09-17 17:48:48 +00:00
itemIconPosition: point(26px, 8px);
itemPadding: margins(76px, 13px, 28px, 13px);
itemToggle: Toggle(defaultMenuToggle) {
toggledFg: mainMenuCoverBg;
}
itemToggleOver: Toggle(defaultMenuToggleOver) {
toggledFg: mainMenuCoverBg;
}
itemToggleShift: 11px;
}
mainMenuShadow: icon {{ "menu_shadow", windowShadowFg }};
mainMenuNewGroup: icon {{ "menu_new_group", menuIconFg }};
mainMenuNewGroupOver: icon {{ "menu_new_group", menuIconFgOver }};
mainMenuNewChannel: icon {{ "menu_new_channel", menuIconFg }};
mainMenuNewChannelOver: icon {{ "menu_new_channel", menuIconFgOver }};
2018-09-17 17:48:48 +00:00
mainMenuContacts: icon {{ "settings_name", menuIconFg }};
mainMenuContactsOver: icon {{ "settings_name", menuIconFgOver }};
mainMenuCalls: icon {{ "settings_phone_number", menuIconFg }};
mainMenuCallsOver: icon {{ "settings_phone_number", menuIconFgOver }};
mainMenuSettings: icon {{ "menu_settings", menuIconFg }};
mainMenuSettingsOver: icon {{ "menu_settings", menuIconFgOver }};
mainMenuNightMode: icon {{ "menu_night_mode", menuIconFg }};
mainMenuNightModeOver: icon {{ "menu_night_mode", menuIconFgOver }};
mainMenuReload: icon {{ "menu_reload", menuIconFg }};
mainMenuReloadOver: icon {{ "menu_reload", menuIconFgOver }};
mainMenuFixOrder: icon {{ "menu_fix_order", menuIconFg }};
mainMenuFixOrderOver: icon {{ "menu_fix_order", menuIconFgOver }};
2020-06-23 09:20:38 +00:00
mainMenuAddAccount: icon {{ "menu_add_account", menuIconFg }};
mainMenuAddAccountOver: icon {{ "menu_add_account", menuIconFgOver }};
mainMenuAccountSize: 32px;
mainMenuAccountCheckPosition: point(7px, 5px);
mainMenuAccountCheckLine: 2px;
mainMenuAccountCheck: RoundCheckbox(defaultRoundCheckbox) {
size: 18px;
bgInactive: overviewCheckBg;
bgActive: overviewCheckBgActive;
check: icon {{ "account_check", overviewCheckFgActive }};
}
2016-11-11 19:51:59 +00:00
mainMenuFooterLeft: 30px;
mainMenuTelegramLabel: FlatLabel(defaultFlatLabel) {
2016-11-11 19:51:59 +00:00
align: align(left);
textFg: windowSubTextFg;
style: TextStyle(defaultTextStyle) {
font: semiboldFont;
linkFont: semiboldFont;
linkFontOver: font(fsize semibold underline);
}
palette: TextPalette(defaultTextPalette) {
linkFg: windowSubTextFg;
}
2016-11-11 19:51:59 +00:00
}
mainMenuTelegramBottom: 43px;
mainMenuVersionLabel: FlatLabel(mainMenuTelegramLabel) {
style: defaultTextStyle;
2016-11-11 19:51:59 +00:00
}
mainMenuVersionBottom: 21px;
mainMenuToggleSize: 8px;
mainMenuToggleFourStrokes: 4px;
mainMenuTogglePosition: point(32px, 32px);
themeEditorSampleSize: size(90px, 51px);
themeEditorMargin: margins(17px, 10px, 17px, 10px);
themeEditorDescriptionSkip: 10px;
themeEditorNameFont: font(15px semibold);
themeEditorCopyNameFont: font(fsize semibold);
windowEmojiSuggestionsPopup: PopupMenu(defaultPopupMenu) {
menu: Menu(defaultMenu) {
itemPadding: margins(48px, 8px, 17px, 7px);
widthMax: 512px;
}
}
2018-05-07 17:44:33 +00:00
connectingLeftShadow: icon {{ "connecting_left_shadow", windowShadowFg }};
connectingLeft: icon {{ "connecting_left", windowBg }};
connectingRightShadow: icon {{ "connecting_right_shadow", windowShadowFg }};
connectingRight: icon {{ "connecting_right", windowBg }};
connectingBodyShadow: icon {{ "connecting_body_shadow", windowShadowFg }};
connectingBody: icon {{ "connecting_body", windowBg }};
connectingMargin: margins(2px, 2px, 2px, 2px);
connectingTextPadding: margins(18px, 11px, 18px, 0px);
connectingRadialSkip: 6px;
connectingRadial: InfiniteRadialAnimation(defaultInfiniteRadialAnimation) {
color: menuIconFg;
thickness: 2px;
size: size(20px, 20px);
}
connectingRetryLink: LinkButton(defaultLinkButton) {
padding: margins(6px, 11px, 6px, 0px);
}
connectingProxyOff: icon {{ "proxy_off", menuIconFg }};
connectingProxyOn: icon {{ "proxy_on", windowBgActive }};
connectingDuration: 150;
windowOutdatedDetails: FlatLabel(defaultFlatLabel) {
align: align(top);
minWidth: 100px;
textFg: outdatedFg;
}
windowOutdatedTitle: FlatLabel(windowOutdatedDetails) {
style: semiboldTextStyle;
}
windowOutdatedPadding: margins(10px, 10px, 10px, 10px);
windowOutdatedSkip: 6px;
windowOutdatedClose: IconButton(defaultIconButton) {
width: 60px;
height: 60px;
icon: icon {{ "info_close", outdatedFg }};
iconOver: icon {{ "info_close", outdatedFg }};
iconPosition: point(-1px, -1px);
}
createThemeImportButton: SettingsButton {
2019-09-02 16:10:18 +00:00
textFg: lightButtonFg;
textFgOver: lightButtonFgOver;
textBg: windowBg;
textBgOver: windowBgOver;
font: semiboldFont;
height: 20px;
2020-04-29 08:08:34 +00:00
padding: margins(22px, 10px, 22px, 8px);
2019-09-02 16:10:18 +00:00
ripple: defaultRippleAnimation;
}
2019-09-03 08:25:19 +00:00
createThemeLink: InputField(defaultInputField) {
textMargins: margins(0px, 7px, 0px, 0px);
textBg: boxBg;
placeholderFg: placeholderFg;
placeholderFgActive: placeholderFgActive;
placeholderFgError: placeholderFgActive;
placeholderMargins: margins(0px, 0px, 0px, 0px);
placeholderScale: 0.;
placeholderFont: boxTextFont;
heightMin: 34px;
font: boxTextFont;
}
2019-09-02 16:10:18 +00:00
2020-03-03 12:07:22 +00:00
windowFiltersWidth: 72px;
windowFiltersButton: SideBarButton(defaultSideBarButton) {
textTop: 40px;
textSkip: 6px;
minHeight: 62px;
minTextWidth: 48px;
style: TextStyle(defaultTextStyle) {
font: font(11px semibold);
}
badgeStyle: TextStyle(defaultTextStyle) {
2020-03-16 12:12:40 +00:00
font: font(12px semibold);
}
2020-03-16 12:12:40 +00:00
badgeSkip: 4px;
badgeHeight: 17px;
badgeStroke: 2px;
2020-03-24 13:51:49 +00:00
badgePosition: point(3px, 7px);
iconPosition: point(-1px, 6px);
}
windowFiltersMainMenu: SideBarButton(windowFiltersButton) {
icon: icon {{ "dialogs_menu", sideBarIconFg }};
iconPosition: point(-1px, -1px);
minHeight: 54px;
}
windowFiltersMainMenuUnread: icon {
{ "dialogs_menu_unread", sideBarIconFg },
{ "dialogs_menu_unread_dot", sideBarBadgeBg },
};
windowFiltersMainMenuUnreadMuted: icon {
{ "dialogs_menu_unread", sideBarIconFg },
{ "dialogs_menu_unread_dot", sideBarBadgeBgMuted },
};
windowFilterSmallItem: PeerListItem(defaultPeerListItem) {
height: 44px;
photoPosition: point(15px, 5px);
namePosition: point(62px, 14px);
photoSize: 34px;
2020-03-13 13:05:21 +00:00
checkbox: RoundImageCheckbox(defaultPeerListCheckbox) {
imageRadius: 17px;
imageSmallRadius: 14px;
}
}
windowFilterSmallList: PeerList(defaultPeerList) {
item: windowFilterSmallItem;
}
windowFilterSmallRemove: IconButton(notifyClose) {
}
windowFilterSmallRemoveRight: 10px;
2020-03-19 14:55:17 +00:00
windowFilterNameInput: InputField(defaultInputField) {
textMargins: margins(0px, 26px, 36px, 4px);
}
windowFilterIconToggleSize: size(36px, 36px);
windowFilterIconTogglePosition: point(-4px, 12px);
windwoFilterIconPanelPosition: point(-2px, -1px);
windowFilterIconSingle: size(44px, 42px);
windowFilterIconPadding: margins(10px, 36px, 10px, 8px);
windowFilterIconHeaderPosition: point(18px, 14px);
windowFilterTypeContacts: icon {{ "filters/filters_type_contacts", historyPeerUserpicFg }};
windowFilterTypeNonContacts: icon {{ "filters/filters_type_noncontacts", historyPeerUserpicFg }};
windowFilterTypeGroups: icon {{ "filters/filters_type_groups", historyPeerUserpicFg }};
windowFilterTypeChannels: icon {{ "filters/filters_type_channels", historyPeerUserpicFg }};
windowFilterTypeBots: icon {{ "filters/filters_type_bots", historyPeerUserpicFg }};
windowFilterTypeNoMuted: icon {{ "filters/filters_type_muted", historyPeerUserpicFg }};
windowFilterTypeNoArchived: icon {{ "filters/filters_type_archived", historyPeerUserpicFg }};
windowFilterTypeNoRead: icon {{ "filters/filters_type_read", historyPeerUserpicFg }};
2020-03-13 13:05:21 +00:00
windowFilterChatsSectionSubtitle: FlatLabel(defaultFlatLabel) {
style: TextStyle(defaultTextStyle) {
font: searchedBarFont;
}
textFg: searchedBarFg;
}
windowFilterChatsSectionSubtitlePadding: margins(17px, 7px, 17px, 7px);
2020-03-27 16:05:39 +00:00
windowFilterAboutPadding: margins(22px, 0px, 22px, 19px);
2020-03-03 12:07:22 +00:00
2020-04-29 14:52:40 +00:00
windowArchiveToast: Toast(defaultToast) {
minWidth: boxWideWidth;
maxWidth: boxWideWidth;
}
// Mac specific
macAccessoryWidth: 450.;
macAccessoryHeight: 90.;
macEnableFilterAdd: 2;
macEnableFilterTop: 5;
macSelectorTop: 6;
macAlwaysThisAppTop: 4;
macAppHintTop: 8;
macCautionIconSize: 16;
macWindowRoundRadius: 5;
macWindowShadowTopLeft: icon {{ "mac_window_shadow_top_left", windowShadowFg }};
macTrayIcon: icon {{ "mac_tray_icon", windowFg }};