File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Telegram/SourceFiles/info/userpic Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -270,10 +270,12 @@ object_ptr<Ui::RpWidget> CreateGradientEditor(
270
270
Ui::AddDivider (container);
271
271
Ui::AddSkip (container);
272
272
273
- const auto editor = container-> add ( object_ptr<ColorEditor>(
273
+ auto ownedEditor = object_ptr<ColorEditor>(
274
274
container,
275
275
ColorEditor::Mode::HSL,
276
- state->colors .back ()));
276
+ state->colors .back ());
277
+ container->resizeToWidth (ownedEditor->width ());
278
+ const auto editor = container->add (std::move (ownedEditor));
277
279
278
280
buttonsContainer->chosenChanges (
279
281
) | rpl::start_with_next ([=](ColorsLine::Chosen *chosen) {
@@ -305,7 +307,6 @@ object_ptr<Ui::RpWidget> CreateGradientEditor(
305
307
save ();
306
308
}, container->lifetime ());
307
309
308
- container->resizeToWidth (editor->width ());
309
310
buttonsContainer->init ();
310
311
311
312
return container;
You can’t perform that action at this time.
0 commit comments