mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-20 03:46:11 +00:00
Widgets tiny improvement
This commit is contained in:
parent
d878e5055e
commit
bb26c2b7a5
@ -6,6 +6,7 @@
|
|||||||
#include "dialogs/preferences/PreferencesDialog.h"
|
#include "dialogs/preferences/PreferencesDialog.h"
|
||||||
#include "utils/Helpers.h"
|
#include "utils/Helpers.h"
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QCompleter>
|
#include <QCompleter>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
@ -245,9 +246,6 @@ void MainWindow::initUI()
|
|||||||
|
|
||||||
#undef ADD_DOCK
|
#undef ADD_DOCK
|
||||||
|
|
||||||
// Set up dock widgets default layout
|
|
||||||
resetToDefaultLayout();
|
|
||||||
|
|
||||||
// Restore saved settings
|
// Restore saved settings
|
||||||
this->readSettings();
|
this->readSettings();
|
||||||
// TODO: Allow the user to select this option visually in the GUI settings
|
// TODO: Allow the user to select this option visually in the GUI settings
|
||||||
@ -257,10 +255,9 @@ void MainWindow::initUI()
|
|||||||
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
|
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
|
||||||
//setCorner( Qt::BottomRightCorner, Qt::RightDockWidgetArea );
|
//setCorner( Qt::BottomRightCorner, Qt::RightDockWidgetArea );
|
||||||
|
|
||||||
// Show dashboard by default
|
// Set up dock widgets default layout
|
||||||
this->dashboardDock->raise();
|
resetToDefaultLayout();
|
||||||
|
|
||||||
//qDebug() << "FOLDER: " << QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
|
|
||||||
/*
|
/*
|
||||||
* Some global shortcuts
|
* Some global shortcuts
|
||||||
*/
|
*/
|
||||||
@ -368,7 +365,6 @@ bool MainWindow::saveProjectAs(bool quit)
|
|||||||
int result = dialog.exec();
|
int result = dialog.exec();
|
||||||
|
|
||||||
return !quit || result != SaveProjectDialog::Rejected;
|
return !quit || result != SaveProjectDialog::Rejected;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::refreshOmniBar(const QStringList &flags)
|
void MainWindow::refreshOmniBar(const QStringList &flags)
|
||||||
@ -587,7 +583,7 @@ void MainWindow::restoreDocks()
|
|||||||
// Console | Sections
|
// Console | Sections
|
||||||
splitDockWidget(consoleDock, sectionsDock, Qt::Horizontal);
|
splitDockWidget(consoleDock, sectionsDock, Qt::Horizontal);
|
||||||
|
|
||||||
// tabs for center (must be applied after splitDockWidget())
|
// Tabs for center (must be applied after splitDockWidget())
|
||||||
tabifyDockWidget(sectionsDock, commentsDock);
|
tabifyDockWidget(sectionsDock, commentsDock);
|
||||||
tabifyDockWidget(dashboardDock, disassemblyDock);
|
tabifyDockWidget(dashboardDock, disassemblyDock);
|
||||||
tabifyDockWidget(dashboardDock, graphDock);
|
tabifyDockWidget(dashboardDock, graphDock);
|
||||||
@ -603,8 +599,6 @@ void MainWindow::restoreDocks()
|
|||||||
tabifyDockWidget(dashboardDock, notepadDock);
|
tabifyDockWidget(dashboardDock, notepadDock);
|
||||||
tabifyDockWidget(dashboardDock, classesDock);
|
tabifyDockWidget(dashboardDock, classesDock);
|
||||||
|
|
||||||
dashboardDock->raise();
|
|
||||||
|
|
||||||
updateDockActionsChecked();
|
updateDockActionsChecked();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -613,7 +607,7 @@ void MainWindow::hideAllDocks()
|
|||||||
{
|
{
|
||||||
for (auto w : dockWidgets)
|
for (auto w : dockWidgets)
|
||||||
{
|
{
|
||||||
w->hide();
|
removeDockWidget(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDockActionsChecked();
|
updateDockActionsChecked();
|
||||||
@ -659,10 +653,9 @@ void MainWindow::showDefaultDocks()
|
|||||||
|
|
||||||
void MainWindow::resetToDefaultLayout()
|
void MainWindow::resetToDefaultLayout()
|
||||||
{
|
{
|
||||||
restoreDocks();
|
|
||||||
hideAllDocks();
|
hideAllDocks();
|
||||||
|
restoreDocks();
|
||||||
showDefaultDocks();
|
showDefaultDocks();
|
||||||
|
|
||||||
dashboardDock->raise();
|
dashboardDock->raise();
|
||||||
|
|
||||||
// ugly workaround to set the default widths of functions and sidebar docks
|
// ugly workaround to set the default widths of functions and sidebar docks
|
||||||
|
Loading…
Reference in New Issue
Block a user