ui: Fixes in project wizzard

* stretch at end of preferences
* space at scrollbar
* default font size
* only refresh project when something changed
* fixed sizing of text fields
* icons fit to font size
* use em base sizes
* added language to project type label
This commit is contained in:
Eberhard Graether
2016-02-20 02:24:26 +01:00
parent 6e460afbfc
commit 95b3fe9950
16 changed files with 78 additions and 60 deletions
+12 -3
View File
@@ -69,7 +69,7 @@ Application::~Application()
m_mainView->saveLayout();
}
void Application::loadProject(const FilePath& projectSettingsFilePath, bool forceRefresh)
void Application::loadProject(const FilePath& projectSettingsFilePath)
{
MessageStatus("Loading Project: " + projectSettingsFilePath.str()).dispatch();
@@ -84,7 +84,7 @@ void Application::loadProject(const FilePath& projectSettingsFilePath, bool forc
m_componentManager->refreshViews();
m_project = Project::create(m_storageCache.get());
m_project->load(projectSettingsFilePath, forceRefresh);
m_project->load(projectSettingsFilePath);
m_mainView->updateRecentProjectMenu();
m_mainView->hideStartScreen();
@@ -127,7 +127,16 @@ void Application::handleMessage(MessageFinishedParsing* message)
void Application::handleMessage(MessageLoadProject* message)
{
loadProject(message->projectSettingsFilePath, message->forceRefresh);
if (message->forceRefresh)
{
m_project->clearStorage();
}
else if (FilePath(message->projectSettingsFilePath) == m_project->getProjectSettingsFilePath())
{
return;
}
loadProject(message->projectSettingsFilePath);
}
void Application::handleMessage(MessageRefresh* message)
+1 -1
View File
@@ -32,7 +32,7 @@ public:
~Application();
void loadProject(const FilePath& projectSettingsFilePath, bool forceRefresh);
void loadProject(const FilePath& projectSettingsFilePath);
void refreshProject();
void saveProject(const FilePath& projectSettingsFilePath);
void showLicenseScreen();
+7 -7
View File
@@ -25,7 +25,12 @@ Project::~Project()
{
}
bool Project::load(const FilePath& projectSettingsFile, bool forceRefresh)
const FilePath& Project::getProjectSettingsFilePath() const
{
return m_projectSettingsFilepath;
}
bool Project::load(const FilePath& projectSettingsFile)
{
bool success = ProjectSettings::getInstance()->load(projectSettingsFile);
if (success)
@@ -34,12 +39,6 @@ bool Project::load(const FilePath& projectSettingsFile, bool forceRefresh)
updateFileManager();
}
if (forceRefresh)
{
clearStorage();
m_storageWasLoaded = false;
}
if (m_storageWasLoaded)
{
m_storage->startParsing();
@@ -93,6 +92,7 @@ void Project::clearStorage()
if (m_storage)
{
m_storage->clear();
m_storageWasLoaded = false;
}
}
+3 -1
View File
@@ -17,7 +17,9 @@ public:
~Project();
bool load(const FilePath& projectSettingsFile, bool forceRefresh);
const FilePath& getProjectSettingsFilePath() const;
bool load(const FilePath& projectSettingsFile);
bool save(const FilePath& projectSettingsFile);
void reload();