2016-10-04 18:18:08 +00:00
|
|
|
/*
|
|
|
|
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
|
2017-01-11 18:31:31 +00:00
|
|
|
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
2016-10-04 18:18:08 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
using "basic.style";
|
2016-10-27 14:10:28 +00:00
|
|
|
using "ui/widgets/widgets.style";
|
2016-12-07 13:32:25 +00:00
|
|
|
using "history/history.style";
|
2016-10-04 18:18:08 +00:00
|
|
|
|
2016-11-04 08:23:50 +00:00
|
|
|
windowMinWidth: 380px;
|
|
|
|
windowMinHeight: 480px;
|
2016-11-04 11:14:47 +00:00
|
|
|
windowDefaultWidth: 800px;
|
|
|
|
windowDefaultHeight: 600px;
|
2016-11-04 08:23:50 +00:00
|
|
|
windowShadow: icon {{ "window_shadow", windowShadowFg }};
|
|
|
|
windowShadowShift: 1px;
|
|
|
|
|
2017-01-24 21:24:39 +00:00
|
|
|
adaptiveChatWideWidth: 880px;
|
2016-10-22 18:58:25 +00:00
|
|
|
|
2016-12-21 15:05:58 +00:00
|
|
|
notifyBorder: windowShadowFgFallback;
|
2016-10-04 18:18:08 +00:00
|
|
|
notifyBorderWidth: 1px;
|
|
|
|
notifySlowHide: 4000;
|
|
|
|
notifyPhotoSize: 62px;
|
|
|
|
notifyMacPhotoSize: 64px;
|
|
|
|
notifyPhotoPos: point(9px, 9px);
|
|
|
|
notifyClosePos: point(1px, 2px);
|
2016-11-01 12:46:34 +00:00
|
|
|
notifyClose: IconButton {
|
2016-10-27 21:19:38 +00:00
|
|
|
width: 30px;
|
|
|
|
height: 30px;
|
|
|
|
|
2016-12-21 15:05:58 +00:00
|
|
|
icon: smallCloseIcon;
|
|
|
|
iconOver: smallCloseIconOver;
|
2016-11-01 12:46:34 +00:00
|
|
|
|
2016-10-27 21:19:38 +00:00
|
|
|
iconPosition: point(10px, 10px);
|
2016-12-05 11:01:08 +00:00
|
|
|
|
|
|
|
rippleAreaPosition: point(5px, 5px);
|
|
|
|
rippleAreaSize: 20px;
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: windowBgOver;
|
|
|
|
}
|
2016-10-04 18:18:08 +00:00
|
|
|
}
|
|
|
|
notifyItemTop: 12px;
|
|
|
|
notifyTextLeft: 12px;
|
|
|
|
notifyTextTop: 7px;
|
2016-10-05 16:56:27 +00:00
|
|
|
notifyWaitLongHide: 3000;
|
2016-10-04 18:18:08 +00:00
|
|
|
notifyFastAnim: 150;
|
2016-10-06 16:41:09 +00:00
|
|
|
notifyWidth: 320px;
|
2016-10-04 18:18:08 +00:00
|
|
|
notifyMinHeight: 80px;
|
|
|
|
notifyDeltaX: 6px;
|
|
|
|
notifyDeltaY: 7px;
|
|
|
|
notifyActionsDuration: 200;
|
|
|
|
|
2016-11-15 11:56:49 +00:00
|
|
|
notifyHideAllHeight: 36px;
|
2016-10-05 16:56:27 +00:00
|
|
|
|
2016-12-09 18:56:01 +00:00
|
|
|
notifyReplyArea: InputField(defaultInputField) {
|
2016-10-04 18:18:08 +00:00
|
|
|
font: normalFont;
|
|
|
|
textMargins: margins(8px, 8px, 8px, 6px);
|
|
|
|
heightMin: 36px;
|
|
|
|
heightMax: 72px;
|
2016-12-21 15:05:58 +00:00
|
|
|
placeholderFg: placeholderFg;
|
|
|
|
placeholderFgActive: placeholderFgActive;
|
|
|
|
placeholderFgError: placeholderFgActive;
|
2016-12-13 17:07:56 +00:00
|
|
|
placeholderMargins: margins(2px, 0px, 2px, 0px);
|
2016-12-09 18:56:01 +00:00
|
|
|
placeholderScale: 0.;
|
|
|
|
placeholderFont: normalFont;
|
2016-10-04 18:18:08 +00:00
|
|
|
border: 0px;
|
|
|
|
borderActive: 0px;
|
|
|
|
}
|
2016-12-26 22:46:36 +00:00
|
|
|
notifySendReply: IconButton {
|
2016-10-04 18:18:08 +00:00
|
|
|
width: 36px;
|
|
|
|
height: 36px;
|
2016-12-26 22:46:36 +00:00
|
|
|
|
|
|
|
icon: historySendIcon;
|
|
|
|
iconOver: historySendIconOver;
|
2016-12-07 13:32:25 +00:00
|
|
|
iconPosition: point(6px, 6px);
|
2016-10-04 18:18:08 +00:00
|
|
|
}
|
2016-11-04 08:23:50 +00:00
|
|
|
|
2016-11-06 17:23:13 +00:00
|
|
|
titleUnreadCounterTop: 5px;
|
|
|
|
titleUnreadCounterRight: 35px;
|
|
|
|
|
2016-11-11 19:51:59 +00:00
|
|
|
mainMenuWidth: 274px;
|
|
|
|
mainMenuCoverHeight: 140px;
|
|
|
|
mainMenuUserpicLeft: 24px;
|
|
|
|
mainMenuUserpicTop: 22px;
|
|
|
|
mainMenuUserpicSize: 48px;
|
|
|
|
mainMenuCoverTextLeft: 30px;
|
|
|
|
mainMenuCoverNameTop: 88px;
|
|
|
|
mainMenuCoverStatusTop: 106px;
|
|
|
|
mainMenuSkip: 13px;
|
2016-11-16 10:44:06 +00:00
|
|
|
mainMenu: Menu(defaultMenu) {
|
2016-11-16 16:04:25 +00:00
|
|
|
itemFg: windowBoldFg;
|
|
|
|
itemFgOver: windowBoldFgOver;
|
2016-11-16 10:44:06 +00:00
|
|
|
itemFont: semiboldFont;
|
|
|
|
itemIconPosition: point(28px, 11px);
|
|
|
|
itemPadding: margins(76px, 14px, 28px, 14px);
|
|
|
|
}
|
|
|
|
mainMenuNewGroup: icon {{ "menu_new_group", menuIconFg }};
|
|
|
|
mainMenuNewGroupOver: icon {{ "menu_new_group", menuIconFgOver }};
|
|
|
|
mainMenuNewChannel: icon {{ "menu_new_channel", menuIconFg }};
|
|
|
|
mainMenuNewChannelOver: icon {{ "menu_new_channel", menuIconFgOver }};
|
|
|
|
mainMenuContacts: icon {{ "menu_contacts", menuIconFg }};
|
|
|
|
mainMenuContactsOver: icon {{ "menu_contacts", menuIconFgOver }};
|
|
|
|
mainMenuSettings: icon {{ "menu_settings", menuIconFg }};
|
|
|
|
mainMenuSettingsOver: icon {{ "menu_settings", menuIconFgOver }};
|
|
|
|
mainMenuHelp: icon {{ "menu_help", menuIconFg }};
|
|
|
|
mainMenuHelpOver: icon {{ "menu_help", menuIconFgOver }};
|
2016-11-11 19:51:59 +00:00
|
|
|
mainMenuFooterLeft: 30px;
|
2016-11-16 10:44:06 +00:00
|
|
|
mainMenuTelegramLabel: FlatLabel(defaultFlatLabel) {
|
2016-11-11 19:51:59 +00:00
|
|
|
align: align(left);
|
|
|
|
textFg: windowSubTextFg;
|
2016-12-23 13:21:01 +00:00
|
|
|
style: TextStyle(defaultTextStyle) {
|
|
|
|
font: semiboldFont;
|
|
|
|
linkFont: semiboldFont;
|
|
|
|
linkFontOver: font(fsize semibold underline);
|
|
|
|
}
|
2016-12-26 22:46:36 +00:00
|
|
|
palette: TextPalette(defaultTextPalette) {
|
|
|
|
linkFg: windowSubTextFg;
|
|
|
|
}
|
2016-11-11 19:51:59 +00:00
|
|
|
}
|
|
|
|
mainMenuTelegramBottom: 43px;
|
2016-11-16 10:44:06 +00:00
|
|
|
mainMenuVersionLabel: FlatLabel(mainMenuTelegramLabel) {
|
2016-12-23 13:21:01 +00:00
|
|
|
style: defaultTextStyle;
|
2016-11-11 19:51:59 +00:00
|
|
|
}
|
|
|
|
mainMenuVersionBottom: 21px;
|
|
|
|
|
2016-11-06 17:23:13 +00:00
|
|
|
// Windows specific title
|
|
|
|
|
2016-11-04 08:23:50 +00:00
|
|
|
titleHeight: 21px;
|
|
|
|
titleButtonMinimize: IconButton {
|
|
|
|
width: 24px;
|
|
|
|
height: 21px;
|
|
|
|
|
2017-01-16 13:27:11 +00:00
|
|
|
icon: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBg },
|
|
|
|
{ "title_button_minimize", titleButtonFg, point(4px, 4px) },
|
|
|
|
};
|
2016-11-04 08:23:50 +00:00
|
|
|
iconOver: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBgOver },
|
|
|
|
{ "title_button_minimize", titleButtonFgOver, point(4px, 4px) },
|
|
|
|
};
|
|
|
|
iconPosition: point(0px, 0px);
|
|
|
|
}
|
2017-01-16 13:27:11 +00:00
|
|
|
titleButtonMinimizeIconActive: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBgActive },
|
|
|
|
{ "title_button_minimize", titleButtonFgActive, point(4px, 4px) },
|
|
|
|
};
|
|
|
|
titleButtonMinimizeIconActiveOver: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBgActiveOver },
|
|
|
|
{ "title_button_minimize", titleButtonFgActiveOver, point(4px, 4px) },
|
|
|
|
};
|
2016-11-04 08:23:50 +00:00
|
|
|
titleButtonMaximize: IconButton(titleButtonMinimize) {
|
2017-01-16 13:27:11 +00:00
|
|
|
icon: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBg },
|
|
|
|
{ "title_button_maximize", titleButtonFg, point(4px, 4px) },
|
|
|
|
};
|
2016-11-04 08:23:50 +00:00
|
|
|
iconOver: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBgOver },
|
|
|
|
{ "title_button_maximize", titleButtonFgOver, point(4px, 4px) },
|
|
|
|
};
|
|
|
|
}
|
2017-01-16 13:27:11 +00:00
|
|
|
titleButtonMaximizeIconActive: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBgActive },
|
|
|
|
{ "title_button_maximize", titleButtonFgActive, point(4px, 4px) },
|
|
|
|
};
|
|
|
|
titleButtonMaximizeIconActiveOver: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBgActiveOver },
|
|
|
|
{ "title_button_maximize", titleButtonFgActiveOver, point(4px, 4px) },
|
|
|
|
};
|
|
|
|
titleButtonRestoreIcon: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBg },
|
|
|
|
{ "title_button_restore", titleButtonFg, point(4px, 4px) },
|
|
|
|
};
|
2016-11-04 08:23:50 +00:00
|
|
|
titleButtonRestoreIconOver: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBgOver },
|
|
|
|
{ "title_button_restore", titleButtonFgOver, point(4px, 4px) },
|
|
|
|
};
|
2017-01-16 13:27:11 +00:00
|
|
|
titleButtonRestoreIconActive: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBgActive },
|
|
|
|
{ "title_button_restore", titleButtonFgActive, point(4px, 4px) },
|
|
|
|
};
|
|
|
|
titleButtonRestoreIconActiveOver: icon {
|
|
|
|
{ size(24px, 21px), titleButtonBgActiveOver },
|
|
|
|
{ "title_button_restore", titleButtonFgActiveOver, point(4px, 4px) },
|
|
|
|
};
|
2016-11-04 08:23:50 +00:00
|
|
|
titleButtonClose: IconButton(titleButtonMinimize) {
|
|
|
|
width: 25px;
|
|
|
|
|
2017-01-16 13:27:11 +00:00
|
|
|
icon: icon {
|
|
|
|
{ size(25px, 21px), titleButtonCloseBg },
|
|
|
|
{ "title_button_close", titleButtonCloseFg, point(5px, 4px) },
|
|
|
|
};
|
2016-11-04 08:23:50 +00:00
|
|
|
iconOver: icon {
|
|
|
|
{ size(25px, 21px), titleButtonCloseBgOver },
|
|
|
|
{ "title_button_close", titleButtonCloseFgOver, point(5px, 4px) },
|
|
|
|
};
|
|
|
|
}
|
2017-01-16 13:27:11 +00:00
|
|
|
titleButtonCloseIconActive: icon {
|
|
|
|
{ size(25px, 21px), titleButtonCloseBgActive },
|
|
|
|
{ "title_button_close", titleButtonCloseFgActive, point(5px, 4px) },
|
|
|
|
};
|
|
|
|
titleButtonCloseIconActiveOver: icon {
|
|
|
|
{ size(25px, 21px), titleButtonCloseBgActiveOver },
|
|
|
|
{ "title_button_close", titleButtonCloseFgActiveOver, point(5px, 4px) },
|
|
|
|
};
|
2016-11-04 08:23:50 +00:00
|
|
|
|
2016-11-15 11:56:49 +00:00
|
|
|
// Legacy top bar.
|
|
|
|
topBarHeight: 54px;
|
2016-11-16 12:06:02 +00:00
|
|
|
topBarMenuPosition: point(-2px, 35px);
|
2016-11-15 11:56:49 +00:00
|
|
|
topBarDuration: 200;
|
2016-12-21 15:05:58 +00:00
|
|
|
topBarBackward: icon {{ "title_back", menuIconFg }};
|
2016-11-15 11:56:49 +00:00
|
|
|
topBarForwardAlpha: 0.6;
|
2016-11-19 09:22:53 +00:00
|
|
|
topBarBack: icon {{ "title_back", lightButtonFg }};
|
2016-11-15 11:56:49 +00:00
|
|
|
topBarArrowPadding: margins(39px, 8px, 17px, 8px);
|
|
|
|
topBarMinPadding: 5px;
|
2016-11-19 09:22:53 +00:00
|
|
|
topBarButton: RoundButton(defaultLightButton) {
|
|
|
|
width: -18px;
|
|
|
|
padding: margins(0px, 10px, 12px, 10px);
|
2016-11-15 11:56:49 +00:00
|
|
|
}
|
|
|
|
topBarClearButton: RoundButton(defaultLightButton) {
|
|
|
|
width: -18px;
|
|
|
|
}
|
|
|
|
topBarSearch: IconButton {
|
2016-11-16 10:44:06 +00:00
|
|
|
width: 45px;
|
2016-11-15 11:56:49 +00:00
|
|
|
height: topBarHeight;
|
|
|
|
|
|
|
|
icon: icon {{ "title_search", menuIconFg }};
|
|
|
|
iconOver: icon {{ "title_search", menuIconFgOver }};
|
|
|
|
iconPosition: point(15px, 18px);
|
|
|
|
|
2016-11-16 10:44:06 +00:00
|
|
|
rippleAreaPosition: point(4px, 7px);
|
|
|
|
rippleAreaSize: 40px;
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: windowBgOver;
|
|
|
|
}
|
2016-11-15 11:56:49 +00:00
|
|
|
}
|
|
|
|
topBarMenuToggle: IconButton(topBarSearch) {
|
|
|
|
icon: icon {{ "title_menu_dots", menuIconFg }};
|
|
|
|
iconOver: icon {{ "title_menu_dots", menuIconFgOver }};
|
2016-11-16 10:44:06 +00:00
|
|
|
iconPosition: point(16px, 17px);
|
2016-11-15 11:56:49 +00:00
|
|
|
|
2016-11-16 10:44:06 +00:00
|
|
|
rippleAreaPosition: point(0px, 7px);
|
2016-11-15 11:56:49 +00:00
|
|
|
}
|
|
|
|
topBarActionSkip: 10px;
|
|
|
|
|
|
|
|
PeerAvatarButton {
|
|
|
|
size: pixels;
|
|
|
|
photoSize: pixels;
|
|
|
|
}
|
|
|
|
topBarInfoButton: PeerAvatarButton {
|
|
|
|
size: topBarHeight;
|
|
|
|
photoSize: 42px;
|
|
|
|
}
|
2016-12-29 16:31:01 +00:00
|
|
|
topBarSlideDuration: 200;
|
2016-11-15 11:56:49 +00:00
|
|
|
|
2017-02-03 20:07:26 +00:00
|
|
|
themeEditorSampleSize: size(90px, 51px);
|
|
|
|
themeEditorMargin: margins(17px, 10px, 17px, 10px);
|
|
|
|
themeEditorDescriptionSkip: 10px;
|
|
|
|
themeEditorNameFont: font(15px semibold);
|
|
|
|
themeEditorCopyNameFont: font(fsize semibold);
|
|
|
|
|
2016-11-04 08:23:50 +00:00
|
|
|
// Mac specific
|
|
|
|
|
|
|
|
macAccessoryWidth: 450.;
|
|
|
|
macAccessoryHeight: 90.;
|
|
|
|
macEnableFilterAdd: 2;
|
|
|
|
macEnableFilterTop: 5;
|
|
|
|
macSelectorTop: 6;
|
|
|
|
macAlwaysThisAppTop: 4;
|
|
|
|
macAppHintTop: 8;
|
|
|
|
macCautionIconSize: 16;
|
2016-12-23 13:21:01 +00:00
|
|
|
|
|
|
|
macWindowRoundRadius: 5;
|
|
|
|
macWindowShadowTopLeft: icon {{ "mac_window_shadow_top_left", windowShadowFg }};
|
|
|
|
macTrayIcon: icon {{ "mac_tray_icon", windowFg }};
|