Skip to content

Commit

Permalink
MetaEditor ui fix button order and add tabstops
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhendricks committed Apr 17, 2024
1 parent 3354282 commit 4e1102e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
10 changes: 9 additions & 1 deletion src/Dialogs/MetaEditor.cpp
Original file line number Diff line number Diff line change
@@ -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.
**
Expand Down Expand Up @@ -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);
}


Expand Down
5 changes: 4 additions & 1 deletion src/Dialogs/SelectFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ SelectFiles::SelectFiles(QString title, QList<Resource *> 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);
Expand Down Expand Up @@ -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"));
Expand Down
25 changes: 17 additions & 8 deletions src/Form_Files/MetaEditor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="delButton">
<item row="2" column="0">
<widget class="QPushButton" name="addPropButton">
<property name="toolTip">
<string>Remove a metadata element or property.</string>
<string>Add a new property or attribute to an existing metadata element.</string>
</property>
<property name="text">
<string>Remove</string>
<string>Add Property</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="addPropButton">
<item row="3" column="0">
<widget class="QPushButton" name="delButton">
<property name="toolTip">
<string>Add a new property or attribute to an existing metadata element.</string>
<string>Remove a metadata element or property.</string>
</property>
<property name="text">
<string>Add Property</string>
<string>Remove</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -175,6 +175,15 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>view</tabstop>
<tabstop>addMetaButton</tabstop>
<tabstop>addPropButton</tabstop>
<tabstop>delButton</tabstop>
<tabstop>tbMoveUp</tabstop>
<tabstop>tbMoveDown</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>

0 comments on commit 4e1102e

Please sign in to comment.