mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Replaced icon color for songs with bright one.
This commit is contained in:
parent
d4bbbdb65c
commit
9b9531d279
7 changed files with 81 additions and 14 deletions
|
@ -963,7 +963,7 @@ void EditCaptionBox::paintEvent(QPaintEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto icon = &(_isAudio
|
const auto icon = &(_isAudio
|
||||||
? st::historyFileInPlay
|
? st::historyFileSongPlay
|
||||||
: _isImage
|
: _isImage
|
||||||
? st::historyFileInImage
|
? st::historyFileInImage
|
||||||
: st::historyFileInDocument);
|
: st::historyFileInDocument);
|
||||||
|
|
|
@ -456,19 +456,44 @@ void Document::draw(
|
||||||
|
|
||||||
const auto icon = [&] {
|
const auto icon = [&] {
|
||||||
if (_data->waitingForAlbum()) {
|
if (_data->waitingForAlbum()) {
|
||||||
|
if (_data->isSong()) {
|
||||||
|
return &(selected
|
||||||
|
? st::historyFileSongWaitingSelected
|
||||||
|
: st::historyFileSongWaiting);
|
||||||
|
}
|
||||||
return &(outbg ? (selected ? st::historyFileOutWaitingSelected : st::historyFileOutWaiting) : (selected ? st::historyFileInWaitingSelected : st::historyFileInWaiting));
|
return &(outbg ? (selected ? st::historyFileOutWaitingSelected : st::historyFileOutWaiting) : (selected ? st::historyFileInWaitingSelected : st::historyFileInWaiting));
|
||||||
} else if (!cornerDownload && (_data->loading() || _data->uploading())) {
|
} else if (!cornerDownload && (_data->loading() || _data->uploading())) {
|
||||||
|
if (_data->isSong()) {
|
||||||
|
return &(selected
|
||||||
|
? st::historyFileSongCancelSelected
|
||||||
|
: st::historyFileSongCancel);
|
||||||
|
}
|
||||||
return &(outbg ? (selected ? st::historyFileOutCancelSelected : st::historyFileOutCancel) : (selected ? st::historyFileInCancelSelected : st::historyFileInCancel));
|
return &(outbg ? (selected ? st::historyFileOutCancelSelected : st::historyFileOutCancel) : (selected ? st::historyFileInCancelSelected : st::historyFileInCancel));
|
||||||
} else if (showPause) {
|
} else if (showPause) {
|
||||||
|
if (_data->isSong()) {
|
||||||
|
return &(selected
|
||||||
|
? st::historyFileSongPauseSelected
|
||||||
|
: st::historyFileSongPause);
|
||||||
|
}
|
||||||
return &(outbg ? (selected ? st::historyFileOutPauseSelected : st::historyFileOutPause) : (selected ? st::historyFileInPauseSelected : st::historyFileInPause));
|
return &(outbg ? (selected ? st::historyFileOutPauseSelected : st::historyFileOutPause) : (selected ? st::historyFileInPauseSelected : st::historyFileInPause));
|
||||||
} else if (loaded || _dataMedia->canBePlayed()) {
|
} else if (loaded || _dataMedia->canBePlayed()) {
|
||||||
if (_dataMedia->canBePlayed()) {
|
if (_dataMedia->canBePlayed()) {
|
||||||
|
if (_data->isSong()) {
|
||||||
|
return &(selected
|
||||||
|
? st::historyFileSongPlaySelected
|
||||||
|
: st::historyFileSongPlay);
|
||||||
|
}
|
||||||
return &(outbg ? (selected ? st::historyFileOutPlaySelected : st::historyFileOutPlay) : (selected ? st::historyFileInPlaySelected : st::historyFileInPlay));
|
return &(outbg ? (selected ? st::historyFileOutPlaySelected : st::historyFileOutPlay) : (selected ? st::historyFileInPlaySelected : st::historyFileInPlay));
|
||||||
} else if (_data->isImage()) {
|
} else if (_data->isImage()) {
|
||||||
return &(outbg ? (selected ? st::historyFileOutImageSelected : st::historyFileOutImage) : (selected ? st::historyFileInImageSelected : st::historyFileInImage));
|
return &(outbg ? (selected ? st::historyFileOutImageSelected : st::historyFileOutImage) : (selected ? st::historyFileInImageSelected : st::historyFileInImage));
|
||||||
}
|
}
|
||||||
return &(outbg ? (selected ? st::historyFileOutDocumentSelected : st::historyFileOutDocument) : (selected ? st::historyFileInDocumentSelected : st::historyFileInDocument));
|
return &(outbg ? (selected ? st::historyFileOutDocumentSelected : st::historyFileOutDocument) : (selected ? st::historyFileInDocumentSelected : st::historyFileInDocument));
|
||||||
}
|
}
|
||||||
|
if (_data->isSong()) {
|
||||||
|
return &(selected
|
||||||
|
? st::historyFileSongDownloadSelected
|
||||||
|
: st::historyFileSongDownload);
|
||||||
|
}
|
||||||
return &(outbg ? (selected ? st::historyFileOutDownloadSelected : st::historyFileOutDownload) : (selected ? st::historyFileInDownloadSelected : st::historyFileInDownload));
|
return &(outbg ? (selected ? st::historyFileOutDownloadSelected : st::historyFileOutDownload) : (selected ? st::historyFileInDownloadSelected : st::historyFileInDownload));
|
||||||
}();
|
}();
|
||||||
const auto previous = [&]() -> const style::icon* {
|
const auto previous = [&]() -> const style::icon* {
|
||||||
|
|
|
@ -896,6 +896,8 @@ void File::paint(Painter &p, const QRect &clip, const PaintContext *context) con
|
||||||
return &st::historyFileInPause;
|
return &st::historyFileInPause;
|
||||||
} else if (_document->isImage()) {
|
} else if (_document->isImage()) {
|
||||||
return &st::historyFileInImage;
|
return &st::historyFileInImage;
|
||||||
|
} else if (_document->isSong()) {
|
||||||
|
return &st::historyFileSongPlay;
|
||||||
} else if (_document->isVoiceMessage()
|
} else if (_document->isVoiceMessage()
|
||||||
|| _document->isAudioFile()) {
|
|| _document->isAudioFile()) {
|
||||||
return &st::historyFileInPlay;
|
return &st::historyFileInPlay;
|
||||||
|
|
|
@ -28,6 +28,15 @@ OverviewFileLayout {
|
||||||
songDownload: icon;
|
songDownload: icon;
|
||||||
songDownloadSelected: icon;
|
songDownloadSelected: icon;
|
||||||
|
|
||||||
|
voicePause: icon;
|
||||||
|
voicePauseSelected: icon;
|
||||||
|
voicePlay: icon;
|
||||||
|
voicePlaySelected: icon;
|
||||||
|
voiceCancel: icon;
|
||||||
|
voiceCancelSelected: icon;
|
||||||
|
voiceDownload: icon;
|
||||||
|
voiceDownloadSelected: icon;
|
||||||
|
|
||||||
filePadding: margins;
|
filePadding: margins;
|
||||||
fileThumbSize: pixels;
|
fileThumbSize: pixels;
|
||||||
fileNameTop: pixels;
|
fileNameTop: pixels;
|
||||||
|
@ -64,14 +73,23 @@ overviewFileExtTop: 24px;
|
||||||
overviewFileExtFg: windowFgActive;
|
overviewFileExtFg: windowFgActive;
|
||||||
overviewFileExtFont: font(18px semibold);
|
overviewFileExtFont: font(18px semibold);
|
||||||
|
|
||||||
overviewSongPause: icon {{ "playlist_pause", historyFileInIconFg }};
|
overviewVoicePause: icon {{ "playlist_pause", historyFileInIconFg }};
|
||||||
overviewSongPauseSelected: icon {{ "playlist_pause", historyFileInIconFgSelected }};
|
overviewVoicePauseSelected: icon {{ "playlist_pause", historyFileInIconFgSelected }};
|
||||||
overviewSongPlay: icon {{ "playlist_play", historyFileInIconFg }};
|
overviewVoicePlay: icon {{ "playlist_play", historyFileInIconFg }};
|
||||||
overviewSongPlaySelected: icon {{ "playlist_play", historyFileInIconFgSelected }};
|
overviewVoicePlaySelected: icon {{ "playlist_play", historyFileInIconFgSelected }};
|
||||||
overviewSongCancel: icon {{ "playlist_cancel", historyFileInIconFg }};
|
overviewVoiceCancel: icon {{ "playlist_cancel", historyFileInIconFg }};
|
||||||
overviewSongCancelSelected: icon {{ "playlist_cancel", historyFileInIconFgSelected }};
|
overviewVoiceCancelSelected: icon {{ "playlist_cancel", historyFileInIconFgSelected }};
|
||||||
overviewSongDownload: icon {{ "playlist_download", historyFileInIconFg }};
|
overviewVoiceDownload: icon {{ "playlist_download", historyFileInIconFg }};
|
||||||
overviewSongDownloadSelected: icon {{ "playlist_download", historyFileInIconFgSelected }};
|
overviewVoiceDownloadSelected: icon {{ "playlist_download", historyFileInIconFgSelected }};
|
||||||
|
|
||||||
|
overviewSongPause: icon {{ "playlist_pause", historyFileThumbIconFg }};
|
||||||
|
overviewSongPauseSelected: icon {{ "playlist_pause", historyFileThumbIconFgSelected }};
|
||||||
|
overviewSongPlay: icon {{ "playlist_play", historyFileThumbIconFg }};
|
||||||
|
overviewSongPlaySelected: icon {{ "playlist_play", historyFileThumbIconFgSelected }};
|
||||||
|
overviewSongCancel: icon {{ "playlist_cancel", historyFileThumbIconFg }};
|
||||||
|
overviewSongCancelSelected: icon {{ "playlist_cancel", historyFileThumbIconFgSelected }};
|
||||||
|
overviewSongDownload: icon {{ "playlist_download", historyFileThumbIconFg }};
|
||||||
|
overviewSongDownloadSelected: icon {{ "playlist_download", historyFileThumbIconFgSelected }};
|
||||||
overviewSmallCancel: icon {{ "history_audio_cancel", historyFileInIconFg }};
|
overviewSmallCancel: icon {{ "history_audio_cancel", historyFileInIconFg }};
|
||||||
overviewSmallCancelSelected: icon {{ "history_audio_cancel", historyFileInIconFgSelected }};
|
overviewSmallCancelSelected: icon {{ "history_audio_cancel", historyFileInIconFgSelected }};
|
||||||
overviewSmallDownload: icon {{ "history_audio_download", historyFileInIconFg }};
|
overviewSmallDownload: icon {{ "history_audio_download", historyFileInIconFg }};
|
||||||
|
@ -93,6 +111,15 @@ overviewFileLayout: OverviewFileLayout {
|
||||||
songDownload: overviewSongDownload;
|
songDownload: overviewSongDownload;
|
||||||
songDownloadSelected: overviewSongDownloadSelected;
|
songDownloadSelected: overviewSongDownloadSelected;
|
||||||
|
|
||||||
|
voicePause: overviewVoicePause;
|
||||||
|
voicePauseSelected: overviewVoicePauseSelected;
|
||||||
|
voicePlay: overviewVoicePlay;
|
||||||
|
voicePlaySelected: overviewVoicePlaySelected;
|
||||||
|
voiceCancel: overviewVoiceCancel;
|
||||||
|
voiceCancelSelected: overviewVoiceCancelSelected;
|
||||||
|
voiceDownload: overviewVoiceDownload;
|
||||||
|
voiceDownloadSelected: overviewVoiceDownloadSelected;
|
||||||
|
|
||||||
filePadding: margins(0px, 3px, 16px, 3px);
|
filePadding: margins(0px, 3px, 16px, 3px);
|
||||||
fileThumbSize: 70px;
|
fileThumbSize: 70px;
|
||||||
fileNameTop: 7px;
|
fileNameTop: 7px;
|
||||||
|
|
|
@ -734,13 +734,15 @@ void Voice::paint(Painter &p, const QRect &clip, TextSelection selection, const
|
||||||
|
|
||||||
const auto icon = [&] {
|
const auto icon = [&] {
|
||||||
if (_data->loading() || _data->uploading()) {
|
if (_data->loading() || _data->uploading()) {
|
||||||
return &(selected ? _st.songCancelSelected : _st.songCancel);
|
return &(selected ? _st.voiceCancelSelected : _st.voiceCancel);
|
||||||
} else if (showPause) {
|
} else if (showPause) {
|
||||||
return &(selected ? _st.songPauseSelected : _st.songPause);
|
return &(selected ? _st.voicePauseSelected : _st.voicePause);
|
||||||
} else if (_dataMedia->canBePlayed()) {
|
} else if (_dataMedia->canBePlayed()) {
|
||||||
return &(selected ? _st.songPlaySelected : _st.songPlay);
|
return &(selected ? _st.voicePlaySelected : _st.voicePlay);
|
||||||
}
|
}
|
||||||
return &(selected ? _st.songDownloadSelected : _st.songDownload);
|
return &(selected
|
||||||
|
? _st.voiceDownloadSelected
|
||||||
|
: _st.voiceDownload);
|
||||||
}();
|
}();
|
||||||
icon->paintInCenter(p, inner);
|
icon->paintInCenter(p, inner);
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ void SingleFilePreview::paintEvent(QPaintEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto &icon = _fileIsAudio
|
auto &icon = _fileIsAudio
|
||||||
? st::historyFileInPlay
|
? st::historyFileSongPlay
|
||||||
: _fileIsImage
|
: _fileIsImage
|
||||||
? st::historyFileInImage
|
? st::historyFileInImage
|
||||||
: st::historyFileInDocument;
|
: st::historyFileInDocument;
|
||||||
|
|
|
@ -160,6 +160,17 @@ historyFileOutWaitingSelected: icon {{ "mediaview_save_check", historyFileOutIco
|
||||||
historyFileInWaiting: icon {{ "mediaview_save_check", historyFileInIconFg }};
|
historyFileInWaiting: icon {{ "mediaview_save_check", historyFileInIconFg }};
|
||||||
historyFileInWaitingSelected: icon {{ "mediaview_save_check", historyFileInIconFgSelected }};
|
historyFileInWaitingSelected: icon {{ "mediaview_save_check", historyFileInIconFgSelected }};
|
||||||
|
|
||||||
|
historyFileSongPause: icon {{ "history_file_pause", historyFileThumbIconFg }};
|
||||||
|
historyFileSongPauseSelected: icon {{ "history_file_pause", historyFileThumbIconFgSelected }};
|
||||||
|
historyFileSongPlay: icon {{ "history_file_play", historyFileThumbIconFg }};
|
||||||
|
historyFileSongPlaySelected: icon {{ "history_file_play", historyFileThumbIconFgSelected }};
|
||||||
|
historyFileSongCancel: icon {{ "history_file_cancel", historyFileThumbIconFg }};
|
||||||
|
historyFileSongCancelSelected: icon {{ "history_file_cancel", historyFileThumbIconFgSelected }};
|
||||||
|
historyFileSongDownload: icon {{ "history_file_download", historyFileThumbIconFg }};
|
||||||
|
historyFileSongDownloadSelected: icon {{ "history_file_download", historyFileThumbIconFgSelected }};
|
||||||
|
historyFileSongWaiting: icon {{ "mediaview_save_check", historyFileThumbIconFg }};
|
||||||
|
historyFileSongWaitingSelected: icon {{ "mediaview_save_check", historyFileThumbIconFgSelected }};
|
||||||
|
|
||||||
historyFileThumbDownload: icon {{ "history_file_download", historyFileThumbIconFg }};
|
historyFileThumbDownload: icon {{ "history_file_download", historyFileThumbIconFg }};
|
||||||
historyFileThumbDownloadSelected: icon {{ "history_file_download", historyFileThumbIconFgSelected }};
|
historyFileThumbDownloadSelected: icon {{ "history_file_download", historyFileThumbIconFgSelected }};
|
||||||
historyFileThumbCancel: icon {{ "history_file_cancel", historyFileThumbIconFg }};
|
historyFileThumbCancel: icon {{ "history_file_cancel", historyFileThumbIconFg }};
|
||||||
|
|
Loading…
Add table
Reference in a new issue