2017-04-19 20:25:48 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2017-04-19 20:25:48 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2017-04-19 20:25:48 +00:00
|
|
|
*/
|
2019-09-17 16:13:12 +00:00
|
|
|
using "ui/basic.style";
|
2017-04-19 20:25:48 +00:00
|
|
|
|
|
|
|
using "ui/widgets/widgets.style";
|
2017-04-27 19:04:45 +00:00
|
|
|
using "window/window.style";
|
2017-04-19 20:25:48 +00:00
|
|
|
|
2018-05-27 08:24:47 +00:00
|
|
|
CallSignalBars {
|
|
|
|
width: pixels;
|
|
|
|
radius: pixels;
|
|
|
|
skip: pixels;
|
|
|
|
color: color;
|
|
|
|
inactiveOpacity: double;
|
|
|
|
}
|
|
|
|
|
2018-03-31 01:45:40 +00:00
|
|
|
callRadius: 6px;
|
2017-04-19 20:25:48 +00:00
|
|
|
callShadow: Shadow {
|
|
|
|
left: icon {{ "call_shadow_left", windowShadowFg }};
|
|
|
|
topLeft: icon {{ "call_shadow_top_left", windowShadowFg }};
|
|
|
|
top: icon {{ "call_shadow_top", windowShadowFg }};
|
|
|
|
topRight: icon {{ "call_shadow_top_left-flip_horizontal", windowShadowFg }};
|
|
|
|
right: icon {{ "call_shadow_left-flip_horizontal", windowShadowFg }};
|
|
|
|
bottomRight: icon {{ "call_shadow_top_left-flip_vertical-flip_horizontal", windowShadowFg }};
|
|
|
|
bottom: icon {{ "call_shadow_top-flip_vertical", windowShadowFg }};
|
|
|
|
bottomLeft: icon {{ "call_shadow_top_left-flip_vertical", windowShadowFg }};
|
|
|
|
extend: margins(9px, 8px, 9px, 10px);
|
|
|
|
fallback: windowShadowFgFallback;
|
|
|
|
}
|
|
|
|
|
2020-08-14 06:27:38 +00:00
|
|
|
callWidthMin: 300px;
|
2020-08-07 13:28:41 +00:00
|
|
|
callHeightMin: 440px;
|
2020-08-07 14:33:34 +00:00
|
|
|
callWidth: 720px;
|
2020-08-07 13:28:41 +00:00
|
|
|
callHeight: 540px;
|
|
|
|
|
2020-08-14 08:32:05 +00:00
|
|
|
callBottomControlsHeight: 87px;
|
2020-08-07 13:28:41 +00:00
|
|
|
|
|
|
|
CallBodyLayout {
|
|
|
|
height: pixels;
|
|
|
|
photoTop: pixels;
|
|
|
|
photoSize: pixels;
|
|
|
|
nameTop: pixels;
|
|
|
|
statusTop: pixels;
|
2020-08-13 15:48:20 +00:00
|
|
|
muteStroke: pixels;
|
|
|
|
muteSize: pixels;
|
|
|
|
mutePosition: point;
|
2020-08-07 13:28:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
callBodyLayout: CallBodyLayout {
|
|
|
|
height: 284px;
|
|
|
|
photoTop: 21px;
|
2020-08-13 14:45:40 +00:00
|
|
|
photoSize: 160px;
|
2020-08-07 13:28:41 +00:00
|
|
|
nameTop: 221px;
|
|
|
|
statusTop: 254px;
|
2020-08-13 15:48:20 +00:00
|
|
|
muteStroke: 3px;
|
|
|
|
muteSize: 36px;
|
|
|
|
mutePosition: point(142px, 135px);
|
2020-08-07 13:28:41 +00:00
|
|
|
}
|
|
|
|
callBodyWithPreview: CallBodyLayout {
|
|
|
|
height: 185px;
|
|
|
|
photoTop: 21px;
|
|
|
|
photoSize: 100px;
|
|
|
|
nameTop: 132px;
|
|
|
|
statusTop: 163px;
|
2020-08-13 15:48:20 +00:00
|
|
|
muteStroke: 3px;
|
|
|
|
muteSize: 0px;
|
|
|
|
mutePosition: point(90px, 84px);
|
2020-08-07 13:28:41 +00:00
|
|
|
}
|
2020-08-13 15:48:20 +00:00
|
|
|
callMutedPeerIcon: icon {{ "calls_mute_userpic", callIconFg }};
|
2020-08-07 13:28:41 +00:00
|
|
|
|
|
|
|
callOutgoingPreviewMin: size(360px, 120px);
|
|
|
|
callOutgoingPreview: size(540px, 180px); // default, for height == callHeight.
|
2020-08-13 11:16:39 +00:00
|
|
|
callOutgoingPreviewMax: size(1620px, 540px);
|
2020-08-04 09:06:48 +00:00
|
|
|
callOutgoingDefaultSize: size(160px, 110px);
|
|
|
|
|
2020-08-13 11:16:39 +00:00
|
|
|
callInnerPadding: 12px;
|
|
|
|
|
2020-08-07 13:28:41 +00:00
|
|
|
callFingerprintPadding: margins(9px, 4px, 9px, 5px);
|
|
|
|
callFingerprintTop: 11px;
|
|
|
|
callFingerprintSkip: 3px;
|
|
|
|
callFingerprintBottom: -16px;
|
|
|
|
|
2020-08-14 08:32:05 +00:00
|
|
|
callTooltipMutedIcon: icon{{ "calls_mute_tooltip", toastFg }};
|
|
|
|
callTooltipMutedIconPosition: point(8px, 4px);
|
|
|
|
callTooltipPadding: margins(41px, 6px, 15px, 7px);
|
|
|
|
|
2017-04-19 20:25:48 +00:00
|
|
|
callButton: IconButton {
|
2020-08-14 06:27:38 +00:00
|
|
|
width: 68px;
|
|
|
|
height: 68px;
|
2017-04-19 20:25:48 +00:00
|
|
|
|
2017-04-29 18:00:27 +00:00
|
|
|
iconPosition: point(-1px, -1px);
|
2017-04-19 20:25:48 +00:00
|
|
|
|
2020-08-14 06:27:38 +00:00
|
|
|
rippleAreaPosition: point(12px, 12px);
|
2020-08-07 13:28:41 +00:00
|
|
|
rippleAreaSize: 44px;
|
2017-04-19 20:25:48 +00:00
|
|
|
ripple: defaultRippleAnimation;
|
|
|
|
}
|
2020-08-07 13:28:41 +00:00
|
|
|
callButtonLabel: FlatLabel(defaultFlatLabel) {
|
|
|
|
textFg: callNameFg;
|
|
|
|
}
|
2017-04-19 20:25:48 +00:00
|
|
|
|
|
|
|
callAnswer: CallButton {
|
|
|
|
button: IconButton(callButton) {
|
|
|
|
icon: icon {{ "call_answer", callIconFg }};
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: callAnswerRipple;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bg: callAnswerBg;
|
2017-05-05 10:14:40 +00:00
|
|
|
angle: 135.;
|
2017-05-07 19:09:20 +00:00
|
|
|
outerRadius: 12px;
|
|
|
|
outerBg: callAnswerBgOuter;
|
2020-08-07 13:28:41 +00:00
|
|
|
label: callButtonLabel;
|
2017-04-19 20:25:48 +00:00
|
|
|
}
|
|
|
|
callHangup: CallButton {
|
|
|
|
button: IconButton(callButton) {
|
|
|
|
icon: icon {{ "call_discard", callIconFg }};
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: callHangupRipple;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bg: callHangupBg;
|
2017-05-07 19:09:20 +00:00
|
|
|
outerBg: callHangupBg;
|
2020-08-07 13:28:41 +00:00
|
|
|
label: callButtonLabel;
|
2017-04-19 20:25:48 +00:00
|
|
|
}
|
2017-04-29 18:00:27 +00:00
|
|
|
callCancel: CallButton {
|
|
|
|
button: IconButton(callButton) {
|
2020-08-13 14:45:40 +00:00
|
|
|
icon: icon {{ "box_button_close", callIconFgActive }};
|
2017-04-29 18:00:27 +00:00
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
2020-08-13 14:45:40 +00:00
|
|
|
color: callIconActiveRipple;
|
2017-04-29 18:00:27 +00:00
|
|
|
}
|
|
|
|
}
|
2020-08-13 14:45:40 +00:00
|
|
|
bg: callIconBgActive;
|
|
|
|
outerBg: callIconBgActive;
|
2020-08-07 13:28:41 +00:00
|
|
|
label: callButtonLabel;
|
2017-04-29 18:00:27 +00:00
|
|
|
}
|
2020-08-13 14:45:40 +00:00
|
|
|
callMicrophoneMute: CallButton {
|
2020-08-07 13:28:41 +00:00
|
|
|
button: IconButton(callButton) {
|
|
|
|
icon: icon {{ "call_record_active", callIconFg }};
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: callMuteRipple;
|
|
|
|
}
|
2017-04-19 20:25:48 +00:00
|
|
|
}
|
2020-08-13 14:45:40 +00:00
|
|
|
bg: callIconBg;
|
2020-08-07 13:28:41 +00:00
|
|
|
outerBg: callMuteRipple;
|
|
|
|
label: callButtonLabel;
|
2017-04-19 20:25:48 +00:00
|
|
|
}
|
2020-08-13 14:45:40 +00:00
|
|
|
callMicrophoneUnmute: CallButton(callMicrophoneMute) {
|
|
|
|
button: IconButton(callButton) {
|
|
|
|
icon: icon {{ "call_record_muted", callIconFgActive }};
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: callIconActiveRipple;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bg: callIconBgActive;
|
|
|
|
}
|
|
|
|
callCameraMute: CallButton(callMicrophoneMute) {
|
2020-08-07 13:28:41 +00:00
|
|
|
button: IconButton(callButton) {
|
|
|
|
icon: icon {{ "call_camera_active", callIconFg }};
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: callMuteRipple;
|
|
|
|
}
|
2020-07-16 16:23:55 +00:00
|
|
|
}
|
|
|
|
}
|
2020-08-13 14:45:40 +00:00
|
|
|
callCameraUnmute: CallButton(callMicrophoneUnmute) {
|
|
|
|
button: IconButton(callButton) {
|
|
|
|
icon: icon {{ "call_camera_muted", callIconFgActive }};
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: callIconActiveRipple;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-08-14 08:32:05 +00:00
|
|
|
callBottomShadowSize: 124px;
|
2017-04-19 20:25:48 +00:00
|
|
|
|
2017-04-25 16:45:41 +00:00
|
|
|
callName: FlatLabel(defaultFlatLabel) {
|
2017-11-10 15:45:10 +00:00
|
|
|
minWidth: 260px;
|
2017-05-04 12:29:32 +00:00
|
|
|
maxHeight: 30px;
|
2017-04-25 16:45:41 +00:00
|
|
|
textFg: callNameFg;
|
|
|
|
align: align(top);
|
|
|
|
style: TextStyle(defaultTextStyle) {
|
|
|
|
font: font(21px semibold);
|
|
|
|
linkFont: font(21px semibold);
|
|
|
|
linkFontOver: font(21px semibold underline);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
callStatus: FlatLabel(defaultFlatLabel) {
|
2017-11-10 15:45:10 +00:00
|
|
|
minWidth: 260px;
|
2017-04-25 16:45:41 +00:00
|
|
|
maxHeight: 20px;
|
|
|
|
textFg: callStatusFg;
|
|
|
|
align: align(top);
|
|
|
|
style: TextStyle(defaultTextStyle) {
|
|
|
|
font: font(14px);
|
|
|
|
linkFont: font(14px);
|
|
|
|
linkFontOver: font(14px underline);
|
|
|
|
}
|
|
|
|
}
|
2020-08-14 08:32:05 +00:00
|
|
|
callRemoteAudioMute: FlatLabel(callStatus) {
|
|
|
|
minWidth: 0px;
|
|
|
|
textFg: toastFg;
|
|
|
|
}
|
|
|
|
callRemoteAudioMuteSkip: 12px;
|
2017-04-25 16:45:41 +00:00
|
|
|
|
2017-04-25 20:36:04 +00:00
|
|
|
callBarHeight: 38px;
|
|
|
|
callBarMuteToggle: IconButton {
|
|
|
|
width: 41px;
|
|
|
|
height: 38px;
|
|
|
|
|
|
|
|
icon: icon {{ "call_record_active", callBarFg }};
|
2020-07-16 16:23:55 +00:00
|
|
|
iconPosition: point(3px, 2px);
|
2017-04-25 20:36:04 +00:00
|
|
|
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: callBarMuteRipple;
|
|
|
|
}
|
|
|
|
rippleAreaPosition: point(5px, 3px);
|
|
|
|
rippleAreaSize: 32px;
|
|
|
|
}
|
|
|
|
callBarUnmuteIcon: icon {{ "call_record_muted", callBarFg }};
|
|
|
|
callBarRightSkip: 12px;
|
|
|
|
callBarSkip: 10px;
|
|
|
|
callBarHangup: IconButton(callBarMuteToggle) {
|
|
|
|
icon: icon {{ "call_discard", callBarFg }};
|
2020-07-16 16:23:55 +00:00
|
|
|
iconPosition: point(3px, 1px);
|
2017-04-25 20:36:04 +00:00
|
|
|
}
|
|
|
|
callBarLabel: LabelSimple(defaultLabelSimple) {
|
|
|
|
font: semiboldFont;
|
|
|
|
textFg: callBarFg;
|
|
|
|
}
|
2017-05-14 19:44:50 +00:00
|
|
|
callBarInfoLabel: FlatLabel(defaultFlatLabel) {
|
|
|
|
maxHeight: 28px;
|
|
|
|
align: align(top);
|
|
|
|
textFg: callBarFg;
|
|
|
|
style: TextStyle(defaultTextStyle) {
|
|
|
|
font: semiboldFont;
|
|
|
|
}
|
|
|
|
}
|
2017-04-25 20:36:04 +00:00
|
|
|
callBarLabelTop: 10px;
|
2017-04-27 19:04:45 +00:00
|
|
|
|
|
|
|
callArrowPosition: point(-2px, 1px);
|
|
|
|
callArrowIn: icon {{ "call_arrow_in", callArrowFg }};
|
|
|
|
callArrowOut: icon {{ "call_arrow_out", callArrowFg }};
|
|
|
|
callArrowMissed: icon {{ "call_arrow_in", callArrowMissedFg }};
|
|
|
|
callArrowSkip: 4px;
|
|
|
|
callReDial: IconButton {
|
|
|
|
width: 40px;
|
|
|
|
height: 56px;
|
|
|
|
|
|
|
|
icon: mainMenuCalls;
|
|
|
|
iconOver: mainMenuCallsOver;
|
|
|
|
iconPosition: point(-1px, -1px);
|
|
|
|
|
|
|
|
ripple: defaultRippleAnimation;
|
2017-04-28 12:54:40 +00:00
|
|
|
rippleAreaPosition: point(0px, 8px);
|
|
|
|
rippleAreaSize: 40px;
|
2017-04-27 19:04:45 +00:00
|
|
|
}
|
2017-05-02 11:56:39 +00:00
|
|
|
|
2017-05-10 08:01:34 +00:00
|
|
|
callRatingPadding: margins(24px, 12px, 24px, 0px);
|
2017-05-02 11:56:39 +00:00
|
|
|
callRatingStar: IconButton {
|
|
|
|
width: 36px;
|
|
|
|
height: 36px;
|
|
|
|
|
|
|
|
icon: icon {{ "call_rating", windowSubTextFg }};
|
|
|
|
iconPosition: point(-1px, -1px);
|
|
|
|
|
|
|
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
|
|
|
color: windowBgOver;
|
|
|
|
}
|
|
|
|
rippleAreaPosition: point(0px, 0px);
|
|
|
|
rippleAreaSize: 36px;
|
|
|
|
}
|
|
|
|
callRatingStarFilled: icon {{ "call_rating_filled", lightButtonFg }};
|
2017-05-09 19:33:50 +00:00
|
|
|
callRatingStarTop: 4px;
|
2017-05-02 11:56:39 +00:00
|
|
|
callRatingComment: InputField(defaultInputField) {
|
|
|
|
textMargins: margins(1px, 26px, 1px, 4px);
|
|
|
|
heightMax: 135px;
|
|
|
|
}
|
2017-05-09 19:33:50 +00:00
|
|
|
callRatingCommentTop: 8px;
|
2017-05-04 12:28:37 +00:00
|
|
|
|
2017-09-20 19:44:22 +00:00
|
|
|
callDebugPadding: margins(24px, 0px, 24px, 0px);
|
2017-05-04 12:28:37 +00:00
|
|
|
callDebugLabel: FlatLabel(defaultFlatLabel) {
|
2017-09-20 19:44:22 +00:00
|
|
|
margin: callDebugPadding;
|
2017-05-04 12:28:37 +00:00
|
|
|
}
|
2017-05-05 10:14:40 +00:00
|
|
|
callPanelDuration: 150;
|
2018-05-27 08:24:47 +00:00
|
|
|
|
|
|
|
callPanelSignalBars: CallSignalBars {
|
|
|
|
width: 3px;
|
|
|
|
radius: 1px;
|
|
|
|
skip: 1px;
|
|
|
|
color: callNameFg;
|
|
|
|
inactiveOpacity: 0.5;
|
|
|
|
}
|
|
|
|
callBarSignalBars: CallSignalBars(callPanelSignalBars) {
|
|
|
|
color: callBarFg;
|
|
|
|
}
|
|
|
|
callSignalMargin: 8px;
|
|
|
|
callSignalPadding: 4px;
|
2020-08-12 13:35:31 +00:00
|
|
|
|
2020-08-13 13:58:54 +00:00
|
|
|
callTitleButton: IconButton {
|
|
|
|
width: 34px;
|
|
|
|
height: 30px;
|
|
|
|
iconPosition: point(0px, 0px);
|
|
|
|
}
|
|
|
|
callTitleMinimizeIcon: icon {
|
|
|
|
{ "calls_minimize_shadow", windowShadowFg },
|
|
|
|
{ "calls_minimize_main", callNameFg },
|
|
|
|
};
|
|
|
|
callTitleMinimizeIconOver: icon {
|
|
|
|
{ size(34px, 30px), callBgButton },
|
|
|
|
{ size(34px, 30px), callMuteRipple },
|
|
|
|
{ "calls_minimize_shadow", windowShadowFg },
|
|
|
|
{ "calls_minimize_main", callNameFg },
|
|
|
|
};
|
|
|
|
callTitleMaximizeIcon: icon {
|
|
|
|
{ "calls_maximize_shadow", windowShadowFg },
|
|
|
|
{ "calls_maximize_main", callNameFg },
|
|
|
|
};
|
|
|
|
callTitleMaximizeIconOver: icon {
|
|
|
|
{ size(34px, 30px), callBgButton },
|
|
|
|
{ size(34px, 30px), callMuteRipple },
|
|
|
|
{ "calls_maximize_shadow", windowShadowFg },
|
|
|
|
{ "calls_maximize_main", callNameFg },
|
|
|
|
};
|
|
|
|
callTitleRestoreIcon: icon {
|
|
|
|
{ "calls_restore_shadow", windowShadowFg },
|
|
|
|
{ "calls_restore_main", callNameFg },
|
|
|
|
};
|
|
|
|
callTitleRestoreIconOver: icon {
|
|
|
|
{ size(34px, 30px), callBgButton },
|
|
|
|
{ size(34px, 30px), callMuteRipple },
|
|
|
|
{ "calls_restore_shadow", windowShadowFg },
|
|
|
|
{ "calls_restore_main", callNameFg },
|
|
|
|
};
|
|
|
|
callTitleCloseIcon: icon {
|
|
|
|
{ "calls_close_shadow", windowShadowFg },
|
|
|
|
{ "calls_close_main", callNameFg },
|
|
|
|
};
|
|
|
|
callTitleCloseIconOver: icon {
|
|
|
|
{ size(34px, 30px), titleButtonCloseBgOver },
|
|
|
|
{ "calls_close_shadow", windowShadowFg },
|
|
|
|
{ "calls_close_main", titleButtonCloseFgOver },
|
|
|
|
};
|
2020-08-12 13:35:31 +00:00
|
|
|
callTitle: WindowTitle(defaultWindowTitle) {
|
2020-08-12 16:58:05 +00:00
|
|
|
height: 0px;
|
2020-08-12 13:35:31 +00:00
|
|
|
bg: callBgOpaque;
|
|
|
|
bgActive: callBgOpaque;
|
|
|
|
fg: transparent;
|
|
|
|
fgActive: transparent;
|
2020-08-13 13:58:54 +00:00
|
|
|
minimize: IconButton(callTitleButton) {
|
|
|
|
icon: callTitleMinimizeIcon;
|
|
|
|
iconOver: callTitleMinimizeIconOver;
|
2020-08-12 13:35:31 +00:00
|
|
|
}
|
2020-08-13 13:58:54 +00:00
|
|
|
minimizeIconActive: callTitleMinimizeIcon;
|
|
|
|
minimizeIconActiveOver: callTitleMinimizeIconOver;
|
|
|
|
maximize: IconButton(callTitleButton) {
|
|
|
|
icon: callTitleMaximizeIcon;
|
|
|
|
iconOver: callTitleMaximizeIconOver;
|
2020-08-12 13:35:31 +00:00
|
|
|
}
|
2020-08-13 13:58:54 +00:00
|
|
|
maximizeIconActive: callTitleMaximizeIcon;
|
|
|
|
maximizeIconActiveOver: callTitleMaximizeIconOver;
|
|
|
|
restoreIcon: callTitleRestoreIcon;
|
|
|
|
restoreIconOver: callTitleRestoreIconOver;
|
|
|
|
restoreIconActive: callTitleRestoreIcon;
|
|
|
|
restoreIconActiveOver: callTitleRestoreIconOver;
|
|
|
|
close: IconButton(callTitleButton) {
|
|
|
|
icon: callTitleCloseIcon;
|
|
|
|
iconOver: callTitleCloseIconOver;
|
2020-08-12 13:35:31 +00:00
|
|
|
}
|
2020-08-13 13:58:54 +00:00
|
|
|
closeIconActive: callTitleCloseIcon;
|
|
|
|
closeIconActiveOver: callTitleCloseIconOver;
|
2020-08-12 13:35:31 +00:00
|
|
|
}
|