diff --git a/Telegram/Resources/icons/send_control_scheduled_no_dot.png b/Telegram/Resources/icons/send_control_scheduled_no_dot.png new file mode 100644 index 000000000..ed21b6e95 Binary files /dev/null and b/Telegram/Resources/icons/send_control_scheduled_no_dot.png differ diff --git a/Telegram/Resources/icons/send_control_scheduled_no_dot@2x.png b/Telegram/Resources/icons/send_control_scheduled_no_dot@2x.png new file mode 100644 index 000000000..bc1ecbbf8 Binary files /dev/null and b/Telegram/Resources/icons/send_control_scheduled_no_dot@2x.png differ diff --git a/Telegram/Resources/icons/send_control_scheduled_no_dot@3x.png b/Telegram/Resources/icons/send_control_scheduled_no_dot@3x.png new file mode 100644 index 000000000..d0c17193a Binary files /dev/null and b/Telegram/Resources/icons/send_control_scheduled_no_dot@3x.png differ diff --git a/Telegram/SourceFiles/history/history.style b/Telegram/SourceFiles/history/history.style index 2b5d683c8..708038f11 100644 --- a/Telegram/SourceFiles/history/history.style +++ b/Telegram/SourceFiles/history/history.style @@ -283,6 +283,11 @@ historyScheduledToggle: IconButton(historyAttach) { }; iconPosition: point(-1px, -1px); } +historyScheduledToggleEmpty: IconButton(historyAttach) { + icon: icon {{ "send_control_scheduled_no_dot", historyComposeIconFg }}; + iconOver: icon {{ "send_control_scheduled_no_dot", historyComposeIconFgOver }}; + iconPosition: point(-1px, -1px); +} historyRecordVoiceFg: historyComposeIconFg; historyRecordVoiceFgOver: historyComposeIconFgOver; historyRecordVoiceFgActive: windowBgActive; diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index a6e9cc187..42a329086 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -1959,17 +1959,16 @@ void HistoryWidget::setupScheduledToggle() { } void HistoryWidget::refreshScheduledToggle() { - const auto has = _history - && _peer->canWrite() - && (session().data().scheduledMessages().count(_history) > 0); - if (!_scheduled && has) { - _scheduled.create(this, st::historyScheduledToggle); + const auto canWrite = _history && _peer->canWrite(); + const auto has = canWrite && (session().data().scheduledMessages().count(_history) > 0); + if (!_scheduled && canWrite) { + _scheduled.create(this, (has ? st::historyScheduledToggle : st::historyScheduledToggleEmpty)); _scheduled->show(); _scheduled->addClickHandler([=] { controller()->showSection( HistoryView::ScheduledMemento(_history)); }); - } else if (_scheduled && !has) { + } else if (_scheduled && !canWrite) { _scheduled.destroy(); } }