Permalink
Browse files

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.
  • Loading branch information...
mgrojo committed Sep 29, 2018
1 parent 071f963 commit f42b614084d75c3669983af561a4fe9c5f2cf13a
@@ -233,13 +233,14 @@ void MainWindow::init()

popupBrowseDataHeaderMenu = new QMenu(this);
popupBrowseDataHeaderMenu->addAction(ui->actionShowRowidColumn);
popupBrowseDataHeaderMenu->addAction(ui->actionHideColumns);
popupBrowseDataHeaderMenu->addAction(ui->actionShowAllColumns);
popupBrowseDataHeaderMenu->addSeparator();
popupBrowseDataHeaderMenu->addAction(ui->actionUnlockViewEditing);
popupBrowseDataHeaderMenu->addAction(ui->actionBrowseTableEditDisplayFormat);
popupBrowseDataHeaderMenu->addAction(ui->actionSetTableEncoding);
popupBrowseDataHeaderMenu->addSeparator();
popupBrowseDataHeaderMenu->addAction(ui->actionSetTableEncoding);
popupBrowseDataHeaderMenu->addAction(ui->actionSetAllTablesEncoding);
popupBrowseDataHeaderMenu->addAction(ui->actionHideColumns);
popupBrowseDataHeaderMenu->addAction(ui->actionShowAllColumns);

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")
{
@@ -56,6 +56,7 @@
<addaction name="editCreateIndexAction"/>
<addaction name="editModifyObjectAction"/>
<addaction name="editDeleteObjectAction"/>
<addaction name="separator"/>
<addaction name="actionDbPrint"/>
</widget>
</item>
BIN -29 Bytes (96%) src/icons/clear_filters.png
Binary file not shown.
@@ -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>
Binary file not shown.

0 comments on commit f42b614

Please sign in to comment.