mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Removed display of right buttons in message field while editing message.
This commit is contained in:
parent
4e109e0517
commit
39f494eadd
3 changed files with 34 additions and 10 deletions
|
@ -2852,10 +2852,10 @@ void HistoryWidget::updateControlsVisibility() {
|
|||
_silent->setVisible(!_editMsgId);
|
||||
}
|
||||
if (_scheduled) {
|
||||
_scheduled->show();
|
||||
_scheduled->setVisible(!_editMsgId);
|
||||
}
|
||||
if (_ttlInfo) {
|
||||
_ttlInfo->show();
|
||||
_ttlInfo->setVisible(!_editMsgId);
|
||||
}
|
||||
if (_sendAs) {
|
||||
_sendAs->show();
|
||||
|
@ -5010,19 +5010,33 @@ void HistoryWidget::moveFieldControls() {
|
|||
}
|
||||
|
||||
void HistoryWidget::updateFieldSize() {
|
||||
auto kbShowShown = _history && !_kbShown && _keyboard->hasMarkup();
|
||||
const auto kbShowShown = _history && !_kbShown && _keyboard->hasMarkup();
|
||||
auto fieldWidth = width()
|
||||
- _attachToggle->width()
|
||||
- st::historySendRight
|
||||
- _send->width()
|
||||
- _tabbedSelectorToggle->width();
|
||||
if (_botMenuButton) fieldWidth -= st::historyBotMenuSkip + _botMenuButton->width();
|
||||
if (_sendAs) fieldWidth -= _sendAs->width();
|
||||
if (kbShowShown) fieldWidth -= _botKeyboardShow->width();
|
||||
if (_cmdStartShown) fieldWidth -= _botCommandStart->width();
|
||||
if (_silent && !_silent->isHidden()) fieldWidth -= _silent->width();
|
||||
if (_scheduled) fieldWidth -= _scheduled->width();
|
||||
if (_ttlInfo) fieldWidth -= _ttlInfo->width();
|
||||
if (_botMenuButton) {
|
||||
fieldWidth -= st::historyBotMenuSkip + _botMenuButton->width();
|
||||
}
|
||||
if (_sendAs) {
|
||||
fieldWidth -= _sendAs->width();
|
||||
}
|
||||
if (kbShowShown) {
|
||||
fieldWidth -= _botKeyboardShow->width();
|
||||
}
|
||||
if (_cmdStartShown) {
|
||||
fieldWidth -= _botCommandStart->width();
|
||||
}
|
||||
if (_silent && _silent->isVisible()) {
|
||||
fieldWidth -= _silent->width();
|
||||
}
|
||||
if (_scheduled && _scheduled->isVisible()) {
|
||||
fieldWidth -= _scheduled->width();
|
||||
}
|
||||
if (_ttlInfo && _ttlInfo->isVisible()) {
|
||||
fieldWidth -= _ttlInfo->width();
|
||||
}
|
||||
|
||||
if (_fieldDisabled) {
|
||||
_fieldDisabled->resize(fieldWidth, fieldHeight());
|
||||
|
|
|
@ -50,6 +50,14 @@ void TTLButton::hide() {
|
|||
_button.hide();
|
||||
}
|
||||
|
||||
void TTLButton::setVisible(bool visible) {
|
||||
_button.setVisible(visible);
|
||||
}
|
||||
|
||||
bool TTLButton::isVisible() const {
|
||||
return _button.isVisible();
|
||||
}
|
||||
|
||||
void TTLButton::move(int x, int y) {
|
||||
_button.move(x, y);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@ public:
|
|||
|
||||
void show();
|
||||
void hide();
|
||||
void setVisible(bool visible);
|
||||
[[nodiscard]] bool isVisible() const;
|
||||
void move(int x, int y);
|
||||
|
||||
[[nodiscard]] int width() const;
|
||||
|
|
Loading…
Add table
Reference in a new issue