From 2a321afe7454fb3cbb3541ff0547e0b942087dea Mon Sep 17 00:00:00 2001 From: octaeder <102688820+octaeder@users.noreply.github.com> Date: Fri, 24 May 2024 04:37:49 +0200 Subject: [PATCH] hide first toolbar separator for embedded pdf viewer --- src/pdfviewer/PDFDocument.cpp | 3 ++- src/pdfviewer/PDFDocument.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pdfviewer/PDFDocument.cpp b/src/pdfviewer/PDFDocument.cpp index 620dc26413..723509b69d 100644 --- a/src/pdfviewer/PDFDocument.cpp +++ b/src/pdfviewer/PDFDocument.cpp @@ -2930,7 +2930,7 @@ void PDFDocument::setupToolBar(){ connect(toolBarTimer, SIGNAL(timeout()), this, SLOT(showToolbars())); toolBar->addAction(actionTypeset); - toolBar->addSeparator(); + separatorAfterTypeset = toolBar->addSeparator(); toolBar->addAction(actionExternalViewer); toolBar->addSeparator(); toolBar->addAction(actionMagnify); @@ -3171,6 +3171,7 @@ void PDFDocument::init(bool embedded) actionExternalViewer->setIcon(getRealIcon("acroread")); if (embedded) { actionTypeset->setVisible(false); + separatorAfterTypeset->setVisible(false); actionShrinkViewer->setVisible(false); } else { actionClose->setVisible(false); diff --git a/src/pdfviewer/PDFDocument.h b/src/pdfviewer/PDFDocument.h index d86db2d1fd..7ca022804d 100644 --- a/src/pdfviewer/PDFDocument.h +++ b/src/pdfviewer/PDFDocument.h @@ -616,6 +616,7 @@ private slots: QAction *actionPaste; QAction *actionClear; QAction *actionTypeset; + QAction *separatorAfterTypeset; QAction *actionExternalViewer; QAction *actionPreferences; QAction *actionStack;