mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
feat: use custom icon for plugin files
This commit is contained in:
BIN
Binary file not shown.
|
After Width: | Height: | Size: 382 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 608 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 858 B |
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
using "ui/colors.palette";
|
||||
using "ui/chat/chat.style";
|
||||
using "ui/widgets/widgets.style";
|
||||
using "dialogs/dialogs.style";
|
||||
|
||||
@@ -71,3 +72,8 @@ dialogsExteraSupporterIcon: ThreeStateIcon {
|
||||
over: icon {{ "ayu/dialogs_extera_supporter", dialogsVerifiedIconBgOver }};
|
||||
active: icon {{ "ayu/dialogs_extera_supporter", dialogsVerifiedIconBgActive }};
|
||||
}
|
||||
|
||||
ayuHistoryFileInPlugin: icon {{ "ayu/history_file_plugin", historyFileInIconFg }};
|
||||
ayuHistoryFileInPluginSelected: icon {{ "ayu/history_file_plugin", historyFileInIconFgSelected }};
|
||||
ayuHistoryFileOutPlugin: icon {{ "ayu/history_file_plugin", historyFileOutIconFg }};
|
||||
ayuHistoryFileOutPluginSelected: icon {{ "ayu/history_file_plugin", historyFileOutIconFgSelected }};
|
||||
|
||||
@@ -805,6 +805,10 @@ void Document::draw(
|
||||
: stm->historyFilePlay)
|
||||
: _data->isImage()
|
||||
? stm->historyFileImage
|
||||
: _data->filename().endsWith(
|
||||
u".plugin"_q,
|
||||
Qt::CaseInsensitive)
|
||||
? stm->historyFilePlugin
|
||||
: stm->historyFileDocument;
|
||||
} else {
|
||||
return _data->isSongWithCover()
|
||||
|
||||
@@ -480,6 +480,12 @@ ChatStyle::ChatStyle(rpl::producer<ColorIndicesCompressed> colorIndices) {
|
||||
st::historyFileInDocumentSelected,
|
||||
st::historyFileOutDocument,
|
||||
st::historyFileOutDocumentSelected);
|
||||
make(
|
||||
&MessageStyle::historyFilePlugin,
|
||||
st::ayuHistoryFileInPlugin,
|
||||
st::ayuHistoryFileInPluginSelected,
|
||||
st::ayuHistoryFileOutPlugin,
|
||||
st::ayuHistoryFileOutPluginSelected);
|
||||
make(
|
||||
&MessageStyle::historyAudioDownload,
|
||||
st::historyAudioInDownload,
|
||||
|
||||
@@ -87,6 +87,7 @@ struct MessageStyle {
|
||||
style::icon historyFilePause = { Qt::Uninitialized };
|
||||
style::icon historyFileImage = { Qt::Uninitialized };
|
||||
style::icon historyFileDocument = { Qt::Uninitialized };
|
||||
style::icon historyFilePlugin = { Qt::Uninitialized };
|
||||
style::icon historyAudioDownload = { Qt::Uninitialized };
|
||||
style::icon historyAudioCancel = { Qt::Uninitialized };
|
||||
style::icon historyQuizTimer = { Qt::Uninitialized };
|
||||
|
||||
Reference in New Issue
Block a user