mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #99: Icons for dark mode
This commit is contained in:
@ -27,6 +27,7 @@
|
||||
#include "pdfdocumentbuilder.h"
|
||||
#include "pdfdbgheap.h"
|
||||
#include "pdfcertificatemanagerdialog.h"
|
||||
#include "pdfwidgetutils.h"
|
||||
|
||||
#include "pdfviewersettings.h"
|
||||
#include "pdfundoredomanager.h"
|
||||
@ -292,6 +293,20 @@ void PDFActionManager::initActions(QSize iconSize, bool initializeStampActions)
|
||||
createCreateStampAction(CreateStampSold, pdf::Stamp::Sold);
|
||||
createCreateStampAction(CreateStampTopSecret, pdf::Stamp::TopSecret);
|
||||
}
|
||||
|
||||
m_iconSize = iconSize;
|
||||
}
|
||||
|
||||
void PDFActionManager::styleActions()
|
||||
{
|
||||
if (pdf::PDFWidgetUtils::isDarkTheme())
|
||||
{
|
||||
qreal devicePixelRatio = qGuiApp->devicePixelRatio();
|
||||
|
||||
// Convert icons to dark theme icons
|
||||
pdf::PDFWidgetUtils::convertActionsForDarkTheme(m_actions, m_iconSize, devicePixelRatio);
|
||||
pdf::PDFWidgetUtils::convertActionsForDarkTheme(m_additionalActions, m_iconSize, devicePixelRatio);
|
||||
}
|
||||
}
|
||||
|
||||
bool PDFActionManager::hasActions(const std::initializer_list<Action>& actionTypes) const
|
||||
|
Reference in New Issue
Block a user