From 387914be318b51589454a27322be78661a4e22b6 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 30 Apr 2022 06:39:42 +0400 Subject: [PATCH] Replace style sheet in Editor::Paint --- Telegram/SourceFiles/editor/editor_paint.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/editor/editor_paint.cpp b/Telegram/SourceFiles/editor/editor_paint.cpp index 76f716a0d4..99341756e4 100644 --- a/Telegram/SourceFiles/editor/editor_paint.cpp +++ b/Telegram/SourceFiles/editor/editor_paint.cpp @@ -27,11 +27,6 @@ namespace { constexpr auto kMaxBrush = 25.; constexpr auto kMinBrush = 1.; -constexpr auto kViewStyle = "QGraphicsView {\ - background-color: transparent;\ - border: 0px\ - }"_cs; - std::shared_ptr EnsureScene( PhotoModifications &mods, const QSize &size) { @@ -62,7 +57,8 @@ Paint::Paint( _view->show(); _view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); _view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - _view->setStyleSheet(kViewStyle.utf8()); + _view->setFrameStyle(int(QFrame::NoFrame) | QFrame::Plain); + _view->viewport()->setAutoFillBackground(false); // Undo / Redo. controllers->undoController->performRequestChanges(