ui: overlay window base size
* added property in application settings to define a basic width and height that is used when creating new overlay windows. * fixed crash in tests
This commit is contained in:
@@ -153,6 +153,16 @@ void ApplicationSettings::setIndexerThreadCount(const int count)
|
||||
setValue<int>("application/indexer_thread_count", count);
|
||||
}
|
||||
|
||||
int ApplicationSettings::getWindowBaseWidth() const
|
||||
{
|
||||
return getValue<int>("application/window_base_width", 500);
|
||||
}
|
||||
|
||||
int ApplicationSettings::getWindowBaseHeight() const
|
||||
{
|
||||
return getValue<int>("application/window_base_height", 500);
|
||||
}
|
||||
|
||||
int ApplicationSettings::getCodeTabWidth() const
|
||||
{
|
||||
return getValue<int>("code/tab_width", 4);
|
||||
|
||||
@@ -50,6 +50,9 @@ public:
|
||||
int getIndexerThreadCount() const;
|
||||
void setIndexerThreadCount(const int count);
|
||||
|
||||
int getWindowBaseWidth() const;
|
||||
int getWindowBaseHeight() const;
|
||||
|
||||
// code
|
||||
int getCodeTabWidth() const;
|
||||
void setCodeTabWidth(int codeTabWidth);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "qt/utility/QtDeviceScaledPixmap.h"
|
||||
#include "qt/utility/utilityQt.h"
|
||||
#include "settings/ApplicationSettings.h"
|
||||
#include "utility/ResourcePaths.h"
|
||||
|
||||
QtWindow::QtWindow(QWidget* parent)
|
||||
@@ -56,7 +57,10 @@ QtWindow::QtWindow(QWidget* parent)
|
||||
|
||||
QSize QtWindow::sizeHint() const
|
||||
{
|
||||
return QSize(500, 500);
|
||||
return QSize(
|
||||
ApplicationSettings::getInstance()->getWindowBaseWidth(),
|
||||
ApplicationSettings::getInstance()->getWindowBaseHeight()
|
||||
);
|
||||
}
|
||||
|
||||
void QtWindow::setup()
|
||||
|
||||
@@ -233,11 +233,6 @@ private:
|
||||
clear();
|
||||
}
|
||||
|
||||
~TestStorage()
|
||||
{
|
||||
boost::filesystem::remove("data/test.sqlite");
|
||||
}
|
||||
|
||||
std::shared_ptr<TokenLocationCollection> getLocationCollectionForTokenId(Id id) const
|
||||
{
|
||||
std::vector<Id> tokenIds;
|
||||
|
||||
Reference in New Issue
Block a user