added debug information on F10
This commit is contained in:
@@ -95,9 +95,11 @@ ChannelView::ChannelView(BaseWidget *parent)
|
||||
|
||||
this->pauseTimeout.setSingleShot(true);
|
||||
|
||||
auto e = new QResizeEvent(this->size(), this->size());
|
||||
this->resizeEvent(e);
|
||||
delete e;
|
||||
// auto e = new QResizeEvent(this->size(), this->size());
|
||||
// this->resizeEvent(e);
|
||||
// delete e;
|
||||
|
||||
this->scrollBar.resize(this->scrollBar.width(), height());
|
||||
|
||||
singletons::SettingManager::getInstance().showLastMessageIndicator.connect(
|
||||
[this](auto, auto) { this->update(); }, this->managedConnections);
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
#include "debugpopup.hpp"
|
||||
|
||||
#include "util/debugcount.hpp"
|
||||
|
||||
#include <QFontDatabase>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QTimer>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
||||
DebugPopup::DebugPopup()
|
||||
{
|
||||
auto *layout = new QHBoxLayout(this);
|
||||
auto *text = new QLabel(this);
|
||||
auto *timer = new QTimer(this);
|
||||
|
||||
timer->setInterval(1000);
|
||||
QObject::connect(timer, &QTimer::timeout,
|
||||
[text] { text->setText(util::DebugCount::getDebugText()); });
|
||||
timer->start();
|
||||
|
||||
text->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
|
||||
|
||||
layout->addWidget(text);
|
||||
}
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWindow>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
||||
class DebugPopup : public QWidget
|
||||
{
|
||||
public:
|
||||
DebugPopup();
|
||||
};
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "singletons/windowmanager.hpp"
|
||||
#include "util/streamlink.hpp"
|
||||
#include "util/urlfetch.hpp"
|
||||
#include "widgets/helper/debugpopup.hpp"
|
||||
#include "widgets/helper/searchpopup.hpp"
|
||||
#include "widgets/helper/shortcut.hpp"
|
||||
#include "widgets/qualitypopup.hpp"
|
||||
@@ -72,6 +73,13 @@ Split::Split(SplitContainer *parent, const std::string &_uuid)
|
||||
// CTRL+F: Search
|
||||
CreateShortcut(this, "CTRL+F", &Split::doSearch);
|
||||
|
||||
// F12
|
||||
CreateShortcut(this, "F10", [] {
|
||||
auto *popup = new DebugPopup;
|
||||
popup->setAttribute(Qt::WA_DeleteOnClose);
|
||||
popup->show();
|
||||
});
|
||||
|
||||
// xd
|
||||
// CreateShortcut(this, "ALT+SHIFT+RIGHT", &Split::doIncFlexX);
|
||||
// CreateShortcut(this, "ALT+SHIFT+LEFT", &Split::doDecFlexX);
|
||||
|
||||
@@ -22,6 +22,10 @@ namespace widgets {
|
||||
|
||||
class SplitContainer;
|
||||
|
||||
class xD
|
||||
{
|
||||
};
|
||||
|
||||
// Each ChatWidget consists of three sub-elements that handle their own part of the chat widget:
|
||||
// ChatWidgetHeader
|
||||
// - Responsible for rendering which channel the ChatWidget is in, and the menu in the top-left of
|
||||
|
||||
@@ -41,7 +41,7 @@ SplitContainer::SplitContainer(Notebook *parent, NotebookTab *_tab, const std::s
|
||||
this->setHidden(true);
|
||||
this->setAcceptDrops(true);
|
||||
|
||||
this->ui.parentLayout.addSpacing(2);
|
||||
this->ui.parentLayout.addSpacing(1);
|
||||
this->ui.parentLayout.addLayout(&this->ui.hbox);
|
||||
this->ui.parentLayout.setMargin(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user