PDF4QT
PDF4QT copied to clipboard
Icons under dark theme on Arch/KDE is broken
I've tried to follow the issues posted before and they all claim to have solved my issue. However, it seems like icons under dark mode is not really working out for me.
Please advise. I can share more information.
Same issue here in KDE on NixOS.
I have the same issue on AndeavourOS (Arch) with PDF4Qt 1.4.0.0 A solution might be to either:
- fix dark mode to make sure the lighter-coloured icons get applied (according to https://github.com/JakubMelka/PDF4QT/issues/181 they exist); or
- rely on the desktop to provide the icons – might be tricky for managing a cross-platform app though
@silverhook , @AlisterH, @rcky844, could you please try to use command line option "--theme-dark" on the newest installation? https://github.com/JakubMelka/PDF4QT/actions/runs/11532360639
It'll need a version check - I got this:
/build/source/Pdf4QtLibWidgets/sources/pdfwidgetutils.cpp:179:33: error: 'class QStyleHints' has no member named 'setColorScheme'; did you mean 'colorScheme'?
179 | QApplication::styleHints()->setColorScheme(isDarkTheme ? Qt::ColorScheme::Dark : Qt::ColorScheme::Light);
| ^~~~~~~~~~~~~~
| colorScheme
OK, a successful build with latest QT shows:
- the toolbar buttons are all good (unless the program is already running when the theme is changed from light to dark).
--theme-darkand--theme-lighthave no effect - it is always dark if I have a dark KDE theme and always light if I have a light theme.- there are still a few issues in dark mode
- The close button and window button on the sidebar are virtually invisible, as is the "synchronise thumbnails with current page" button (is it looking for some icons in the theme which aren't available?).
- The text labels in the search/find bars are invisible
- The text under each page in PageMaster is invisible for pages which aren't selected, and only barely visible for pages which are selected.
- Black Text in the outline in the sidebar is almost invisible except if it is selected. I'm not sure what the appropriate thing is to do here - most Pdfs have black text in the outline, but it can be other colours, and you do render the colours, even though I don't think you've implemented the ability to edit them. It might be possible to do something clever to detect if there isn't enough contrast, and then change the colour. Or maybe it would be easiest just to give the user the ability to change the background colour in the outlines.
- The colours of the main icons in the sidebar could also be improved. The inactive ones are invisible, and maybe they should be changed to match the text, or to the black that the active ones are currently. The active ones would ideally be white or a very light shade, rather than black.
* Black Text in the outline in the sidebar is almost invisible except if it is selected. I'm not sure what the appropriate thing is to do here - most Pdfs have black text in the outline, but it can be other colours, and you do render the colours, even though I don't think you've implemented the ability to edit them. It might be possible to do something clever to detect if there isn't enough contrast, and then change the colour. Or maybe it would be easiest just to give the user the ability to change the background colour in the outlines.
Actually, I think the ideal behaviour would just be to apply whatever "color" mode is selected in the view menu to the outline as well as the document itself. So use a white background by default.
Also, thumbnails have a black page, so their content is mostly invisible. Again, I'd suggest applying whatever color mode is selected in the view menu.
Hello @AlisterH, I have tried to fix it. Please try the newest installation, when it will be available. Most of the issues should be solved.
OK, I hope it is resolved now.