init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
This commit is contained in:
338
Telegram/SourceFiles/media/player/media_player.style
Normal file
338
Telegram/SourceFiles/media/player/media_player.style
Normal file
@@ -0,0 +1,338 @@
|
||||
/*
|
||||
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 {
|
||||
playPosition: point;
|
||||
playOuter: size;
|
||||
pausePosition: point;
|
||||
pauseOuter: size;
|
||||
pauseStroke: pixels;
|
||||
cancelPosition: point;
|
||||
cancelOuter: size;
|
||||
cancelStroke: pixels;
|
||||
|
||||
rippleAreaPosition: point;
|
||||
rippleAreaSize: pixels;
|
||||
ripple: RippleAnimation;
|
||||
|
||||
duration: int;
|
||||
}
|
||||
|
||||
MediaSpeedMenu {
|
||||
dropdown: DropdownMenu;
|
||||
qualityMenu: Menu;
|
||||
activeCheck: icon;
|
||||
activeCheckSkip: pixels;
|
||||
sliderStyle: TextStyle;
|
||||
sliderPadding: margins;
|
||||
sliderWidth: pixels;
|
||||
slider: MediaSlider;
|
||||
|
||||
slow: icon;
|
||||
slowActive: icon;
|
||||
normal: icon;
|
||||
normalActive: icon;
|
||||
medium: icon;
|
||||
mediumActive: icon;
|
||||
fast: icon;
|
||||
fastActive: icon;
|
||||
veryFast: icon;
|
||||
veryFastActive: icon;
|
||||
superFast: icon;
|
||||
superFastActive: icon;
|
||||
}
|
||||
|
||||
MediaSpeedButton {
|
||||
size: size;
|
||||
padding: margins;
|
||||
font: font;
|
||||
fg: color;
|
||||
overFg: color;
|
||||
activeFg: color;
|
||||
icon: icon;
|
||||
ripple: RippleAnimation;
|
||||
rippleActiveColor: color;
|
||||
rippleRadius: pixels;
|
||||
menu: MediaSpeedMenu;
|
||||
menuAlign: align;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
duration: 200;
|
||||
}
|
||||
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: 30px;
|
||||
|
||||
icon: icon {
|
||||
{ "player/player_repeat", mediaPlayerActiveFg }
|
||||
};
|
||||
iconPosition: point(2px, 5px);
|
||||
|
||||
rippleAreaPosition: point(2px, 6px);
|
||||
rippleAreaSize: 24px;
|
||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: lightButtonBgOver;
|
||||
}
|
||||
}
|
||||
mediaPlayerRepeatDisabledIcon: icon {
|
||||
{ "player/player_repeat", menuIconFg }
|
||||
};
|
||||
mediaPlayerRepeatDisabledIconOver: icon {
|
||||
{ "player/player_repeat", menuIconFgOver }
|
||||
};
|
||||
mediaPlayerRepeatOneIcon: icon {
|
||||
{ "player/player_repeat_single", mediaPlayerActiveFg }
|
||||
};
|
||||
mediaPlayerReverseIcon: icon {
|
||||
{ "player/player_order", mediaPlayerActiveFg }
|
||||
};
|
||||
mediaPlayerReverseDisabledIcon: icon {
|
||||
{ "player/player_order", menuIconFg }
|
||||
};
|
||||
mediaPlayerReverseDisabledIconOver: icon {
|
||||
{ "player/player_order", menuIconFgOver }
|
||||
};
|
||||
mediaPlayerShuffleIcon: icon {
|
||||
{ "player/player_shuffle", mediaPlayerActiveFg }
|
||||
};
|
||||
mediaPlayerOrderButton: IconButton(mediaPlayerRepeatButton) {
|
||||
iconPosition: point(2px, 6px);
|
||||
rippleAreaPosition: point(2px, 6px);
|
||||
}
|
||||
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 }
|
||||
};
|
||||
|
||||
mediaPlayerMenu: DropdownMenu(defaultDropdownMenu) {
|
||||
wrap: InnerDropdown(defaultInnerDropdown) {
|
||||
scrollPadding: margins(0px, 4px, 0px, 4px);
|
||||
padding: margins(10px, 2px, 10px, 10px);
|
||||
}
|
||||
}
|
||||
mediaPlayerMenuCheck: icon {{ "player/player_check", mediaPlayerActiveFg }};
|
||||
|
||||
mediaPlayerSpeedMenuInner: Menu(menuWithIcons) {
|
||||
separator: MenuSeparator(defaultMenuSeparator) {
|
||||
padding: margins(0px, 4px, 0px, 4px);
|
||||
width: 6px;
|
||||
}
|
||||
itemPadding: margins(54px, 7px, 54px, 9px);
|
||||
itemFgDisabled: mediaPlayerActiveFg;
|
||||
}
|
||||
mediaPlayerSpeedMenu: MediaSpeedMenu {
|
||||
dropdown: DropdownMenu(mediaPlayerMenu) {
|
||||
menu: mediaPlayerSpeedMenuInner;
|
||||
}
|
||||
qualityMenu: Menu(mediaPlayerSpeedMenuInner) {
|
||||
itemPadding: margins(17px, 7px, 54px, 9px);
|
||||
}
|
||||
activeCheck: mediaPlayerMenuCheck;
|
||||
activeCheckSkip: 8px;
|
||||
sliderStyle: TextStyle(defaultTextStyle) {
|
||||
font: font(12px semibold);
|
||||
}
|
||||
sliderPadding: margins(50px, 8px, 12px, 8px);
|
||||
sliderWidth: 122px;
|
||||
slider: MediaSlider(defaultContinuousSlider) {
|
||||
activeFg: mediaPlayerActiveFg;
|
||||
inactiveFg: windowBgOver;
|
||||
activeFgOver: mediaPlayerActiveFg;
|
||||
inactiveFgOver: windowBgOver;
|
||||
activeFgDisabled: windowBgOver;
|
||||
receivedTillFg: windowBgOver;
|
||||
width: 6px;
|
||||
seekSize: size(6px, 6px);
|
||||
}
|
||||
|
||||
slow: playerSpeedSlow;
|
||||
slowActive: playerSpeedSlowActive;
|
||||
normal: playerSpeedNormal;
|
||||
normalActive: playerSpeedNormalActive;
|
||||
medium: playerSpeedMedium;
|
||||
mediumActive: playerSpeedMediumActive;
|
||||
fast: playerSpeedFast;
|
||||
fastActive: playerSpeedFastActive;
|
||||
veryFast: playerSpeedVeryFast;
|
||||
veryFastActive: playerSpeedVeryFastActive;
|
||||
superFast: playerSpeedSuperFast;
|
||||
superFastActive: playerSpeedSuperFastActive;
|
||||
}
|
||||
|
||||
mediaPlayerSpeedButton: MediaSpeedButton {
|
||||
size: size(30px, 30px);
|
||||
padding: margins(0px, 6px, 0px, 0px);
|
||||
font: font(11px bold);
|
||||
fg: menuIconFg;
|
||||
overFg: menuIconFgOver;
|
||||
activeFg: mediaPlayerActiveFg;
|
||||
icon: icon{{ "player/player_speed", menuIconFg }};
|
||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: windowBgOver;
|
||||
}
|
||||
rippleActiveColor: lightButtonBgOver;
|
||||
rippleRadius: 4px;
|
||||
menu: mediaPlayerSpeedMenu;
|
||||
menuAlign: align(topright);
|
||||
}
|
||||
|
||||
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(5px, 6px);
|
||||
}
|
||||
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(4px, 6px);
|
||||
|
||||
rippleAreaPosition: point(4px, 6px);
|
||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: windowBgOver;
|
||||
}
|
||||
}
|
||||
mediaPlayerPlayback: FilledSlider {
|
||||
fullWidth: 6px;
|
||||
lineWidth: 2px;
|
||||
activeFg: mediaPlayerActiveFg;
|
||||
inactiveFg: mediaPlayerInactiveFg;
|
||||
disabledFg: mediaPlayerDisabledFg;
|
||||
duration: 150;
|
||||
}
|
||||
|
||||
mediaPlayerPanelMarginLeft: 10px;
|
||||
mediaPlayerPanelMarginBottom: 10px;
|
||||
mediaPlayerPanelWidth: 344px;
|
||||
|
||||
mediaPlayerPanelNextButton: IconButton(mediaPlayerRepeatButton) {
|
||||
width: 37px;
|
||||
icon: icon {{ "player/player_forward", mediaPlayerActiveFg, point(6px, 4px) }};
|
||||
}
|
||||
|
||||
mediaPlayerPanelPlaybackPadding: 8px;
|
||||
mediaPlayerPanelPlayback: defaultContinuousSlider;
|
||||
|
||||
mediaPlayerPanelVolumeWidth: 64px;
|
||||
|
||||
mediaPlayerScroll: ScrollArea(defaultSolidScroll) {
|
||||
deltat: 10px;
|
||||
deltab: 10px;
|
||||
}
|
||||
mediaPlayerListHeightMax: 280px;
|
||||
mediaPlayerListMarginBottom: 10px;
|
||||
|
||||
mediaPlayerFileLayout: OverviewFileLayout(overviewFileLayout) {
|
||||
maxWidth: 344px;
|
||||
songIconBg: mediaPlayerActiveFg;
|
||||
songOverBg: mediaPlayerActiveFg;
|
||||
}
|
||||
|
||||
mediaPlayerFloatSize: 128px;
|
||||
mediaPlayerFloatMargin: 12px;
|
||||
|
||||
mediaPlayerMenuPosition: point(-2px, -1px);
|
||||
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 }};
|
||||
Reference in New Issue
Block a user