update settings version
This commit is contained in:
+1
-1
Submodule lib/settings updated: 1282c351db...d3faa9b399
@@ -26,7 +26,7 @@ MainWindow::MainWindow(ChannelManager &_channelManager, ColorScheme &_colorSchem
|
|||||||
, colorScheme(_colorScheme)
|
, colorScheme(_colorScheme)
|
||||||
, completionManager(_completionManager)
|
, completionManager(_completionManager)
|
||||||
, notebook(this->channelManager, this)
|
, notebook(this->channelManager, this)
|
||||||
, windowGeometry("/windows/0/geometry")
|
// , windowGeometry("/windows/0/geometry")
|
||||||
{
|
{
|
||||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||||
|
|
||||||
@@ -47,9 +47,9 @@ MainWindow::MainWindow(ChannelManager &_channelManager, ColorScheme &_colorSchem
|
|||||||
|
|
||||||
this->refreshTheme();
|
this->refreshTheme();
|
||||||
|
|
||||||
if (this->windowGeometry->isFilled()) {
|
if (/*this->windowGeometry->isFilled()*/ false) {
|
||||||
// Load geometry from settings file
|
// Load geometry from settings file
|
||||||
this->setGeometry(this->windowGeometry.getValueRef());
|
// this->setGeometry(this->windowGeometry.getValueRef());
|
||||||
} else {
|
} else {
|
||||||
// Set default geometry
|
// Set default geometry
|
||||||
// Default position is in the middle of the current monitor or the primary monitor
|
// Default position is in the middle of the current monitor or the primary monitor
|
||||||
@@ -163,7 +163,7 @@ Notebook &MainWindow::getNotebook()
|
|||||||
void MainWindow::closeEvent(QCloseEvent *)
|
void MainWindow::closeEvent(QCloseEvent *)
|
||||||
{
|
{
|
||||||
// Save closing window position
|
// Save closing window position
|
||||||
this->windowGeometry = this->geometry();
|
// this->windowGeometry = this->geometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::refreshTheme()
|
void MainWindow::refreshTheme()
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ private:
|
|||||||
bool loaded = false;
|
bool loaded = false;
|
||||||
TitleBar titleBar;
|
TitleBar titleBar;
|
||||||
|
|
||||||
|
/*
|
||||||
class QRectWrapper : public pajlada::Settings::ISettingData, public QRect
|
class QRectWrapper : public pajlada::Settings::ISettingData, public QRect
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -66,14 +67,6 @@ private:
|
|||||||
|
|
||||||
pajlada::Signals::Signal<const QRectWrapper &> valueChanged;
|
pajlada::Signals::Signal<const QRectWrapper &> valueChanged;
|
||||||
|
|
||||||
/*
|
|
||||||
operator const QRect &() const
|
|
||||||
{
|
|
||||||
return static_cast<const QRect &>(*this);
|
|
||||||
// return this->getValue();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
const QRectWrapper &getValueRef() const
|
const QRectWrapper &getValueRef() const
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
@@ -145,8 +138,9 @@ private:
|
|||||||
static_cast<QRect &>(*this) = rhs;
|
static_cast<QRect &>(*this) = rhs;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
pajlada::Settings::Setting<QRectWrapper, QRectWrapper> windowGeometry;
|
//pajlada::Settings::Setting<QRectWrapper> windowGeometry;
|
||||||
|
|
||||||
friend class Notebook;
|
friend class Notebook;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user