Make focus work for web viewer, also some other fixes.
This commit is contained in:
parent
c42e350bac
commit
37d4d34c99
@ -101,6 +101,16 @@ class FeedsView : public QTreeView {
|
||||
// Requests opening of given messages in newspaper mode.
|
||||
void openMessagesInNewspaperView(RootItem *root, const QList<Message> &messages);
|
||||
|
||||
protected:
|
||||
// Handle selections.
|
||||
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
|
||||
// React on "Del" key.
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
|
||||
// Show custom context menu.
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
|
||||
private slots:
|
||||
void expandItemDelayed(const QModelIndex &idx);
|
||||
void markSelectedItemReadStatus(RootItem::ReadStatus read);
|
||||
@ -123,15 +133,6 @@ class FeedsView : public QTreeView {
|
||||
|
||||
void saveExpandStates(RootItem *item);
|
||||
|
||||
// Handle selections.
|
||||
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
|
||||
// React on "Del" key.
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
|
||||
// Show custom context menu.
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
|
||||
QMenu *m_contextMenuCategories;
|
||||
QMenu *m_contextMenuFeeds;
|
||||
QMenu *m_contextMenuEmptySpace;
|
||||
|
@ -44,8 +44,8 @@ bool WebViewer::canDecreaseZoom() {
|
||||
}
|
||||
|
||||
void WebViewer::displayMessage() {
|
||||
load(QUrl(INTERNAL_URL_MESSAGE));
|
||||
//setHtml(m_messageContents, QUrl::fromUserInput("aa"));
|
||||
//load(QUrl(INTERNAL_URL_MESSAGE));
|
||||
setHtml(m_messageContents, QUrl::fromUserInput(INTERNAL_URL_MESSAGE));
|
||||
}
|
||||
|
||||
bool WebViewer::increaseWebPageZoom() {
|
||||
@ -119,7 +119,11 @@ void WebViewer::loadMessage(const Message &message) {
|
||||
}
|
||||
|
||||
void WebViewer::clear() {
|
||||
bool previously_enabled = isEnabled();
|
||||
|
||||
setEnabled(false);
|
||||
setHtml("<!DOCTYPE html><html><body</body></html>", QUrl(INTERNAL_URL_BLANK));
|
||||
setEnabled(previously_enabled);
|
||||
}
|
||||
|
||||
QWebEngineView *WebViewer::createWindow(QWebEnginePage::WebWindowType type) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user