mirror-chatterino2/src/util/RemoveScrollAreaBackground.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
429 B
C++
Raw Normal View History

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