mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Add info button to AI Tools box.
This commit is contained in:
@@ -1330,3 +1330,11 @@ aiComposeBoxWithSend: Box(aiComposeBox) {
|
||||
buttonPadding: margins(16px, 12px, 66px, 12px);
|
||||
}
|
||||
aiComposeSendButtonSkip: 8px;
|
||||
aiComposeBoxClose: IconButton(boxTitleClose) {
|
||||
ripple: defaultRippleAnimation;
|
||||
}
|
||||
aiComposeBoxInfoButton: IconButton(boxTitleClose) {
|
||||
icon: icon {{ "menu/info", boxTitleCloseFg }};
|
||||
iconOver: icon {{ "menu/info", boxTitleCloseFgOver }};
|
||||
ripple: defaultRippleAnimation;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "main/main_session.h"
|
||||
#include "settings/sections/settings_premium.h"
|
||||
#include "spellcheck/platform/platform_language.h"
|
||||
#include "ui/boxes/about_cocoon_box.h"
|
||||
#include "ui/boxes/choose_language_box.h"
|
||||
#include "ui/chat/chat_style.h"
|
||||
#include "ui/controls/labeled_emoji_tabs.h"
|
||||
@@ -1397,9 +1398,12 @@ void ComposeAiBox(not_null<Ui::GenericBox*> box, ComposeAiBoxArgs &&args) {
|
||||
box->setNoContentMargin(true);
|
||||
box->setWidth(st::boxWideWidth);
|
||||
const auto session = args.session;
|
||||
box->addTopButton(st::boxTitleClose, [=] {
|
||||
box->addTopButton(st::aiComposeBoxClose, [=] {
|
||||
box->closeBox();
|
||||
});
|
||||
box->addTopButton(st::aiComposeBoxInfoButton, [=] {
|
||||
box->uiShow()->show(Box(Ui::AboutCocoonBox));
|
||||
});
|
||||
|
||||
const auto body = box->verticalLayout();
|
||||
const auto tabsSkip = QMargins(0, 0, 0, st::aiComposeBoxStyleTabsSkip);
|
||||
@@ -1493,9 +1497,12 @@ void ComposeAiBox(not_null<Ui::GenericBox*> box, ComposeAiBoxArgs &&args) {
|
||||
}
|
||||
*sendButton = nullptr;
|
||||
box->clearButtons();
|
||||
box->addTopButton(st::boxTitleClose, [=] {
|
||||
box->addTopButton(st::aiComposeBoxClose, [=] {
|
||||
box->closeBox();
|
||||
});
|
||||
box->addTopButton(st::aiComposeBoxInfoButton, [=] {
|
||||
box->uiShow()->show(Box(Ui::AboutCocoonBox));
|
||||
});
|
||||
|
||||
if (*premiumFlooded) {
|
||||
auto helper = Ui::Text::CustomEmojiHelper();
|
||||
|
||||
Reference in New Issue
Block a user