From 4e1102e08d66a0c2a8a028b2863af1125a6d25b9 Mon Sep 17 00:00:00 2001 From: Kevin Hendricks Date: Wed, 17 Apr 2024 16:05:56 -0400 Subject: [PATCH] MetaEditor ui fix button order and add tabstops --- src/Dialogs/MetaEditor.cpp | 10 +++++++++- src/Dialogs/SelectFiles.cpp | 5 ++++- src/Form_Files/MetaEditor.ui | 25 +++++++++++++++++-------- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/Dialogs/MetaEditor.cpp b/src/Dialogs/MetaEditor.cpp index c9adf1db9e..51eb2fe63f 100644 --- a/src/Dialogs/MetaEditor.cpp +++ b/src/Dialogs/MetaEditor.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016-2022 Kevin B. Hendricks, Stratford, ON Canada +** Copyright (C) 2016-2024 Kevin B. Hendricks, Stratford, ON Canada ** ** This file is part of Sigil. ** @@ -134,6 +134,14 @@ MetaEditor::MetaEditor(QWidget *parent) connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); updateActions(); + setFocusPolicy(Qt::StrongFocus); + view->setFocusPolicy(Qt::StrongFocus); + addMetaButton->setFocusPolicy(Qt::StrongFocus); + addPropButton->setFocusPolicy(Qt::StrongFocus); + delButton->setFocusPolicy(Qt::StrongFocus); + tbMoveUp->setFocusPolicy(Qt::StrongFocus); + tbMoveDown->setFocusPolicy(Qt::StrongFocus); + buttonBox->setFocusPolicy(Qt::StrongFocus); } diff --git a/src/Dialogs/SelectFiles.cpp b/src/Dialogs/SelectFiles.cpp index d55229afc4..5d72fbb2f3 100644 --- a/src/Dialogs/SelectFiles.cpp +++ b/src/Dialogs/SelectFiles.cpp @@ -111,7 +111,9 @@ SelectFiles::SelectFiles(QString title, QList media_resources, QStri m_WebView->page()->settings()->setAttribute(QWebEngineSettings::ShowScrollBars,false); #endif ui.avLayout->addWidget(m_WebView); - + m_WebView->setFocusPolicy(Qt::NoFocus); + ui.Details->setFocusPolicy(Qt::NoFocus); + ReadSettings(); m_AllItem = new QListWidgetItem(tr("All"), ui.FileTypes); @@ -164,6 +166,7 @@ void SelectFiles::SetImages() m_WebView->setHtml(html, QUrl()); ui.imageTree->reset(); + ui.imageTree->setTabKeyNavigation(true); m_SelectFilesModel->clear(); QStringList header; header.append(tr("Files In the Book")); diff --git a/src/Form_Files/MetaEditor.ui b/src/Form_Files/MetaEditor.ui index 797aaedbd9..6cde84d5af 100644 --- a/src/Form_Files/MetaEditor.ui +++ b/src/Form_Files/MetaEditor.ui @@ -56,23 +56,23 @@ - - + + - Remove a metadata element or property. + Add a new property or attribute to an existing metadata element. - Remove + Add Property - - + + - Add a new property or attribute to an existing metadata element. + Remove a metadata element or property. - Add Property + Remove @@ -175,6 +175,15 @@ + + view + addMetaButton + addPropButton + delButton + tbMoveUp + tbMoveDown + buttonBox +