mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Move "who read" context menu item to the bottom.
This commit is contained in:
parent
a5caebe890
commit
a550b73e2c
4 changed files with 20 additions and 16 deletions
|
@ -1861,17 +1861,6 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (hasWhoReadItem) {
|
|
||||||
const auto participantChosen = [=](uint64 id) {
|
|
||||||
controller->showPeerInfo(PeerId(id));
|
|
||||||
};
|
|
||||||
_menu->addAction(Ui::WhoReadContextAction(
|
|
||||||
_menu.get(),
|
|
||||||
Api::WhoRead(_dragStateItem, this, st::defaultWhoRead),
|
|
||||||
participantChosen));
|
|
||||||
_menu->addSeparator();
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto link = ClickHandler::getActive();
|
const auto link = ClickHandler::getActive();
|
||||||
auto lnkPhoto = dynamic_cast<PhotoClickHandler*>(link.get());
|
auto lnkPhoto = dynamic_cast<PhotoClickHandler*>(link.get());
|
||||||
auto lnkDocument = dynamic_cast<DocumentClickHandler*>(link.get());
|
auto lnkDocument = dynamic_cast<DocumentClickHandler*>(link.get());
|
||||||
|
@ -2090,6 +2079,19 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hasWhoReadItem) {
|
||||||
|
const auto participantChosen = [=](uint64 id) {
|
||||||
|
controller->showPeerInfo(PeerId(id));
|
||||||
|
};
|
||||||
|
if (!_menu->empty()) {
|
||||||
|
_menu->addSeparator();
|
||||||
|
}
|
||||||
|
_menu->addAction(Ui::WhoReadContextAction(
|
||||||
|
_menu.get(),
|
||||||
|
Api::WhoRead(_dragStateItem, this, st::defaultWhoRead),
|
||||||
|
participantChosen));
|
||||||
|
}
|
||||||
|
|
||||||
if (_menu->empty()) {
|
if (_menu->empty()) {
|
||||||
_menu = nullptr;
|
_menu = nullptr;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -60,6 +60,7 @@ void InlineList::layoutButtons() {
|
||||||
_buttons.clear();
|
_buttons.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
_data.chosenReaction;
|
||||||
auto sorted = ranges::view::all(
|
auto sorted = ranges::view::all(
|
||||||
_data.reactions
|
_data.reactions
|
||||||
) | ranges::view::transform([](const auto &pair) {
|
) | ranges::view::transform([](const auto &pair) {
|
||||||
|
|
|
@ -903,14 +903,15 @@ defaultWhoRead: WhoRead {
|
||||||
photoSize: 30px;
|
photoSize: 30px;
|
||||||
photoSkip: 5px;
|
photoSkip: 5px;
|
||||||
nameLeft: 57px;
|
nameLeft: 57px;
|
||||||
iconPosition: point(10px, 7px);
|
iconPosition: point(15px, 7px);
|
||||||
itemPadding: margins(41px, 9px, 17px, 7px);
|
itemPadding: margins(44px, 9px, 17px, 7px);
|
||||||
}
|
}
|
||||||
whoReadMenu: PopupMenu(popupMenuWithIcons) {
|
whoReadMenu: PopupMenu(popupMenuWithIcons) {
|
||||||
scrollPadding: margins(0px, 6px, 0px, 6px);
|
scrollPadding: margins(0px, 6px, 0px, 4px);
|
||||||
maxHeight: 387px;
|
maxHeight: 387px;
|
||||||
menu: Menu(menuWithIcons) {
|
menu: Menu(menuWithIcons) {
|
||||||
separatorPadding: margins(0px, 6px, 0px, 5px);
|
separatorPadding: margins(0px, 4px, 0px, 4px);
|
||||||
|
separatorWidth: 6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
whoReadChecks: icon{{ "menu/read_ticks", menuSubmenuArrowFg }};
|
whoReadChecks: icon{{ "menu/read_ticks", menuSubmenuArrowFg }};
|
||||||
|
|
|
@ -10,7 +10,7 @@ using "ui/widgets/widgets.style";
|
||||||
|
|
||||||
menuWithIcons: Menu(defaultMenu) {
|
menuWithIcons: Menu(defaultMenu) {
|
||||||
itemIconPosition: point(15px, 5px);
|
itemIconPosition: point(15px, 5px);
|
||||||
itemPadding: margins(56px, 8px, 17px, 8px);
|
itemPadding: margins(54px, 8px, 17px, 8px);
|
||||||
}
|
}
|
||||||
popupMenuWithIcons: PopupMenu(defaultPopupMenu) {
|
popupMenuWithIcons: PopupMenu(defaultPopupMenu) {
|
||||||
scrollPadding: margins(0px, 5px, 0px, 5px);
|
scrollPadding: margins(0px, 5px, 0px, 5px);
|
||||||
|
|
Loading…
Add table
Reference in a new issue