2017-09-13 17:01:23 +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
|
|
|
|
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|
|
|
*/
|
|
|
|
using "basic.style";
|
|
|
|
|
|
|
|
using "boxes/boxes.style";
|
|
|
|
using "ui/widgets/widgets.style";
|
|
|
|
|
2017-09-21 19:21:33 +00:00
|
|
|
InfoToggle {
|
|
|
|
color: color;
|
|
|
|
duration: int;
|
|
|
|
size: pixels;
|
|
|
|
skip: pixels;
|
|
|
|
stroke: pixels;
|
|
|
|
rippleAreaPadding: pixels;
|
|
|
|
}
|
|
|
|
|
|
|
|
infoToggleCheckbox: Checkbox(defaultCheckbox) {
|
|
|
|
margin: margins(0px, 0px, 0px, 0px);
|
|
|
|
rippleBgActive: windowBgOver;
|
|
|
|
checkPosition: point(16px, 8px);
|
|
|
|
rippleAreaPosition: point(-8px, -8px);
|
|
|
|
}
|
|
|
|
infoToggle: InfoToggle {
|
|
|
|
color: menuIconFg;
|
|
|
|
duration: slideWrapDuration;
|
|
|
|
size: 24px;
|
|
|
|
skip: 5px;
|
|
|
|
stroke: 2px;
|
|
|
|
rippleAreaPadding: 8px;
|
|
|
|
}
|
|
|
|
|
2017-09-13 17:01:23 +00:00
|
|
|
infoScroll: ScrollArea(defaultScrollArea) {
|
|
|
|
bottomsh: 0px;
|
|
|
|
topsh: 0px;
|
|
|
|
}
|
|
|
|
|
|
|
|
infoTopBarBackIcon: icon {{ "info_back", boxTitleCloseFg }};
|
|
|
|
infoTopBarBackIconOver: icon {{ "info_back", boxTitleCloseFgOver }};
|
|
|
|
infoTopBarHeight: boxLayerTitleHeight;
|
|
|
|
infoTopBarBack: IconButton(defaultIconButton) {
|
|
|
|
width: infoTopBarHeight;
|
|
|
|
height: infoTopBarHeight;
|
|
|
|
|
|
|
|
icon: infoTopBarBackIcon;
|
|
|
|
iconOver: infoTopBarBackIconOver;
|
2017-09-15 17:34:41 +00:00
|
|
|
iconPosition: point(10px, -1px);
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
rippleAreaPosition: point(6px, 6px);
|
|
|
|
rippleAreaSize: 44px;
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: windowBgOver;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
infoLayerTopBarHeight: boxLayerTitleHeight;
|
|
|
|
infoLayerTopBarBackIcon: icon {{ "info_back", boxTitleCloseFg }};
|
|
|
|
infoLayerTopBarBackIconOver: icon {{ "info_back", boxTitleCloseFgOver }};
|
|
|
|
infoLayerTopBarBack: IconButton(infoTopBarBack) {
|
|
|
|
width: infoLayerTopBarHeight;
|
|
|
|
height: infoLayerTopBarHeight;
|
|
|
|
|
|
|
|
icon: infoLayerTopBarBackIcon;
|
|
|
|
iconOver: infoLayerTopBarBackIconOver;
|
|
|
|
}
|
|
|
|
infoLayerTopBarCloseIcon: icon {{ "info_close", boxTitleCloseFg }};
|
|
|
|
infoLayerTopBarCloseIconOver: icon {{ "info_close", boxTitleCloseFgOver }};
|
|
|
|
infoLayerTopBarClose: IconButton(infoLayerTopBarBack) {
|
|
|
|
icon: infoLayerTopBarCloseIcon;
|
|
|
|
iconOver: infoLayerTopBarCloseIconOver;
|
|
|
|
}
|
|
|
|
infoLayerTopBar: InfoTopBar {
|
|
|
|
height: infoLayerTopBarHeight;
|
|
|
|
back: infoLayerTopBarBack;
|
|
|
|
title: boxTitle;
|
|
|
|
titlePosition: boxLayerTitlePosition;
|
|
|
|
bg: boxBg;
|
|
|
|
}
|
|
|
|
|
|
|
|
infoMinimalWidth: 320px;
|
|
|
|
infoDesiredWidth: 360px;
|
|
|
|
infoMinimalLayerMargin: 48px;
|
|
|
|
|
|
|
|
infoTabs: SettingsSlider(defaultTabsSlider) {
|
|
|
|
height: 55px;
|
|
|
|
barTop: 52px;
|
|
|
|
labelTop: 19px;
|
|
|
|
}
|
|
|
|
|
|
|
|
infoProfilePhotoSize: 72px;
|
2017-09-21 10:28:34 +00:00
|
|
|
infoProfilePhotoLeft: 19px;
|
|
|
|
infoProfilePhotoTop: 18px;
|
|
|
|
infoProfilePhotoBottom: 18px;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2017-09-21 19:21:33 +00:00
|
|
|
infoProfileStatusLeft: 109px;
|
|
|
|
infoProfileStatusRight: 20px;
|
2017-09-21 10:28:34 +00:00
|
|
|
infoProfileStatusTop: 58px;
|
2017-09-21 19:21:33 +00:00
|
|
|
infoProfileStatusLabel: FlatLabel(defaultFlatLabel) {
|
|
|
|
width: 0px;
|
2017-09-13 17:01:23 +00:00
|
|
|
maxHeight: 18px;
|
|
|
|
textFg: windowSubTextFg;
|
|
|
|
style: TextStyle(defaultTextStyle) {
|
|
|
|
font: normalFont;
|
|
|
|
linkFont: normalFont;
|
|
|
|
linkFontOver: normalFont;
|
|
|
|
}
|
|
|
|
palette: TextPalette(defaultTextPalette) {
|
|
|
|
linkFg: windowActiveTextFg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-21 19:21:33 +00:00
|
|
|
infoProfileNameLeft: infoProfileStatusLeft;
|
|
|
|
infoProfileNameRight: infoProfileStatusRight;
|
|
|
|
infoProfileNameTop: 32px;
|
|
|
|
infoProfileNameLabel: FlatLabel(infoProfileStatusLabel) {
|
|
|
|
maxHeight: 24px;
|
|
|
|
textFg: windowBoldFg;
|
|
|
|
style: TextStyle(defaultTextStyle) {
|
|
|
|
font: font(16px semibold);
|
|
|
|
linkFont: font(16px semibold);
|
|
|
|
linkFontOver: font(16px semibold underline);
|
|
|
|
}
|
|
|
|
}
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
infoProfileSkip: 12px;
|
|
|
|
|
2017-09-21 10:28:34 +00:00
|
|
|
infoProfileLabeledPadding: margins(79px, 9px, 30px, 7px);
|
2017-09-13 17:01:23 +00:00
|
|
|
infoProfileSeparatorPadding: margins(
|
2017-09-21 10:28:34 +00:00
|
|
|
77px,
|
2017-09-13 17:01:23 +00:00
|
|
|
infoProfileSkip,
|
|
|
|
0px,
|
|
|
|
infoProfileSkip);
|
|
|
|
|
|
|
|
infoIconFg: menuIconFg;
|
|
|
|
infoIconInformation: icon {{ "info_information", infoIconFg }};
|
|
|
|
infoIconMembers: icon {{ "info_members", infoIconFg }};
|
|
|
|
infoIconNotifications: icon {{ "info_notifications", infoIconFg }};
|
|
|
|
infoIconActions: icon {{ "info_actions", infoIconFg }};
|
2017-09-21 19:21:33 +00:00
|
|
|
infoIconMediaPhoto: icon {{ "info_media_photo", infoIconFg }};
|
|
|
|
infoInformationIconPosition: point(25px, 12px);
|
|
|
|
infoNotificationsIconPosition: point(20px, 5px);
|
|
|
|
infoSharedMediaIconPosition: point(20px, 24px);
|
2017-09-26 19:42:58 +00:00
|
|
|
infoIconPosition: point(20px, 15px);
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2017-09-21 10:28:34 +00:00
|
|
|
infoLabeledOneLine: FlatLabel(defaultFlatLabel) {
|
|
|
|
width: 0px; // No need to set minWidth in one-line text.
|
|
|
|
maxHeight: 20px;
|
|
|
|
style: TextStyle(defaultTextStyle) {
|
|
|
|
lineHeight: 19px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
infoLabelSkip: 2px;
|
|
|
|
infoLabel: FlatLabel(infoLabeledOneLine) {
|
2017-09-20 19:44:22 +00:00
|
|
|
textFg: windowSubTextFg;
|
2017-09-13 17:01:23 +00:00
|
|
|
}
|
2017-09-21 10:28:34 +00:00
|
|
|
infoLabeled: FlatLabel(infoLabeledOneLine) {
|
2017-09-20 19:44:22 +00:00
|
|
|
width: 180px;
|
2017-09-21 10:28:34 +00:00
|
|
|
maxHeight: 0px;
|
2017-09-20 19:44:22 +00:00
|
|
|
margin: margins(5px, 5px, 5px, 5px);
|
|
|
|
}
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2017-09-25 16:06:53 +00:00
|
|
|
infoBlockHeaderLabel: FlatLabel(infoProfileStatusLabel) {
|
|
|
|
textFg: windowBoldFg;
|
|
|
|
style: TextStyle(defaultTextStyle) {
|
|
|
|
font: semiboldFont;
|
|
|
|
linkFont: semiboldFont;
|
|
|
|
linkFontOver: semiboldFont;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
infoBlockHeaderPosition: point(79px, 22px);
|
|
|
|
|
2017-09-21 10:28:34 +00:00
|
|
|
infoProfileToggle: Toggle(defaultToggle) {
|
|
|
|
diameter: 16px;
|
|
|
|
width: 14px;
|
|
|
|
untoggledFg: menuIconFg;
|
|
|
|
}
|
|
|
|
infoProfileToggleOver: Toggle(infoProfileToggle) {
|
|
|
|
untoggledFg: menuIconFgOver;
|
|
|
|
}
|
2017-09-13 17:01:23 +00:00
|
|
|
infoProfileButton: InfoProfileButton {
|
|
|
|
textFg: windowBoldFg;
|
|
|
|
textFgOver: windowBoldFgOver;
|
|
|
|
textBg: windowBg;
|
|
|
|
textBgOver: windowBgOver;
|
|
|
|
|
|
|
|
font: semiboldFont;
|
|
|
|
|
2017-09-21 10:28:34 +00:00
|
|
|
height: 20px;
|
|
|
|
padding: margins(79px, 10px, 8px, 8px);
|
2017-09-13 17:01:23 +00:00
|
|
|
|
2017-09-21 10:28:34 +00:00
|
|
|
toggle: infoProfileToggle;
|
|
|
|
toggleOver: infoProfileToggleOver;
|
|
|
|
toggleSkip: 23px;
|
2017-09-13 17:01:23 +00:00
|
|
|
|
|
|
|
ripple: defaultRippleAnimation;
|
|
|
|
}
|
|
|
|
infoNotificationsButton: InfoProfileButton(infoProfileButton) {
|
2017-09-21 10:28:34 +00:00
|
|
|
padding: margins(79px, 13px, 8px, 9px);
|
2017-09-13 17:01:23 +00:00
|
|
|
}
|
|
|
|
infoMainButton: InfoProfileButton(infoProfileButton) {
|
|
|
|
textFg: lightButtonFg;
|
|
|
|
textFgOver: lightButtonFgOver;
|
|
|
|
}
|
2017-09-21 19:21:33 +00:00
|
|
|
infoSharedMediaCoverHeight: 62px;
|
|
|
|
infoSharedMediaButton: infoProfileButton;
|
|
|
|
infoSharedMediaBottomSkip: 12px;
|
2017-09-25 16:06:53 +00:00
|
|
|
|
2017-09-26 19:42:58 +00:00
|
|
|
infoBlockButton: InfoProfileButton(infoProfileButton) {
|
|
|
|
textFg: attentionButtonFg;
|
|
|
|
textFgOver: attentionButtonFgOver;
|
|
|
|
}
|
|
|
|
infoBlockButtonSkip: 8px;
|
|
|
|
|
2017-09-25 16:06:53 +00:00
|
|
|
infoMembersHeader: 56px;
|
2017-09-26 17:57:01 +00:00
|
|
|
infoMembersList: PeerList(defaultPeerList) {
|
|
|
|
item: PeerListItem(defaultPeerListItem) {
|
|
|
|
photoPosition: point(18px, 6px);
|
|
|
|
namePosition: point(79px, 11px);
|
|
|
|
statusPosition: point(79px, 31px);
|
|
|
|
}
|
2017-09-25 16:06:53 +00:00
|
|
|
}
|
|
|
|
infoMembersButtonPosition: point(12px, 9px);
|
|
|
|
infoMembersButtonIconPosition: point(6px, 6px);
|
|
|
|
infoMembersButton: IconButton(defaultIconButton) {
|
|
|
|
width: 44px;
|
|
|
|
height: 44px;
|
|
|
|
iconPosition: infoMembersButtonIconPosition;
|
|
|
|
rippleAreaPosition: point(0px, 0px);
|
|
|
|
rippleAreaSize: 44px;
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: windowBgOver;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
infoMembersAddMember: IconButton(infoMembersButton) {
|
|
|
|
icon: icon {{ "info_add_member", menuIconFg }};
|
|
|
|
iconOver: icon {{ "info_add_member", menuIconFgOver }};
|
|
|
|
}
|
|
|
|
infoMembersSearch: IconButton(infoMembersButton) {
|
|
|
|
icon: icon {{
|
|
|
|
"top_bar_search",
|
|
|
|
menuIconFg,
|
|
|
|
infoMembersButtonIconPosition
|
|
|
|
}};
|
|
|
|
iconOver: icon {{
|
|
|
|
"top_bar_search",
|
|
|
|
menuIconFgOver,
|
|
|
|
infoMembersButtonIconPosition
|
|
|
|
}};
|
|
|
|
iconPosition: point(0px, 0px);
|
|
|
|
}
|
|
|
|
infoMembersSearchActive: icon {
|
|
|
|
{ size(44px, 44px), windowBg },
|
|
|
|
{
|
|
|
|
"top_bar_search",
|
|
|
|
menuIconFgOver,
|
|
|
|
infoMembersButtonIconPosition
|
|
|
|
}
|
|
|
|
};
|
|
|
|
infoMembersSearchActiveLayer: icon {
|
|
|
|
{ size(44px, 44px), boxBg },
|
|
|
|
{
|
|
|
|
"top_bar_search",
|
|
|
|
menuIconFgOver,
|
|
|
|
infoMembersButtonIconPosition
|
|
|
|
}
|
|
|
|
};
|
|
|
|
infoMembersSearchField: FlatInput(defaultFlatInput) {
|
|
|
|
textColor: windowFg;
|
|
|
|
bgColor: topBarBg;
|
|
|
|
bgActive: topBarBg;
|
|
|
|
|
|
|
|
font: font(fsize);
|
|
|
|
|
|
|
|
borderWidth: 0px;
|
|
|
|
borderColor: topBarBg;
|
|
|
|
borderActive: topBarBg;
|
|
|
|
|
|
|
|
width: 100px;
|
|
|
|
height: 32px;
|
|
|
|
textMrg: margins(0px, 0px, 0px, 0px);
|
|
|
|
}
|
|
|
|
infoMembersCancelSearch: CrossButton {
|
|
|
|
width: 44px;
|
|
|
|
height: 44px;
|
|
|
|
|
|
|
|
cross: CrossAnimation {
|
|
|
|
size: 44px;
|
|
|
|
skip: 16px;
|
|
|
|
stroke: 2px;
|
|
|
|
minScale: 0.3;
|
|
|
|
}
|
|
|
|
crossFg: menuIconFg;
|
|
|
|
crossFgOver: menuIconFgOver;
|
|
|
|
crossPosition: point(0px, 0px);
|
|
|
|
|
|
|
|
duration: 150;
|
|
|
|
loadingPeriod: 1000;
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: windowBgOver;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
infoMembersSearchTop: 15px;
|