mirror-chatterino2/src/util/RemoveScrollAreaBackground.hpp

20 lines
429 B
C++
Raw Normal View History

#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