tdesktop/Telegram/SourceFiles/calls/calls.style

346 lines
8.9 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 "window/window.style";
CallSignalBars {
width: pixels;
radius: pixels;
skip: pixels;
color: color;
inactiveOpacity: double;
}
callRadius: 6px;
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;
}
callWidthMin: 380px;
callHeightMin: 440px;
callWidth: 720px;
callHeight: 540px;
callBottomControlsHeight: 85px;
CallBodyLayout {
height: pixels;
photoTop: pixels;
photoSize: pixels;
nameTop: pixels;
statusTop: pixels;
}
callBodyLayout: CallBodyLayout {
height: 284px;
photoTop: 21px;
photoSize: 180px;
nameTop: 221px;
statusTop: 254px;
}
callBodyWithPreview: CallBodyLayout {
height: 185px;
photoTop: 21px;
photoSize: 100px;
nameTop: 132px;
statusTop: 163px;
}
callOutgoingPreviewMin: size(360px, 120px);
callOutgoingPreview: size(540px, 180px); // default, for height == callHeight.
callOutgoingPreviewMax: size(1080px, 360px);
callOutgoingDefaultSize: size(160px, 110px);
callFingerprintPadding: margins(9px, 4px, 9px, 5px);
callFingerprintTop: 11px;
callFingerprintSkip: 3px;
callFingerprintBottom: -16px;
callButton: IconButton {
width: 64px;
height: 64px;
iconPosition: point(-1px, -1px);
rippleAreaPosition: point(10px, 10px);
rippleAreaSize: 44px;
ripple: defaultRippleAnimation;
}
callButtonLabel: FlatLabel(defaultFlatLabel) {
textFg: callNameFg;
}
callAnswer: CallButton {
button: IconButton(callButton) {
icon: icon {{ "call_answer", callIconFg }};
ripple: RippleAnimation(defaultRippleAnimation) {
color: callAnswerRipple;
}
}
bg: callAnswerBg;
angle: 135.;
outerRadius: 12px;
outerBg: callAnswerBgOuter;
label: callButtonLabel;
}
callHangup: CallButton {
button: IconButton(callButton) {
icon: icon {{ "call_discard", callIconFg }};
ripple: RippleAnimation(defaultRippleAnimation) {
color: callHangupRipple;
}
}
bg: callHangupBg;
outerBg: callHangupBg;
label: callButtonLabel;
}
callCancel: CallButton {
button: IconButton(callButton) {
icon: icon {{ "box_button_close", callCancelFg }};
ripple: RippleAnimation(defaultRippleAnimation) {
color: callCancelRipple;
}
}
bg: callCancelBg;
outerBg: callCancelBg;
label: callButtonLabel;
}
callMuteToggle: CallButton {
button: IconButton(callButton) {
icon: icon {{ "call_record_active", callIconFg }};
ripple: RippleAnimation(defaultRippleAnimation) {
color: callMuteRipple;
}
}
bg: callMuteRipple;
outerBg: callMuteRipple;
label: callButtonLabel;
}
callUnmuteIcon: icon {{ "call_record_muted", callIconFg }};
callCameraToggle: CallButton(callMuteToggle) {
button: IconButton(callButton) {
icon: icon {{ "call_camera_active", callIconFg }};
ripple: RippleAnimation(defaultRippleAnimation) {
color: callMuteRipple;
}
}
}
callNoCameraIcon: icon {{ "call_camera_muted", callIconFg }};
callName: FlatLabel(defaultFlatLabel) {
minWidth: 260px;
maxHeight: 30px;
textFg: callNameFg;
align: align(top);
style: TextStyle(defaultTextStyle) {
font: font(21px semibold);
linkFont: font(21px semibold);
linkFontOver: font(21px semibold underline);
}
}
callStatus: FlatLabel(defaultFlatLabel) {
minWidth: 260px;
maxHeight: 20px;
textFg: callStatusFg;
align: align(top);
style: TextStyle(defaultTextStyle) {
font: font(14px);
linkFont: font(14px);
linkFontOver: font(14px underline);
}
}
callBarHeight: 38px;
callBarMuteToggle: IconButton {
width: 41px;
height: 38px;
icon: icon {{ "call_record_active", callBarFg }};
iconPosition: point(3px, 2px);
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 }};
iconPosition: point(3px, 1px);
}
callBarLabel: LabelSimple(defaultLabelSimple) {
font: semiboldFont;
textFg: callBarFg;
}
callBarInfoLabel: FlatLabel(defaultFlatLabel) {
maxHeight: 28px;
align: align(top);
textFg: callBarFg;
style: TextStyle(defaultTextStyle) {
font: semiboldFont;
}
}
callBarLabelTop: 10px;
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;
rippleAreaPosition: point(0px, 8px);
rippleAreaSize: 40px;
}
callRatingPadding: margins(24px, 12px, 24px, 0px);
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 }};
callRatingStarTop: 4px;
callRatingComment: InputField(defaultInputField) {
textMargins: margins(1px, 26px, 1px, 4px);
heightMax: 135px;
}
callRatingCommentTop: 8px;
callDebugPadding: margins(24px, 0px, 24px, 0px);
callDebugLabel: FlatLabel(defaultFlatLabel) {
margin: callDebugPadding;
}
callPanelDuration: 150;
callPanelSignalBars: CallSignalBars {
width: 3px;
radius: 1px;
skip: 1px;
color: callNameFg;
inactiveOpacity: 0.5;
}
callBarSignalBars: CallSignalBars(callPanelSignalBars) {
color: callBarFg;
}
callSignalMargin: 8px;
callSignalPadding: 4px;
callTitle: WindowTitle(defaultWindowTitle) {
height: 0px;
bg: callBgOpaque;
bgActive: callBgOpaque;
fg: transparent;
fgActive: transparent;
minimize: IconButton(windowTitleButton) {
icon: icon {
{ size(24px, 21px), callBgButton },
{ "title_button_minimize", callStatusFg, point(4px, 4px) },
};
iconOver: icon {
{ size(24px, 21px), callBgButton },
{ size(24px, 21px), callMuteRipple },
{ "title_button_minimize", callStatusFg, point(4px, 4px) },
};
}
minimizeIconActive: icon {
{ size(24px, 21px), callBgButton },
{ "title_button_minimize", callStatusFg, point(4px, 4px) },
};
minimizeIconActiveOver: icon {
{ size(24px, 21px), callBgButton },
{ size(24px, 21px), callMuteRipple },
{ "title_button_minimize", callStatusFg, point(4px, 4px) },
};
maximize: IconButton(windowTitleButton) {
icon: icon {
{ size(24px, 21px), callBgButton },
{ "title_button_maximize", callStatusFg, point(4px, 4px) },
};
iconOver: icon {
{ size(24px, 21px), callBgButton },
{ size(24px, 21px), callMuteRipple },
{ "title_button_maximize", callStatusFg, point(4px, 4px) },
};
}
maximizeIconActive: icon {
{ size(24px, 21px), callBgButton },
{ "title_button_maximize", callStatusFg, point(4px, 4px) },
};
maximizeIconActiveOver: icon {
{ size(24px, 21px), callBgButton },
{ size(24px, 21px), callMuteRipple },
{ "title_button_maximize", callStatusFg, point(4px, 4px) },
};
restoreIcon: icon {
{ size(24px, 21px), callBgButton },
{ "title_button_restore", callStatusFg, point(4px, 4px) },
};
restoreIconOver: icon {
{ size(24px, 21px), callBgButton },
{ size(24px, 21px), callMuteRipple },
{ "title_button_restore", callStatusFg, point(4px, 4px) },
};
restoreIconActive: icon {
{ size(24px, 21px), callBgButton },
{ "title_button_restore", callStatusFg, point(4px, 4px) },
};
restoreIconActiveOver: icon {
{ size(24px, 21px), callBgButton },
{ size(24px, 21px), callMuteRipple },
{ "title_button_restore", callStatusFg, point(4px, 4px) },
};
close: IconButton(windowTitleButtonClose) {
icon: icon {
{ size(24px, 21px), callBgButton },
{ "title_button_close", callStatusFg, point(5px, 4px) },
};
iconOver: icon {
{ size(25px, 21px), titleButtonCloseBgOver },
{ "title_button_close", titleButtonCloseFgOver, point(5px, 4px) },
};
}
closeIconActive: icon {
{ size(24px, 21px), callBgButton },
{ "title_button_close", callStatusFg, point(5px, 4px) },
};
closeIconActiveOver: icon {
{ size(25px, 21px), titleButtonCloseBgActiveOver },
{ "title_button_close", titleButtonCloseFgActiveOver, point(5px, 4px) },
};
}