A bit of polishing of the main window user-interface

Reorder the context menu of the table header and use separators for
coherent grouping: column actions, misc and encoding.

Set buttons invisible in the DB Structure toolbar when the object is
different to the supported ones. Disabling wasn't enough because the logic
for changing icon and text wasn't working well for fields and other items.

Separate Print from object actions in that same toolbar.

New icon for Project Save so it uses the same metaphor (floppy disk) as
other save actions.

Improved the look in the clear filters icon by editing it in gimp. It had
a glitch in the funnel base.
This commit is contained in:
mgr
2018-09-29 17:28:12 +02:00
parent 071f963fcc
commit f42b614084
5 changed files with 18 additions and 7 deletions

View File

@@ -233,13 +233,14 @@ void MainWindow::init()
popupBrowseDataHeaderMenu = new QMenu(this);
popupBrowseDataHeaderMenu->addAction(ui->actionShowRowidColumn);
popupBrowseDataHeaderMenu->addAction(ui->actionUnlockViewEditing);
popupBrowseDataHeaderMenu->addAction(ui->actionBrowseTableEditDisplayFormat);
popupBrowseDataHeaderMenu->addAction(ui->actionSetTableEncoding);
popupBrowseDataHeaderMenu->addSeparator();
popupBrowseDataHeaderMenu->addAction(ui->actionSetAllTablesEncoding);
popupBrowseDataHeaderMenu->addAction(ui->actionHideColumns);
popupBrowseDataHeaderMenu->addAction(ui->actionShowAllColumns);
popupBrowseDataHeaderMenu->addSeparator();
popupBrowseDataHeaderMenu->addAction(ui->actionUnlockViewEditing);
popupBrowseDataHeaderMenu->addAction(ui->actionBrowseTableEditDisplayFormat);
popupBrowseDataHeaderMenu->addSeparator();
popupBrowseDataHeaderMenu->addAction(ui->actionSetTableEncoding);
popupBrowseDataHeaderMenu->addAction(ui->actionSetAllTablesEncoding);
QShortcut* dittoRecordShortcut = new QShortcut(QKeySequence("Ctrl+\""), this);
connect(dittoRecordShortcut, &QShortcut::activated, [this]() {
@@ -1744,11 +1745,19 @@ void MainWindow::changeTreeSelection()
} else if(type == "index") {
ui->editDeleteObjectAction->setText(tr("Delete Index"));
ui->editModifyObjectAction->setText(tr("Modify Index"));
} else {
} else if(type == "table") {
ui->editDeleteObjectAction->setText(tr("Delete Table"));
ui->editModifyObjectAction->setText(tr("Modify Table"));
} else {
// Nothing to do for other types. Set the buttons not visible and return.
ui->editDeleteObjectAction->setVisible(false);
ui->editModifyObjectAction->setVisible(false);
return;
}
ui->editDeleteObjectAction->setVisible(true);
ui->editModifyObjectAction->setVisible(true);
// Activate actions
if(type == "table" || type == "index")
{

View File

@@ -56,6 +56,7 @@
<addaction name="editCreateIndexAction"/>
<addaction name="editModifyObjectAction"/>
<addaction name="editDeleteObjectAction"/>
<addaction name="separator"/>
<addaction name="actionDbPrint"/>
</widget>
</item>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

After

Width:  |  Height:  |  Size: 791 B

View File

@@ -37,7 +37,7 @@
<file alias="up">bullet_arrow_up.png</file>
<file alias="appicon">sqlitebrowser.png</file>
<file alias="browser_open">internet-web-browser.png</file>
<file alias="project_save">package.png</file>
<file>package.png</file>
<file alias="project_open">package_go.png</file>
<file alias="field_key">page_key.png</file>
<file alias="encryption">key.png</file>
@@ -67,5 +67,6 @@
<file alias="db_attach">database_link.png</file>
<file alias="text_indent">text_indent.png</file>
<file alias="print">printer.png</file>
<file alias="project_save">package_save.png</file>
</qresource>
</RCC>

BIN
src/icons/package_save.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B