mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
[view-poll] Improved color of placeholder for input field in add-option.
This commit is contained in:
@@ -4320,7 +4320,8 @@ void HistoryInner::elementShowAddPollOption(
|
||||
view,
|
||||
poll,
|
||||
context,
|
||||
_controller);
|
||||
_controller,
|
||||
_controller->chatStyle());
|
||||
}
|
||||
|
||||
void HistoryInner::elementSubmitAddPollOption(FullMsgId context) {
|
||||
|
||||
@@ -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<QWidget*> parent,
|
||||
not_null<Element*> view,
|
||||
not_null<PollData*> poll,
|
||||
FullMsgId context,
|
||||
not_null<Window::SessionController*> controller) {
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<const Ui::ChatStyle*> st) {
|
||||
auto widget = base::make_unique_q<AddPollOptionWidget>(
|
||||
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,
|
||||
|
||||
@@ -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<Window::SessionController*> controller);
|
||||
|
||||
void setPlaceholderColorOverride(const style::color &color);
|
||||
void updatePosition(QPoint topLeft, int width);
|
||||
void triggerSubmit();
|
||||
|
||||
@@ -83,6 +85,7 @@ void ShowAddPollOptionOverlay(
|
||||
not_null<Element*> view,
|
||||
not_null<PollData*> poll,
|
||||
FullMsgId context,
|
||||
not_null<Window::SessionController*> controller);
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<const Ui::ChatStyle*> st);
|
||||
|
||||
} // namespace HistoryView
|
||||
|
||||
@@ -1910,7 +1910,8 @@ void ListWidget::elementShowAddPollOption(
|
||||
view,
|
||||
poll,
|
||||
context,
|
||||
controller());
|
||||
controller(),
|
||||
_delegate->listChatStyle());
|
||||
}
|
||||
|
||||
void ListWidget::elementSubmitAddPollOption(FullMsgId context) {
|
||||
|
||||
Reference in New Issue
Block a user