mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Move SendMenu additional actions to bottom.
This commit is contained in:
parent
70fe649743
commit
bb79a07262
1 changed files with 30 additions and 31 deletions
|
@ -626,37 +626,6 @@ FillMenuResult FillSendMenu(
|
||||||
? *iconsOverride
|
? *iconsOverride
|
||||||
: st::defaultComposeIcons;
|
: st::defaultComposeIcons;
|
||||||
|
|
||||||
auto toggles = false;
|
|
||||||
if (details.spoiler != SpoilerState::None) {
|
|
||||||
const auto spoilered = (details.spoiler == SpoilerState::Enabled);
|
|
||||||
menu->addAction(
|
|
||||||
(spoilered
|
|
||||||
? tr::lng_context_disable_spoiler(tr::now)
|
|
||||||
: tr::lng_context_spoiler_effect(tr::now)),
|
|
||||||
[=] { action({ .type = spoilered
|
|
||||||
? ActionType::SpoilerOff
|
|
||||||
: ActionType::SpoilerOn
|
|
||||||
}, details); },
|
|
||||||
spoilered ? &icons.menuSpoilerOff : &icons.menuSpoiler);
|
|
||||||
toggles = true;
|
|
||||||
}
|
|
||||||
if (details.caption != CaptionState::None) {
|
|
||||||
const auto above = (details.caption == CaptionState::Above);
|
|
||||||
menu->addAction(
|
|
||||||
(above
|
|
||||||
? tr::lng_caption_move_down(tr::now)
|
|
||||||
: tr::lng_caption_move_up(tr::now)),
|
|
||||||
[=] { action({ .type = above
|
|
||||||
? ActionType::CaptionDown
|
|
||||||
: ActionType::CaptionUp
|
|
||||||
}, details); },
|
|
||||||
above ? &icons.menuBelow : &icons.menuAbove);
|
|
||||||
toggles = true;
|
|
||||||
}
|
|
||||||
if (toggles && type != Type::Disabled) {
|
|
||||||
menu->addSeparator(&st::expandedMenuSeparator);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sending && type != Type::Reminder) {
|
if (sending && type != Type::Reminder) {
|
||||||
menu->addAction(
|
menu->addAction(
|
||||||
tr::lng_send_silent_message(tr::now),
|
tr::lng_send_silent_message(tr::now),
|
||||||
|
@ -680,6 +649,36 @@ FillMenuResult FillSendMenu(
|
||||||
&icons.menuWhenOnline);
|
&icons.menuWhenOnline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((type != Type::Disabled)
|
||||||
|
&& ((details.spoiler != SpoilerState::None)
|
||||||
|
|| (details.caption != CaptionState::None))) {
|
||||||
|
menu->addSeparator(&st::expandedMenuSeparator);
|
||||||
|
}
|
||||||
|
if (details.spoiler != SpoilerState::None) {
|
||||||
|
const auto spoilered = (details.spoiler == SpoilerState::Enabled);
|
||||||
|
menu->addAction(
|
||||||
|
(spoilered
|
||||||
|
? tr::lng_context_disable_spoiler(tr::now)
|
||||||
|
: tr::lng_context_spoiler_effect(tr::now)),
|
||||||
|
[=] { action({ .type = spoilered
|
||||||
|
? ActionType::SpoilerOff
|
||||||
|
: ActionType::SpoilerOn
|
||||||
|
}, details); },
|
||||||
|
spoilered ? &icons.menuSpoilerOff : &icons.menuSpoiler);
|
||||||
|
}
|
||||||
|
if (details.caption != CaptionState::None) {
|
||||||
|
const auto above = (details.caption == CaptionState::Above);
|
||||||
|
menu->addAction(
|
||||||
|
(above
|
||||||
|
? tr::lng_caption_move_down(tr::now)
|
||||||
|
: tr::lng_caption_move_up(tr::now)),
|
||||||
|
[=] { action({ .type = above
|
||||||
|
? ActionType::CaptionDown
|
||||||
|
: ActionType::CaptionUp
|
||||||
|
}, details); },
|
||||||
|
above ? &icons.menuBelow : &icons.menuAbove);
|
||||||
|
}
|
||||||
|
|
||||||
using namespace HistoryView::Reactions;
|
using namespace HistoryView::Reactions;
|
||||||
const auto effect = std::make_shared<QPointer<EffectPreview>>();
|
const auto effect = std::make_shared<QPointer<EffectPreview>>();
|
||||||
const auto position = desiredPositionOverride.value_or(QCursor::pos());
|
const auto position = desiredPositionOverride.value_or(QCursor::pos());
|
||||||
|
|
Loading…
Add table
Reference in a new issue