mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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);
|
_silent->setVisible(!_editMsgId);
|
||||||
}
|
}
|
||||||
if (_scheduled) {
|
if (_scheduled) {
|
||||||
_scheduled->show();
|
_scheduled->setVisible(!_editMsgId);
|
||||||
}
|
}
|
||||||
if (_ttlInfo) {
|
if (_ttlInfo) {
|
||||||
_ttlInfo->show();
|
_ttlInfo->setVisible(!_editMsgId);
|
||||||
}
|
}
|
||||||
if (_sendAs) {
|
if (_sendAs) {
|
||||||
_sendAs->show();
|
_sendAs->show();
|
||||||
|
@ -5010,19 +5010,33 @@ void HistoryWidget::moveFieldControls() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::updateFieldSize() {
|
void HistoryWidget::updateFieldSize() {
|
||||||
auto kbShowShown = _history && !_kbShown && _keyboard->hasMarkup();
|
const auto kbShowShown = _history && !_kbShown && _keyboard->hasMarkup();
|
||||||
auto fieldWidth = width()
|
auto fieldWidth = width()
|
||||||
- _attachToggle->width()
|
- _attachToggle->width()
|
||||||
- st::historySendRight
|
- st::historySendRight
|
||||||
- _send->width()
|
- _send->width()
|
||||||
- _tabbedSelectorToggle->width();
|
- _tabbedSelectorToggle->width();
|
||||||
if (_botMenuButton) fieldWidth -= st::historyBotMenuSkip + _botMenuButton->width();
|
if (_botMenuButton) {
|
||||||
if (_sendAs) fieldWidth -= _sendAs->width();
|
fieldWidth -= st::historyBotMenuSkip + _botMenuButton->width();
|
||||||
if (kbShowShown) fieldWidth -= _botKeyboardShow->width();
|
}
|
||||||
if (_cmdStartShown) fieldWidth -= _botCommandStart->width();
|
if (_sendAs) {
|
||||||
if (_silent && !_silent->isHidden()) fieldWidth -= _silent->width();
|
fieldWidth -= _sendAs->width();
|
||||||
if (_scheduled) fieldWidth -= _scheduled->width();
|
}
|
||||||
if (_ttlInfo) fieldWidth -= _ttlInfo->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) {
|
if (_fieldDisabled) {
|
||||||
_fieldDisabled->resize(fieldWidth, fieldHeight());
|
_fieldDisabled->resize(fieldWidth, fieldHeight());
|
||||||
|
|
|
@ -50,6 +50,14 @@ void TTLButton::hide() {
|
||||||
_button.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) {
|
void TTLButton::move(int x, int y) {
|
||||||
_button.move(x, y);
|
_button.move(x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@ public:
|
||||||
|
|
||||||
void show();
|
void show();
|
||||||
void hide();
|
void hide();
|
||||||
|
void setVisible(bool visible);
|
||||||
|
[[nodiscard]] bool isVisible() const;
|
||||||
void move(int x, int y);
|
void move(int x, int y);
|
||||||
|
|
||||||
[[nodiscard]] int width() const;
|
[[nodiscard]] int width() const;
|
||||||
|
|
Loading…
Add table
Reference in a new issue