This commit is contained in:
fourtf
2018-06-26 13:24:55 +02:00
parent ec04f10895
commit c9722b9780
301 changed files with 0 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#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