From c226311126120300fcce10e5ec654fa229ff8c09 Mon Sep 17 00:00:00 2001 From: ZavaruKitsu Date: Mon, 28 Aug 2023 15:07:50 +0000 Subject: [PATCH] feat: add lottie icons support in context menu Co-authored-by: MaxPlays35 <35427519+maxplays35@users.noreply.github.com> --- Telegram/CMakeLists.txt | 2 ++ Telegram/SourceFiles/ayu/ui/ayu_lottie.cpp | 16 ++++++++++++++++ Telegram/SourceFiles/ayu/ui/ayu_lottie.h | 14 ++++++++++++++ Telegram/lib_ui | 2 +- 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Telegram/SourceFiles/ayu/ui/ayu_lottie.cpp create mode 100644 Telegram/SourceFiles/ayu/ui/ayu_lottie.h diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 648237d99..5dcf1be3e 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -102,6 +102,8 @@ PRIVATE ayu/ayu_lang.cpp ayu/ayu_lang.h ayu/ayu_constants.h + ayu/ui/ayu_lottie.cpp + ayu/ui/ayu_lottie.h ayu/ui/utils/ayu_profile_values.cpp ayu/ui/utils/ayu_profile_values.h ayu/ui/settings/settings_ayu.cpp diff --git a/Telegram/SourceFiles/ayu/ui/ayu_lottie.cpp b/Telegram/SourceFiles/ayu/ui/ayu_lottie.cpp new file mode 100644 index 000000000..399b055c6 --- /dev/null +++ b/Telegram/SourceFiles/ayu/ui/ayu_lottie.cpp @@ -0,0 +1,16 @@ +// This is the source code of AyuGram for Desktop. +// +// We do not and cannot prevent the use of our code, +// but be respectful and credit the original author. +// +// Copyright @Radolyn, 2023 + +#include "ayu_lottie.h" + +namespace AyuUi { + std::unique_ptr getLottie(const QString& text) { + // todo: some kind of mapping + // Lottie::MakeIcon({.json = QString(), .sizeOverride = {24, 24}}); + return nullptr; + } +} \ No newline at end of file diff --git a/Telegram/SourceFiles/ayu/ui/ayu_lottie.h b/Telegram/SourceFiles/ayu/ui/ayu_lottie.h new file mode 100644 index 000000000..5aab581f5 --- /dev/null +++ b/Telegram/SourceFiles/ayu/ui/ayu_lottie.h @@ -0,0 +1,14 @@ +// This is the source code of AyuGram for Desktop. +// +// We do not and cannot prevent the use of our code, +// but be respectful and credit the original author. +// +// Copyright @Radolyn, 2023 + +#pragma once + +#include "lottie/lottie_icon.h" + +namespace AyuUi { + std::unique_ptr getLottie(const QString& text); +} diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 477f5905d..12b4a5468 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 477f5905d6a4bccfa1a40ca7ed6d88d9b4c0804e +Subproject commit 12b4a546842f538511753827c4c601b83b280d1c