Perform initial refactoring work

Things that were once singletons are no longer singletons, but are
instead stored in the "Application" singleton

Some singletons still remain, and some renaming/renamespacing is left
This commit is contained in:
Rasmus Karlsson
2018-04-27 22:11:19 +02:00
parent 32b6417a55
commit ae26b835b6
78 changed files with 850 additions and 773 deletions
+6 -6
View File
@@ -27,7 +27,7 @@ Split *SplitContainer::draggingSplit = nullptr;
std::pair<int, int> SplitContainer::dropPosition = std::pair<int, int>(-1, -1);
SplitContainer::SplitContainer(Notebook *parent, NotebookTab *_tab)
: BaseWidget(parent->themeManager, parent)
: BaseWidget(parent)
, tab(_tab)
, dropPreview(this)
{
@@ -450,9 +450,9 @@ void SplitContainer::paintEvent(QPaintEvent *)
QPainter painter(this);
if (this->ui.hbox.count() == 0) {
painter.fillRect(rect(), this->themeManager.splits.background);
painter.fillRect(rect(), this->themeManager->splits.background);
painter.setPen(this->themeManager.splits.header.text);
painter.setPen(this->themeManager->splits.header.text);
QString text = "Click to add a <split>";
@@ -467,12 +467,12 @@ void SplitContainer::paintEvent(QPaintEvent *)
painter.drawText(rect(), text, QTextOption(Qt::AlignCenter));
} else {
painter.fillRect(rect(), this->themeManager.splits.messageSeperator);
painter.fillRect(rect(), this->themeManager->splits.messageSeperator);
}
QBrush accentColor = (QApplication::activeWindow() == this->window()
? this->themeManager.tabs.selected.backgrounds.regular
: this->themeManager.tabs.selected.backgrounds.unfocused);
? this->themeManager->tabs.selected.backgrounds.regular
: this->themeManager->tabs.selected.backgrounds.unfocused);
painter.fillRect(0, 0, width(), 1, accentColor);
}