From 256a664332d7041fe8daa141489f50251f6b23f8 Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 15 Aug 2017 23:13:43 +0200 Subject: [PATCH] Reduce vertical space required by DB query widget * Reduce margins * Allow results list view to shrink further See https://github.com/Martchus/tageditor/issues/20 --- gui/dbquerywidget.cpp | 3 + gui/dbquerywidget.ui | 172 +++++++++++++++++++++++++++--------------- 2 files changed, 114 insertions(+), 61 deletions(-) diff --git a/gui/dbquerywidget.cpp b/gui/dbquerywidget.cpp index d8c2363..0a8569a 100644 --- a/gui/dbquerywidget.cpp +++ b/gui/dbquerywidget.cpp @@ -81,6 +81,9 @@ DbQueryWidget::DbQueryWidget(TagEditorWidget *tagEditorWidget, QWidget *parent) connect(clearSearchCriteria, &QAction::triggered, this, &DbQueryWidget::clearSearchCriteria); m_ui->menuPushButton->setMenu(m_menu); + // ensure fieldsGroupBox takes only minimal space (initially) + m_ui->splitter->setSizes({1000, 1}); + // connect signals and slots connect(m_ui->abortPushButton, &QPushButton::clicked, this, &DbQueryWidget::abortSearch); connect(m_ui->searchMusicBrainzPushButton, &QPushButton::clicked, this, &DbQueryWidget::searchMusicBrainz); diff --git a/gui/dbquerywidget.ui b/gui/dbquerywidget.ui index bf59107..bb8dc76 100644 --- a/gui/dbquerywidget.ui +++ b/gui/dbquerywidget.ui @@ -26,12 +26,12 @@ 0 - 3 + 0 - 1 + 0 1 @@ -47,6 +47,12 @@ + + + 0 + 0 + + Search &criteria @@ -55,19 +61,19 @@ 2 - 2 + 0 - 2 + 1 - 2 + 0 - 2 + 1 - 2 + 0 @@ -136,60 +142,66 @@ + + + 0 + 0 + + Qt::Vertical - - Qt::CustomContextMenu - - - - + 0 0 - - - 0 - 20 - + + Qt::CustomContextMenu - - - 16777215 - 125 - + + QAbstractScrollArea::AdjustToContentsOnFirstShow + + + + + + 0 + 1 + Fields to be used - 2 + 0 - 2 + 1 - 2 + 0 - 2 + 1 - 2 + 0 - + 0 0 + + QAbstractScrollArea::AdjustToContents + QListView::Free @@ -200,7 +212,7 @@ true - 3 + 1 true @@ -208,31 +220,54 @@ - - - - - Whether existing values of selected "Fields to be used" should be overridden with values from search result - - - Override existing values - - - true - - - - - - - Whether matching values for selected "Fields to be used" from the search result should be inserted automatically when opening a file - - - Insert automatically - - - - + + + + 0 + 0 + + + + + 2 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Whether existing values of selected "Fields to be used" should be overridden with values from search result + + + Override existing values + + + true + + + + + + + Whether matching values for selected "Fields to be used" from the search result should be inserted automatically when opening a file + + + Insert automatically + + + + + @@ -243,7 +278,28 @@ + + + 0 + 0 + + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + @@ -294,12 +350,6 @@ - - - 0 - 0 - - Searches MusicBrainz for meta data matching the specified "Search criteria"