Summary: | No previews for text/plain files | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio-extras | Reporter: | Eugene Shalygin <eugene.shalygin+bugzilla.kde> |
Component: | Thumbnails and previews | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | bugseforuns, kossebau, maxmustermann1884, nate |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
URL: | https://phabricator.kde.org/D20766 | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Works for me |
Description
Eugene Shalygin
2019-04-10 13:10:07 UTC
I can confirm. SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.15.80 KDE Frameworks Version: 5.57.0 Qt Version: 5.12.0 Created attachment 119387 [details]
Works for me
Works for me in the latest Neon Dev Unstable.
maybe related to this? https://bugs.kde.org/show_bug.cgi?id=406745 https://i.imgur.com/Cph7xuc.png -> file preview works, but text-color=background-color Yes, thanks! I got previews back with these changes: diff --git a/thumbnail/CMakeLists.txt b/thumbnail/CMakeLists.txt index 966039d0..00978725 100644 --- a/thumbnail/CMakeLists.txt +++ b/thumbnail/CMakeLists.txt @@ -95,6 +95,7 @@ target_link_libraries(textthumbnail Qt5::Gui KF5::KIOWidgets KF5::SyntaxHighlighting + KF5::ConfigWidgets ) install(TARGETS textthumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR}) diff --git a/thumbnail/textcreator.cpp b/thumbnail/textcreator.cpp index 8bdab821..806ffe25 100644 --- a/thumbnail/textcreator.cpp +++ b/thumbnail/textcreator.cpp @@ -33,6 +33,7 @@ #include <KSyntaxHighlighting/Theme> #include <KSyntaxHighlighting/Definition> #include <KDesktopFile> +#include <KColorScheme> // TODO Fix or remove kencodingprober code // #include <kencodingprober.h> @@ -136,8 +137,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img } } - QColor bgColor = QColor ( 245, 245, 245 ); // light-grey background - m_pixmap.fill( bgColor ); + m_pixmap.fill( KColorScheme(QPalette::Active).background().color() ); QPainter painter( &m_pixmap ); *** Bug 406745 has been marked as a duplicate of this bug. *** Seems caused by bug #406821 in KF5's KSyntaxHighlighting. *** This bug has been marked as a duplicate of bug 406821 *** |