mirror-chatterino2/src/util/RemoveScrollAreaBackground.hpp
Paweł be21e5b52d
Fixed deprecated method QPalette::{Fore,Back}ground (#2510)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2021-03-13 16:03:16 +01:00

20 lines
429 B
C++

#pragma once
#include <QScrollArea>
namespace chatterino {
static void removeScrollAreaBackground(QScrollArea *scrollArea,
QWidget *childWidget)
{
scrollArea->setWidgetResizable(true);
scrollArea->setFrameStyle(0);
QPalette p;
p.setColor(QPalette::Window, QColor(0, 0, 0, 0));
scrollArea->setPalette(p);
childWidget->setPalette(p);
}
} // namespace chatterino