2016-09-15 16:32:49 +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-2016 John Preston, https://desktop.telegram.org
|
|
|
|
*/
|
|
|
|
|
|
|
|
using "basic.style";
|
2016-09-23 16:04:26 +00:00
|
|
|
using "ui/widgets/widgets.style";
|
2016-10-13 15:04:40 +00:00
|
|
|
using "overview/overview.style";
|
2016-09-15 16:32:49 +00:00
|
|
|
|
2016-10-08 18:28:43 +00:00
|
|
|
MediaPlayerButton {
|
|
|
|
playPosition: point;
|
|
|
|
playOuter: size;
|
|
|
|
pausePosition: point;
|
|
|
|
pauseOuter: size;
|
|
|
|
pauseStroke: pixels;
|
|
|
|
cancelPosition: point;
|
|
|
|
cancelOuter: size;
|
|
|
|
cancelStroke: pixels;
|
|
|
|
}
|
|
|
|
|
2016-10-12 19:34:25 +00:00
|
|
|
mediaPlayerActiveFg: #54b5ed;
|
|
|
|
mediaPlayerInactiveFg: #dfebf2;
|
2016-09-16 12:49:36 +00:00
|
|
|
|
2016-10-08 18:28:43 +00:00
|
|
|
mediaPlayerButton: MediaPlayerButton {
|
2016-10-12 19:34:25 +00:00
|
|
|
playPosition: point(2px, 0px);
|
|
|
|
playOuter: size(17px, 15px);
|
2016-10-08 18:28:43 +00:00
|
|
|
pausePosition: point(1px, 1px);
|
2016-10-12 19:34:25 +00:00
|
|
|
pauseOuter: size(15px, 15px);
|
2016-10-08 18:28:43 +00:00
|
|
|
pauseStroke: 5px;
|
2016-10-12 19:34:25 +00:00
|
|
|
cancelPosition: point(1px, 1px);
|
|
|
|
cancelOuter: size(15px, 15px);
|
2016-10-08 18:28:43 +00:00
|
|
|
cancelStroke: 3px;
|
|
|
|
}
|
2016-10-12 19:34:25 +00:00
|
|
|
mediaPlayerButtonSize: size(25px, 30px);
|
2016-09-17 19:28:33 +00:00
|
|
|
|
2016-10-12 19:34:25 +00:00
|
|
|
mediaPlayerButtonPosition: point(5px, 10px);
|
|
|
|
mediaPlayerSkipIconPosition: point(5px, 12px);
|
2016-09-17 19:28:33 +00:00
|
|
|
|
2016-10-12 19:34:25 +00:00
|
|
|
mediaPlayerHeight: 35px;
|
|
|
|
mediaPlayerPadding: 8px;
|
|
|
|
mediaPlayerNameTop: 22px;
|
|
|
|
mediaPlayerPlayLeft: 7px;
|
|
|
|
mediaPlayerPlaySkip: 1px;
|
|
|
|
mediaPlayerPlayTop: 0px;
|
|
|
|
mediaPlayerCloseRight: 0px;
|
2016-09-23 16:04:26 +00:00
|
|
|
|
2016-10-12 19:34:25 +00:00
|
|
|
mediaPlayerName: flatLabel(labelDefFlat) {
|
|
|
|
maxHeight: 20px;
|
|
|
|
textFg: windowTextFg;
|
|
|
|
}
|
|
|
|
mediaPlayerTime: LabelSimple(defaultLabelSimple) {
|
|
|
|
textFg: windowSubTextFg;
|
|
|
|
}
|
2016-10-08 18:28:43 +00:00
|
|
|
|
|
|
|
mediaPlayerRepeatButton: IconButton {
|
|
|
|
width: 31px;
|
2016-10-12 19:34:25 +00:00
|
|
|
height: 30px;
|
2016-09-17 19:28:33 +00:00
|
|
|
|
|
|
|
icon: icon {
|
2016-10-12 19:34:25 +00:00
|
|
|
{ "player_repeat", mediaPlayerActiveFg, point(9px, 11px) }
|
2016-09-17 19:28:33 +00:00
|
|
|
};
|
|
|
|
iconPosition: point(0px, 0px);
|
2016-11-01 12:46:34 +00:00
|
|
|
iconPositionDown: point(0px, 0px);
|
2016-09-17 19:28:33 +00:00
|
|
|
}
|
2016-09-23 16:04:26 +00:00
|
|
|
mediaPlayerRepeatDisabledIcon: icon {
|
2016-10-12 19:34:25 +00:00
|
|
|
{ "player_repeat", #c8c8c8, point(9px, 11px)}
|
2016-09-23 16:04:26 +00:00
|
|
|
};
|
2016-10-12 19:34:25 +00:00
|
|
|
mediaPlayerRepeatInactiveIcon: icon {
|
|
|
|
{ "player_repeat", mediaPlayerInactiveFg, point(9px, 11px)}
|
2016-09-23 16:04:26 +00:00
|
|
|
};
|
2016-09-17 19:28:33 +00:00
|
|
|
|
|
|
|
mediaPlayerVolumeIcon0: icon {
|
2016-09-23 16:04:26 +00:00
|
|
|
{ "player_volume0", mediaPlayerActiveFg },
|
2016-09-17 19:28:33 +00:00
|
|
|
};
|
|
|
|
mediaPlayerVolumeIcon1: icon {
|
2016-09-23 16:04:26 +00:00
|
|
|
{ "player_volume1", mediaPlayerActiveFg },
|
2016-09-17 19:28:33 +00:00
|
|
|
};
|
|
|
|
mediaPlayerVolumeIcon2: icon {
|
2016-09-23 16:04:26 +00:00
|
|
|
{ "player_volume2", mediaPlayerActiveFg },
|
2016-09-17 19:28:33 +00:00
|
|
|
};
|
|
|
|
mediaPlayerVolumeIcon3: icon {
|
2016-09-23 16:04:26 +00:00
|
|
|
{ "player_volume3", mediaPlayerActiveFg },
|
2016-09-17 19:28:33 +00:00
|
|
|
};
|
2016-09-23 16:04:26 +00:00
|
|
|
mediaPlayerVolumeToggle: IconButton {
|
2016-10-12 19:34:25 +00:00
|
|
|
width: 31px;
|
|
|
|
height: 30px;
|
2016-09-23 16:04:26 +00:00
|
|
|
|
|
|
|
icon: mediaPlayerVolumeIcon0;
|
2016-10-12 19:34:25 +00:00
|
|
|
iconPosition: point(8px, 11px);
|
2016-11-01 12:46:34 +00:00
|
|
|
iconPositionDown: point(8px, 11px);
|
2016-09-23 16:04:26 +00:00
|
|
|
}
|
2016-10-12 19:34:25 +00:00
|
|
|
mediaPlayerVolumeMargin: 10px;
|
|
|
|
mediaPlayerVolumeSize: size(27px, 100px);
|
|
|
|
|
|
|
|
mediaPlayerPanelPinButton: IconButton(mediaPlayerRepeatButton) {
|
|
|
|
icon: icon {
|
|
|
|
{ "player_panel_pin", mediaPlayerActiveFg, point(9px, 11px) }
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
mediaPlayerNextButton: IconButton(mediaPlayerRepeatButton) {
|
|
|
|
width: 25px;
|
|
|
|
icon: icon {
|
|
|
|
{ "player_next", mediaPlayerActiveFg, mediaPlayerSkipIconPosition },
|
|
|
|
};
|
|
|
|
}
|
|
|
|
mediaPlayerNextDisabledIcon: icon {
|
|
|
|
{ "player_next", mediaPlayerInactiveFg, mediaPlayerSkipIconPosition },
|
|
|
|
};
|
|
|
|
mediaPlayerPreviousButton: IconButton(mediaPlayerNextButton) {
|
|
|
|
icon: icon {
|
2016-11-04 11:14:47 +00:00
|
|
|
{ "player_next-flip_horizontal", mediaPlayerActiveFg, mediaPlayerSkipIconPosition },
|
2016-10-12 19:34:25 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
mediaPlayerPreviousDisabledIcon: icon {
|
2016-11-04 11:14:47 +00:00
|
|
|
{ "player_next-flip_horizontal", mediaPlayerInactiveFg, mediaPlayerSkipIconPosition },
|
2016-10-12 19:34:25 +00:00
|
|
|
};
|
|
|
|
mediaPlayerClose: IconButton(mediaPlayerRepeatButton) {
|
|
|
|
width: 37px;
|
2016-10-18 15:19:13 +00:00
|
|
|
icon: icon {{ "player_close", #c8c8c8, point(10px, 12px) }};
|
2016-10-12 19:34:25 +00:00
|
|
|
}
|
|
|
|
mediaPlayerPlayback: FilledSlider {
|
|
|
|
fullWidth: 6px;
|
|
|
|
lineWidth: 2px;
|
|
|
|
activeFg: mediaPlayerActiveFg;
|
|
|
|
inactiveFg: mediaPlayerInactiveFg;
|
2016-10-13 09:12:12 +00:00
|
|
|
disabledFg: #9dd1ef;
|
2016-10-12 19:34:25 +00:00
|
|
|
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;
|
|
|
|
|
2016-10-18 15:19:13 +00:00
|
|
|
mediaPlayerPanelClose: IconButton(mediaPlayerClose) {
|
|
|
|
width: 43px;
|
|
|
|
height: 28px;
|
|
|
|
icon: icon {{ "player_close", #c8c8c8, point(16px, 14px) }};
|
|
|
|
}
|
|
|
|
|
2016-10-12 19:34:25 +00:00
|
|
|
mediaPlayerPanelNextButton: IconButton(mediaPlayerRepeatButton) {
|
|
|
|
width: 37px;
|
2016-10-18 15:19:13 +00:00
|
|
|
icon: icon {{ "player_panel_next", mediaPlayerActiveFg, point(10px, 10px) }};
|
2016-10-12 19:34:25 +00:00
|
|
|
}
|
|
|
|
mediaPlayerPanelNextDisabledIcon: icon {
|
|
|
|
{ "player_panel_next", mediaPlayerInactiveFg, point(10px, 10px) },
|
|
|
|
};
|
|
|
|
mediaPlayerPanelPreviousButton: IconButton(mediaPlayerPanelNextButton) {
|
2016-11-04 11:14:47 +00:00
|
|
|
icon: icon {{ "player_panel_next-flip_horizontal", mediaPlayerActiveFg, point(10px, 10px) }};
|
2016-10-12 19:34:25 +00:00
|
|
|
}
|
|
|
|
mediaPlayerPanelPreviousDisabledIcon: icon {
|
2016-11-04 11:14:47 +00:00
|
|
|
{ "player_panel_next-flip_horizontal", mediaPlayerInactiveFg, point(10px, 10px) },
|
2016-10-12 19:34:25 +00:00
|
|
|
};
|
|
|
|
|
2016-10-18 15:19:13 +00:00
|
|
|
mediaPlayerPanelPadding: 16px;
|
2016-10-12 19:34:25 +00:00
|
|
|
mediaPlayerPanelNameTop: 24px;
|
|
|
|
mediaPlayerPanelPlayLeft: 9px;
|
|
|
|
mediaPlayerPanelPlaySkip: 7px;
|
|
|
|
mediaPlayerPanelPlayTop: 58px;
|
|
|
|
mediaPlayerPanelPlaybackTop: 32px;
|
|
|
|
mediaPlayerPanelPlaybackPadding: 8px;
|
|
|
|
mediaPlayerPanelPlayback: MediaSlider {
|
|
|
|
width: 3px;
|
|
|
|
activeFg: mediaPlayerActiveFg;
|
|
|
|
inactiveFg: mediaPlayerInactiveFg;
|
2016-11-01 12:46:34 +00:00
|
|
|
activeFgOver: mediaPlayerActiveFg;
|
|
|
|
inactiveFgOver: mediaPlayerInactiveFg;
|
|
|
|
activeFgDisabled: mediaPlayerInactiveFg;
|
|
|
|
inactiveFgDisabled: windowBg;
|
2016-10-12 19:34:25 +00:00
|
|
|
seekSize: size(9px, 9px);
|
|
|
|
duration: 150;
|
|
|
|
}
|
|
|
|
|
|
|
|
mediaPlayerPanelVolumeTop: 65px;
|
|
|
|
mediaPlayerPanelVolumeSkip: 3px;
|
|
|
|
mediaPlayerPanelVolumeWidth: 64px;
|
|
|
|
mediaPlayerPanelVolumeToggleSkip: 0px;
|
|
|
|
mediaPlayerPanelVolumeToggleTop: 57px;
|
2016-10-13 15:04:40 +00:00
|
|
|
|
|
|
|
mediaPlayerScroll: flatScroll(solidScroll) {
|
|
|
|
deltat: 10px;
|
|
|
|
deltab: 0px;
|
|
|
|
}
|
|
|
|
mediaPlayerListHeightMax: 280px;
|
|
|
|
mediaPlayerListMarginBottom: 10px;
|
2016-11-08 14:43:10 +00:00
|
|
|
mediaPlayerScrollShadow: icon {{ "playlist_shadow", windowShadowFg }};
|
2016-10-13 15:04:40 +00:00
|
|
|
|
|
|
|
mediaPlayerListMarginTop: 8px;
|
2016-10-14 17:10:15 +00:00
|
|
|
mediaPlayerListIconFg: #ffffff;
|
2016-10-13 15:04:40 +00:00
|
|
|
mediaPlayerFileLayout: OverviewFileLayout(overviewFileLayout) {
|
|
|
|
maxWidth: 344px;
|
|
|
|
songPadding: margins(17px, 7px, 10px, 6px);
|
|
|
|
songThumbSize: 36px;
|
|
|
|
songNameTop: 7px;
|
|
|
|
songStatusTop: 25px;
|
2016-10-14 17:10:15 +00:00
|
|
|
songIconBg: mediaPlayerActiveFg;
|
|
|
|
songOverBg: mediaPlayerActiveFg;
|
|
|
|
songPause: icon {{ "playlist_pause", mediaPlayerListIconFg }};
|
|
|
|
songPlay: icon {{ "playlist_play", mediaPlayerListIconFg }};
|
|
|
|
songCancel: icon {{ "playlist_cancel", mediaPlayerListIconFg }};
|
|
|
|
songDownload: icon {{ "playlist_download", mediaPlayerListIconFg }};
|
2016-10-13 15:04:40 +00:00
|
|
|
}
|