forked from qt-creator/qt-creator
Move handling of color dialog that is opened from mode selector
It doesn't really make sense to have that handling deep in the FancyTabWidget. Change-Id: If4b4b9b9c3cbc49c25091982b398fb18f9bf87c2 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCloseEvent>
|
||||
#include <QColorDialog>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
@@ -175,6 +176,13 @@ MainWindow::MainWindow() :
|
||||
setCorner(Qt::BottomRightCorner, Qt::BottomDockWidgetArea);
|
||||
|
||||
m_modeManager = new ModeManager(this, m_modeStack);
|
||||
connect(m_modeStack, &FancyTabWidget::topAreaClicked, this, [](Qt::MouseButton, Qt::KeyboardModifiers modifiers) {
|
||||
if (modifiers & Qt::ShiftModifier) {
|
||||
QColor color = QColorDialog::getColor(StyleHelper::requestedBaseColor(), ICore::dialogParent());
|
||||
if (color.isValid())
|
||||
StyleHelper::setBaseColor(color);
|
||||
}
|
||||
});
|
||||
|
||||
registerDefaultContainers();
|
||||
registerDefaultActions();
|
||||
|
||||
Reference in New Issue
Block a user