mirror-chatterino2/src/util/RemoveScrollAreaBackground.hpp

19 lines
412 B
C++
Raw Normal View History

2018-04-25 20:35:32 +02:00
#pragma once
#include <QScrollArea>
namespace chatterino {
static void removeScrollAreaBackground(QScrollArea *scrollArea, QWidget *childWidget)
{
scrollArea->setWidgetResizable(true);
scrollArea->setFrameStyle(0);
QPalette p;
p.setColor(QPalette::Background, QColor(0, 0, 0, 0));
scrollArea->setPalette(p);
childWidget->setPalette(p);
}
} // namespace chatterino