tdesktop/Telegram/SourceFiles/media/player/media_player.style

308 lines
8.7 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 "overview/overview.style";
mediaPlayerButton: MediaPlayerButton {
playPosition: point(2px, 0px);
playOuter: size(17px, 15px);
pausePosition: point(1px, 1px);
pauseOuter: size(15px, 15px);
pauseStroke: 5px;
cancelPosition: point(1px, 1px);
cancelOuter: size(15px, 15px);
cancelStroke: 3px;
rippleAreaPosition: point(0px, 5px);
rippleAreaSize: 25px;
ripple: RippleAnimation(defaultRippleAnimation) {
color: lightButtonBgOver;
}
}
mediaPlayerButtonSize: size(25px, 30px);
mediaPlayerButtonPosition: point(5px, 10px);
mediaPlayerWideWidth: 460px;
mediaPlayerHeight: 35px;
mediaPlayerPadding: 8px;
mediaPlayerNameTop: 22px;
mediaPlayerPlayLeft: 9px;
mediaPlayerPlaySkip: 1px;
mediaPlayerPlayTop: 0px;
mediaPlayerCloseRight: 0px;
mediaPlayerName: FlatLabel(defaultFlatLabel) {
maxHeight: 20px;
}
mediaPlayerTime: LabelSimple(defaultLabelSimple) {
textFg: windowSubTextFg;
}
mediaPlayerRepeatButton: IconButton {
width: 30px;
height: 34px;
icon: icon {
{ "player/player_repeat", mediaPlayerActiveFg }
};
iconPosition: point(3px, 6px);
rippleAreaPosition: point(2px, 5px);
rippleAreaSize: 26px;
ripple: RippleAnimation(defaultRippleAnimation) {
color: lightButtonBgOver;
}
}
mediaPlayerRepeatDisabledIcon: icon {
{ "player/player_repeat", menuIconFg }
};
mediaPlayerRepeatDisabledIconOver: icon {
{ "player/player_repeat", menuIconFgOver }
};
mediaPlayerRepeatOneIcon: icon {
{ "player/player_repeat_single", mediaPlayerActiveFg }
};
mediaPlayerRepeatOneDisabledIcon: icon {
{ "player/player_repeat_single", menuIconFg }
};
mediaPlayerRepeatOneDisabledIconOver: icon {
{ "player/player_repeat_single", menuIconFgOver }
};
mediaPlayerReverseIcon: icon {
{ "player/player_order", mediaPlayerActiveFg }
};
mediaPlayerReverseDisabledIcon: icon {
{ "player/player_order", menuIconFg }
};
mediaPlayerReverseDisabledIconOver: icon {
{ "player/player_order", menuIconFgOver }
};
mediaPlayerShuffleIcon: icon {
{ "player/player_shuffle", mediaPlayerActiveFg }
};
mediaPlayerRepeatDisabledRippleBg: windowBgOver;
mediaPlayerPlayButton: IconButton(mediaPlayerRepeatButton) {
width: 24px;
icon: icon{
{ "player/player_play", mediaPlayerActiveFg }
};
iconPosition: point(0px, 5px);
rippleAreaPosition: point(0px, 5px);
rippleAreaSize: 24px;
}
mediaPlayerPauseIcon: icon{
{ "player/player_pause", mediaPlayerActiveFg }
};
mediaPlayerCancelIcon: icon{
{ "player/panel_close", mediaPlayerActiveFg }
};
mediaPlayerSpeedButton: IconButton {
width: 31px;
height: 30px;
icon: icon {
{ "player/voice_speed/voice_speed2", mediaPlayerActiveFg }
};
iconPosition: point(3px, 10px);
rippleAreaPosition: point(3px, 5px);
rippleAreaSize: 25px;
ripple: RippleAnimation(defaultRippleAnimation) {
color: lightButtonBgOver;
}
}
mediaPlayerSpeedDisabledIcon: icon {
{ "player/voice_speed/voice_speed2", menuIconFg }
};
mediaPlayerSpeedDisabledIconOver: icon {
{ "player/voice_speed/voice_speed2", menuIconFgOver }
};
mediaPlayerSpeedSlowIcon: icon {
{ "player/voice_speed/voice_speed0.5", mediaPlayerActiveFg }
};
mediaPlayerSpeedSlowDisabledIcon: icon {
{ "player/voice_speed/voice_speed0.5", menuIconFg }
};
mediaPlayerSpeedSlowDisabledIconOver: icon {
{ "player/voice_speed/voice_speed0.5", menuIconFgOver }
};
mediaPlayerSpeedFastIcon: icon {
{ "player/voice_speed/voice_speed1.5", mediaPlayerActiveFg }
};
mediaPlayerSpeedFastDisabledIcon: icon {
{ "player/voice_speed/voice_speed1.5", menuIconFg }
};
mediaPlayerSpeedFastDisabledIconOver: icon {
{ "player/voice_speed/voice_speed1.5", menuIconFgOver }
};
mediaPlayerSpeedDisabledRippleBg: windowBgOver;
mediaPlayerMenu: DropdownMenu(defaultDropdownMenu) {
wrap: InnerDropdown(defaultInnerDropdown) {
scrollPadding: margins(0px, 8px, 0px, 8px);
padding: margins(10px, 2px, 10px, 10px);
}
}
mediaPlayerSpeedMenu: Menu(defaultMenu) {
itemIconPosition: point(6px, 5px);
itemPadding: margins(34px, 8px, 17px, 7px);
}
mediaPlayerMenuCheck: icon {{ "player/player_check", mediaPlayerActiveFg }};
mediaPlayerVolumeIcon0: icon {
{ "player/player_mini_off", mediaPlayerActiveFg },
};
mediaPlayerVolumeIcon1: icon {
{ "player/player_mini_half", mediaPlayerActiveFg },
};
mediaPlayerVolumeToggle: IconButton(mediaPlayerRepeatButton) {
width: 34px;
icon: icon {
{ "player/player_mini_full", mediaPlayerActiveFg },
};
iconPosition: point(5px, 6px);
rippleAreaPosition: point(4px, 5px);
}
mediaPlayerVolumeMargin: 10px;
mediaPlayerVolumeSize: size(27px, 100px);
mediaPlayerControlsFade: icon {{ "fade_horizontal", mediaPlayerBg }};
mediaPlayerNextButton: IconButton(mediaPlayerPlayButton) {
icon: icon {
{ "player/player_forward", mediaPlayerActiveFg },
};
}
mediaPlayerNextDisabledIcon: icon {
{ "player/player_forward", mediaPlayerInactiveFg },
};
mediaPlayerPreviousButton: IconButton(mediaPlayerNextButton) {
icon: icon {
{ "player/player_backward", mediaPlayerActiveFg },
};
}
mediaPlayerPreviousDisabledIcon: icon {
{ "player/player_backward", mediaPlayerInactiveFg },
};
touchBarIconPlayerClose: icon {{ "player/panel_close", windowFg }};
touchBarIconPlayerPlay: icon {{ "media_play", windowFg }};
touchBarIconPlayerPause: icon {{ "media_pause", windowFg }};
touchBarIconPlayerNext: icon {{ "player/player_forward", windowFg }};
touchBarIconPlayerPrevious: icon {{ "player/player_backward", windowFg }};
mediaPlayerClose: IconButton(mediaPlayerRepeatButton) {
width: 39px;
icon: icon {{ "player/panel_close", menuIconFg }};
iconOver: icon {{ "player/panel_close", menuIconFgOver }};
iconPosition: point(5px, 6px);
rippleAreaPosition: point(4px, 5px);
ripple: RippleAnimation(defaultRippleAnimation) {
color: windowBgOver;
}
}
mediaPlayerPlayback: FilledSlider {
fullWidth: 6px;
lineWidth: 2px;
activeFg: mediaPlayerActiveFg;
inactiveFg: mediaPlayerInactiveFg;
disabledFg: mediaPlayerDisabledFg;
duration: 150;
}
mediaPlayerButtonTransformDuration: 200;
mediaPlayerPanelButton: MediaPlayerButton {
playPosition: point(3px, 0px);
playOuter: size(22px, 18px);
pausePosition: point(1px, 1px);
pauseOuter: size(16px, 18px);
pauseStroke: 5px;
cancelPosition: point(0px, 1px);
cancelOuter: size(16px, 18px);
cancelStroke: 3px;
}
mediaPlayerPanelButtonSize: size(32px, 32px);
mediaPlayerPanelButtonPosition: point(8px, 7px);
mediaPlayerPanelMarginLeft: 10px;
mediaPlayerPanelMarginBottom: 10px;
mediaPlayerPanelWidth: 344px;
mediaPlayerCoverHeight: 102px;
mediaPlayerPanelNextButton: IconButton(mediaPlayerRepeatButton) {
width: 37px;
icon: icon {{ "player/player_forward", mediaPlayerActiveFg, point(6px, 4px) }};
}
mediaPlayerPanelNextDisabledIcon: icon {
{ "player/player_forward", mediaPlayerInactiveFg, point(6px, 4px) },
};
mediaPlayerPanelPreviousButton: IconButton(mediaPlayerPanelNextButton) {
icon: icon {{ "player/player_backward", mediaPlayerActiveFg, point(6px, 4px) }};
}
mediaPlayerPanelPreviousDisabledIcon: icon {
{ "player/player_backward", mediaPlayerInactiveFg, point(6px, 4px) },
};
mediaPlayerPanelPadding: 16px;
mediaPlayerPanelNameTop: 24px;
mediaPlayerPanelPlayLeft: 9px;
mediaPlayerPanelPlaySkip: 7px;
mediaPlayerPanelPlayTop: 58px;
mediaPlayerPanelPlaybackTop: 32px;
mediaPlayerPanelPlaybackPadding: 8px;
mediaPlayerPanelPlayback: defaultContinuousSlider;
mediaPlayerPanelVolumeTop: 65px;
mediaPlayerPanelVolumeSkip: 3px;
mediaPlayerPanelVolumeWidth: 64px;
mediaPlayerPanelVolumeToggleSkip: 0px;
mediaPlayerPanelVolumeToggleTop: 57px;
mediaPlayerScroll: ScrollArea(defaultSolidScroll) {
deltat: 10px;
deltab: 10px;
}
mediaPlayerListHeightMax: 280px;
mediaPlayerListMarginBottom: 10px;
mediaPlayerScrollShadow: Shadow {
bottom: icon {{ "player/playlist_shadow", windowShadowFg }};
extend: margins(2px, 2px, 2px, 2px);
}
mediaPlayerListMarginTop: 8px;
mediaPlayerFileLayout: OverviewFileLayout(overviewFileLayout) {
maxWidth: 344px;
songIconBg: mediaPlayerActiveFg;
songOverBg: mediaPlayerActiveFg;
}
mediaPlayerFloatSize: 128px;
mediaPlayerFloatMargin: 12px;
mediaPlayerMenuPosition: point(-2px, -2px);
mediaPlayerOrderMenu: Menu(defaultMenu) {
itemIconPosition: point(13px, 8px);
itemPadding: margins(49px, 9px, 17px, 11px);
itemStyle: boxTextStyle;
}
mediaPlayerOrderMenuActive: Menu(mediaPlayerOrderMenu) {
itemFg: windowActiveTextFg;
itemFgOver: windowActiveTextFg;
}
mediaPlayerOrderIconReverse: icon{{ "player/player_order", windowFg }};
mediaPlayerOrderIconReverseActive: icon{{ "player/player_order", windowActiveTextFg }};
mediaPlayerOrderIconShuffle: icon{{ "player/player_shuffle", windowFg }};
mediaPlayerOrderIconShuffleActive: icon{{ "player/player_shuffle", windowActiveTextFg }};