mirror-chatterino2/src/util/RemoveScrollAreaBackground.hpp

20 lines
452 B
C++
Raw Normal View History

2018-04-25 20:35:32 +02:00
#pragma once
#include <QScrollArea>
namespace chatterino {
2018-08-06 21:17:03 +02:00
static void removeScrollAreaBackground(QScrollArea *scrollArea,
QWidget *childWidget)
2018-04-25 20:35:32 +02:00
{
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