diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index f3feef73f6..3ddf972e42 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -4320,7 +4320,8 @@ void HistoryInner::elementShowAddPollOption( view, poll, context, - _controller); + _controller, + _controller->chatStyle()); } void HistoryInner::elementSubmitAddPollOption(FullMsgId context) { diff --git a/Telegram/SourceFiles/history/view/history_view_add_poll_option.cpp b/Telegram/SourceFiles/history/view/history_view_add_poll_option.cpp index 043bb1094c..b59c822a32 100644 --- a/Telegram/SourceFiles/history/view/history_view_add_poll_option.cpp +++ b/Telegram/SourceFiles/history/view/history_view_add_poll_option.cpp @@ -27,6 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "main/main_app_config.h" #include "main/main_session.h" #include "poll/poll_media_upload.h" +#include "ui/chat/chat_style.h" #include "ui/widgets/buttons.h" #include "ui/widgets/fields/input_field.h" #include "ui/toast/toast.h" @@ -261,19 +262,27 @@ rpl::producer<> AddPollOptionWidget::cancelled() const { return _cancelledEvents.events(); } +void AddPollOptionWidget::setPlaceholderColorOverride( + const style::color &color) { + _field->setPlaceholderColorOverride(color); +} + void ShowAddPollOptionOverlay( ElementOverlayHost &host, not_null parent, not_null view, not_null poll, FullMsgId context, - not_null controller) { + not_null controller, + not_null st) { auto widget = base::make_unique_q( parent, poll, context, controller); const auto raw = widget.get(); + const auto &msgSt = st->messageStyle(view->hasOutLayout(), false); + raw->setPlaceholderColorOverride(msgSt.msgDateFg); host.show( view, context, diff --git a/Telegram/SourceFiles/history/view/history_view_add_poll_option.h b/Telegram/SourceFiles/history/view/history_view_add_poll_option.h index 0760dbb399..7b76600313 100644 --- a/Telegram/SourceFiles/history/view/history_view_add_poll_option.h +++ b/Telegram/SourceFiles/history/view/history_view_add_poll_option.h @@ -22,6 +22,7 @@ class PollMediaUploader; } // namespace PollMediaUpload namespace Ui { +class ChatStyle; class InputField; class IconButton; } // namespace Ui @@ -47,6 +48,7 @@ public: FullMsgId itemId, not_null controller); + void setPlaceholderColorOverride(const style::color &color); void updatePosition(QPoint topLeft, int width); void triggerSubmit(); @@ -83,6 +85,7 @@ void ShowAddPollOptionOverlay( not_null view, not_null poll, FullMsgId context, - not_null controller); + not_null controller, + not_null st); } // namespace HistoryView diff --git a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp index 12a73d0bd0..3f3a3f11e1 100644 --- a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp @@ -1910,7 +1910,8 @@ void ListWidget::elementShowAddPollOption( view, poll, context, - controller()); + controller(), + _delegate->listChatStyle()); } void ListWidget::elementSubmitAddPollOption(FullMsgId context) {