diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-03-12 09:13:00 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-03-16 09:58:26 +0000 |
commit | 03561cae90f1d99b5c54b1ef3be69f10e882b25e (patch) | |
tree | cc5f0958e823c044e7ae51cc0117fe51432abe5e /chromium/ui/views/examples/text_example.cc | |
parent | fa98118a45f7e169f8846086dc2c22c49a8ba310 (diff) | |
download | qtwebengine-chromium-03561cae90f1d99b5c54b1ef3be69f10e882b25e.tar.gz |
BASELINE: Update Chromium to 88.0.4324.208
Change-Id: I3ae87d23e4eff4b4a469685658740a213600c667
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/views/examples/text_example.cc')
-rw-r--r-- | chromium/ui/views/examples/text_example.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chromium/ui/views/examples/text_example.cc b/chromium/ui/views/examples/text_example.cc index 08f27815e47..4eed781685e 100644 --- a/chromium/ui/views/examples/text_example.cc +++ b/chromium/ui/views/examples/text_example.cc @@ -106,8 +106,9 @@ TextExample::TextExample() : ExampleBase("Text Styles") {} TextExample::~TextExample() = default; Checkbox* TextExample::AddCheckbox(GridLayout* layout, const char* name) { - return layout->AddView( - std::make_unique<Checkbox>(base::ASCIIToUTF16(name), this)); + return layout->AddView(std::make_unique<Checkbox>( + base::ASCIIToUTF16(name), + base::BindRepeating(&TextExample::UpdateStyle, base::Unretained(this)))); } Combobox* TextExample::AddCombobox(GridLayout* layout, @@ -121,7 +122,7 @@ Combobox* TextExample::AddCombobox(GridLayout* layout, std::make_unique<Combobox>( std::make_unique<ExampleComboboxModel>(strings, count)), kNumColumns - 1, 1); - combobox->set_callback( + combobox->SetCallback( base::BindRepeating(combobox_callback, base::Unretained(this))); return combobox; } @@ -208,7 +209,7 @@ void TextExample::CreateExampleView(View* container) { TextComboboxChanged(); // Sets initial text content. } -void TextExample::ButtonPressed(Button* button, const ui::Event& event) { +void TextExample::UpdateStyle() { int flags = text_view_->GetFlags(); int style = text_view_->GetStyle(); SetFlagFromCheckbox(multiline_checkbox_, &flags, gfx::Canvas::MULTI_LINE); |