added window always on top option
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "widgets/basewidget.hpp"
|
||||
#include "colorscheme.hpp"
|
||||
#include "settingsmanager.hpp"
|
||||
|
||||
//#include <QApplication>
|
||||
#include <QDebug>
|
||||
@@ -28,6 +29,12 @@ BaseWidget::BaseWidget(BaseWidget *parent)
|
||||
this->init();
|
||||
}
|
||||
|
||||
BaseWidget::BaseWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, colorScheme(*ColorScheme::instance)
|
||||
{
|
||||
}
|
||||
|
||||
float BaseWidget::getDpiMultiplier()
|
||||
{
|
||||
BaseWidget *baseWidget = dynamic_cast<BaseWidget *>(this->window());
|
||||
@@ -60,6 +67,10 @@ void BaseWidget::initAsWindow()
|
||||
this->dpiMultiplier = dpi.value() / 96.f;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (SettingsManager::getInstance().windowTopMost.getValue()) {
|
||||
this->setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
}
|
||||
}
|
||||
|
||||
void BaseWidget::refreshTheme()
|
||||
|
||||
Reference in New Issue
Block a user