mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
Make grouped dock dragging optional. (#1506)
This commit is contained in:
parent
13d7de8fae
commit
d6bb0c0446
@ -163,10 +163,6 @@ void MainWindow::initUI()
|
||||
plugin->setupInterface(this);
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||
setDockOptions(dockOptions() | DockOption::GroupedDragging);
|
||||
#endif
|
||||
|
||||
initLayout();
|
||||
}
|
||||
|
||||
@ -625,6 +621,10 @@ void MainWindow::readSettingsOrDefault()
|
||||
setPanelLock();
|
||||
tabsOnTop = settings.value("tabsOnTop").toBool();
|
||||
setTabLocation();
|
||||
bool dockGroupedDragging = settings.value("docksGroupedDragging", false).toBool();
|
||||
ui->actionGrouped_dock_dragging->setChecked(dockGroupedDragging);
|
||||
on_actionGrouped_dock_dragging_triggered(dockGroupedDragging);
|
||||
|
||||
QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
|
||||
QSize size = settings.value("size", QSize(400, 400)).toSize();
|
||||
resize(size);
|
||||
@ -641,6 +641,7 @@ void MainWindow::saveSettings()
|
||||
settings.setValue("state", saveState());
|
||||
settings.setValue("panelLock", panelLock);
|
||||
settings.setValue("tabsOnTop", tabsOnTop);
|
||||
settings.setValue("docksGroupedDragging", ui->actionGrouped_dock_dragging->isChecked());
|
||||
}
|
||||
|
||||
void MainWindow::readDebugSettings()
|
||||
@ -1130,6 +1131,13 @@ void MainWindow::on_actionExport_as_code_triggered()
|
||||
fileOut << Core()->cmd(cmd + " $s @ 0");
|
||||
}
|
||||
|
||||
void MainWindow::on_actionGrouped_dock_dragging_triggered(bool checked)
|
||||
{
|
||||
auto options = dockOptions();
|
||||
options.setFlag(QMainWindow::DockOption::GroupedDragging, checked);
|
||||
setDockOptions(options);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::projectSaved(bool successfully, const QString &name)
|
||||
{
|
||||
|
@ -177,6 +177,8 @@ private slots:
|
||||
|
||||
void on_actionExport_as_code_triggered();
|
||||
|
||||
void on_actionGrouped_dock_dragging_triggered(bool checked);
|
||||
|
||||
void projectSaved(bool successfully, const QString &name);
|
||||
|
||||
void updateTasksIndicator();
|
||||
|
@ -89,6 +89,7 @@
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionLock"/>
|
||||
<addaction name="actionTabs_on_Top"/>
|
||||
<addaction name="actionGrouped_dock_dragging"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuHelp">
|
||||
<property name="title">
|
||||
@ -1085,6 +1086,17 @@
|
||||
<string>Graph view</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGrouped_dock_dragging">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Grouped dock dragging</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
|
Loading…
Reference in New Issue
Block a user