mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Force right-alignment in quick replies editing.
This commit is contained in:
parent
9483d17fc8
commit
bef26cf9d2
3 changed files with 8 additions and 1 deletions
|
@ -1734,7 +1734,7 @@ void ListWidget::elementHandleViaClick(not_null<UserData*> bot) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ListWidget::elementIsChatWide() {
|
bool ListWidget::elementIsChatWide() {
|
||||||
return _isChatWide;
|
return _overrideIsChatWide.value_or(_isChatWide);
|
||||||
}
|
}
|
||||||
|
|
||||||
not_null<Ui::PathShiftGradient*> ListWidget::elementPathShiftGradient() {
|
not_null<Ui::PathShiftGradient*> ListWidget::elementPathShiftGradient() {
|
||||||
|
@ -3963,6 +3963,10 @@ void ListWidget::setEmptyInfoWidget(base::unique_qptr<Ui::RpWidget> &&w) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ListWidget::overrideIsChatWide(bool isWide) {
|
||||||
|
_overrideIsChatWide = isWide;
|
||||||
|
}
|
||||||
|
|
||||||
ListWidget::~ListWidget() {
|
ListWidget::~ListWidget() {
|
||||||
// Destroy child widgets first, because they may invoke leaveEvent-s.
|
// Destroy child widgets first, because they may invoke leaveEvent-s.
|
||||||
_emptyInfo = nullptr;
|
_emptyInfo = nullptr;
|
||||||
|
|
|
@ -343,6 +343,7 @@ public:
|
||||||
QString elementAuthorRank(not_null<const Element*> view) override;
|
QString elementAuthorRank(not_null<const Element*> view) override;
|
||||||
|
|
||||||
void setEmptyInfoWidget(base::unique_qptr<Ui::RpWidget> &&w);
|
void setEmptyInfoWidget(base::unique_qptr<Ui::RpWidget> &&w);
|
||||||
|
void overrideIsChatWide(bool isWide);
|
||||||
|
|
||||||
~ListWidget();
|
~ListWidget();
|
||||||
|
|
||||||
|
@ -725,6 +726,7 @@ private:
|
||||||
bool _refreshingViewer = false;
|
bool _refreshingViewer = false;
|
||||||
bool _showFinished = false;
|
bool _showFinished = false;
|
||||||
bool _resizePending = false;
|
bool _resizePending = false;
|
||||||
|
std::optional<bool> _overrideIsChatWide;
|
||||||
|
|
||||||
// _menu must be destroyed before _whoReactedMenuLifetime.
|
// _menu must be destroyed before _whoReactedMenuLifetime.
|
||||||
rpl::lifetime _whoReactedMenuLifetime;
|
rpl::lifetime _whoReactedMenuLifetime;
|
||||||
|
|
|
@ -372,6 +372,7 @@ ShortcutMessages::ShortcutMessages(
|
||||||
this,
|
this,
|
||||||
controller,
|
controller,
|
||||||
static_cast<ListDelegate*>(this));
|
static_cast<ListDelegate*>(this));
|
||||||
|
_inner->overrideIsChatWide(false);
|
||||||
|
|
||||||
_scroll->sizeValue() | rpl::filter([](QSize size) {
|
_scroll->sizeValue() | rpl::filter([](QSize size) {
|
||||||
return !size.isEmpty();
|
return !size.isEmpty();
|
||||||
|
|
Loading…
Add table
Reference in a new issue