Use more specific color keys for media overview parts.

File icons and radial animations should use derived keys instead of msgInBg.
Fixes #4246.
This commit is contained in:
John Preston 2017-12-31 01:28:25 +03:00
parent 8ef9ec0567
commit 9551cfaf9b
3 changed files with 13 additions and 13 deletions

View File

@ -204,7 +204,7 @@ void Gif::paint(Painter &p, const QRect &clip, const PaintContext *context) cons
if (radial) { if (radial) {
p.setOpacity(1); p.setOpacity(1);
QRect rinner(inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine))); QRect rinner(inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine)));
_animation->radial.draw(p, rinner, st::msgFileRadialLine, st::msgInBg); _animation->radial.draw(p, rinner, st::msgFileRadialLine, st::historyFileThumbRadialFg);
} }
} }
@ -745,7 +745,7 @@ void File::paint(Painter &p, const QRect &clip, const PaintContext *context) con
if (radial) { if (radial) {
auto radialCircle = inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine)); auto radialCircle = inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine));
_animation->radial.draw(p, radialCircle, st::msgFileRadialLine, st::msgInBg); _animation->radial.draw(p, radialCircle, st::msgFileRadialLine, st::historyFileInRadialFg);
} }
auto icon = ([showPause, radial, document] { auto icon = ([showPause, radial, document] {
@ -1253,7 +1253,7 @@ void Game::paint(Painter &p, const QRect &clip, const PaintContext *context) con
if (radial) { if (radial) {
p.setOpacity(1); p.setOpacity(1);
QRect rinner(inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine))); QRect rinner(inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine)));
_radial->draw(p, rinner, st::msgFileRadialLine, st::msgInBg); _radial->draw(p, rinner, st::msgFileRadialLine, st::historyFileThumbRadialFg);
} }
} }

View File

@ -79,14 +79,14 @@ overviewFileExtTop: 24px;
overviewFileExtFg: windowFgActive; overviewFileExtFg: windowFgActive;
overviewFileExtFont: font(18px semibold); overviewFileExtFont: font(18px semibold);
overviewSongPause: icon {{ "playlist_pause", msgInBg }}; overviewSongPause: icon {{ "playlist_pause", historyFileInIconFg }};
overviewSongPauseSelected: icon {{ "playlist_pause", msgInBgSelected }}; overviewSongPauseSelected: icon {{ "playlist_pause", historyFileInIconFgSelected }};
overviewSongPlay: icon {{ "playlist_play", msgInBg }}; overviewSongPlay: icon {{ "playlist_play", historyFileInIconFg }};
overviewSongPlaySelected: icon {{ "playlist_play", msgInBgSelected }}; overviewSongPlaySelected: icon {{ "playlist_play", historyFileInIconFgSelected }};
overviewSongCancel: icon {{ "playlist_cancel", msgInBg }}; overviewSongCancel: icon {{ "playlist_cancel", historyFileInIconFg }};
overviewSongCancelSelected: icon {{ "playlist_cancel", msgInBgSelected }}; overviewSongCancelSelected: icon {{ "playlist_cancel", historyFileInIconFgSelected }};
overviewSongDownload: icon {{ "playlist_download", msgInBg }}; overviewSongDownload: icon {{ "playlist_download", historyFileInIconFg }};
overviewSongDownloadSelected: icon {{ "playlist_download", msgInBgSelected }}; overviewSongDownloadSelected: icon {{ "playlist_download", historyFileInIconFgSelected }};
overviewFileLayout: OverviewFileLayout { overviewFileLayout: OverviewFileLayout {
maxWidth: 520px; maxWidth: 520px;
songPadding: margins(17px, 7px, 10px, 6px); songPadding: margins(17px, 7px, 10px, 6px);

View File

@ -620,7 +620,7 @@ void Voice::paint(Painter &p, const QRect &clip, TextSelection selection, const
if (radial) { if (radial) {
QRect rinner(inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine))); QRect rinner(inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine)));
auto &bg = selected ? st::msgInBgSelected : st::msgInBg; auto &bg = selected ? st::historyFileInRadialFgSelected : st::historyFileInRadialFg;
_radial->draw(p, rinner, st::msgFileRadialLine, bg); _radial->draw(p, rinner, st::msgFileRadialLine, bg);
} }
@ -879,7 +879,7 @@ void Document::paint(Painter &p, const QRect &clip, TextSelection selection, con
if (radial) { if (radial) {
auto rinner = inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine)); auto rinner = inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine));
auto &bg = selected ? st::msgInBgSelected : st::msgInBg; auto &bg = selected ? st::historyFileInRadialFgSelected : st::historyFileInRadialFg;
_radial->draw(p, rinner, st::msgFileRadialLine, bg); _radial->draw(p, rinner, st::msgFileRadialLine, bg);
} }