ui: Moved color scheme selection to preferences

* removed 'Switch Color Scheme' action from View menu
* added dropdown with all fetched color schemes to preferences

bug id = 114
This commit is contained in:
Eberhard Graether
2016-07-20 17:27:53 +02:00
parent 6e9a6f9a8d
commit b2cb95de1b
11 changed files with 92 additions and 55 deletions
-15
View File
@@ -32,7 +32,6 @@
#include "utility/messaging/type/MessageRefresh.h"
#include "utility/messaging/type/MessageResetZoom.h"
#include "utility/messaging/type/MessageSearch.h"
#include "utility/messaging/type/MessageSwitchColorScheme.h"
#include "utility/messaging/type/MessageUndo.h"
#include "utility/messaging/type/MessageWindowFocus.h"
#include "utility/messaging/type/MessageZoom.h"
@@ -474,16 +473,6 @@ void QtMainWindow::resetZoom()
MessageResetZoom().dispatch();
}
void QtMainWindow::switchColorScheme()
{
QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), (ResourcePaths::getColorSchemesPath()).c_str(), "XML Files (*.xml)");
if (!fileName.isEmpty())
{
MessageSwitchColorScheme(fileName.toStdString()).dispatch();
}
}
void QtMainWindow::toggleView(View* view, bool fromMenu)
{
DockWidget* dock = getDockWidgetForView(view);
@@ -624,10 +613,6 @@ void QtMainWindow::setupViewMenu()
menu->addAction(tr("Smaller font"), this, SLOT(zoomOut()), QKeySequence::ZoomOut);
menu->addAction(tr("Reset font size"), this, SLOT(resetZoom()), QKeySequence(Qt::CTRL + Qt::Key_0));
menu->addSeparator();
menu->addAction(tr("Switch Color Scheme..."), this, SLOT(switchColorScheme()));
m_viewMenu = menu;
}