mirror-chatterino2/src/widgets/streamview.cpp
Rasmus Karlsson c82254aa9e Reformat
Remove some UUID remnants
2018-04-07 12:53:10 +02:00

35 lines
856 B
C++

#include "streamview.hpp"
#include "channel.hpp"
#include "util/helpers.hpp"
#include "util/layoutcreator.hpp"
#include "widgets/split.hpp"
#ifdef USEWEBENGINE
#include <QtWebEngineWidgets>
#endif
namespace chatterino {
namespace widgets {
StreamView::StreamView(ChannelPtr channel, const QUrl &url)
{
util::LayoutCreator<StreamView> layoutCreator(this);
#ifdef USEWEBENGINE
auto web = layoutCreator.emplace<QWebEngineView>(this).assign(&this->stream);
web->setUrl(url);
web->settings()->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, true);
#endif
auto chat = layoutCreator.emplace<ChannelView>();
chat->setFixedWidth(300);
chat->setChannel(channel);
this->layout()->setSpacing(0);
this->layout()->setMargin(0);
}
} // namespace widgets
} // namespace chatterino