Skip to content

Commit

Permalink
fix: cannot get dark png when try to get front png
Browse files Browse the repository at this point in the history
Log:
  • Loading branch information
Decodetalkers authored and deepin-bot[bot] committed Aug 2, 2023
1 parent f217509 commit d5ef04c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/service/modules/api/themethumb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtk.h>

#include <DGuiApplicationHelper>
using Dtk::Gui::DGuiApplicationHelper;

const int width = 320;
const int height = 70;
const int baseCursorSize = 24;
Expand Down Expand Up @@ -366,7 +369,8 @@ QString getGlobal(QString id, QString descFile)
keyFile.loadFile(descFile);
QStringList example = keyFile.getStrList("Deepin Theme", "Example");
if (!example.isEmpty()) {
QString path = example.first();
bool isdark = DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::ColorType::DarkType;
QString path = isdark ? example.last() : example.first();
QFileInfo file(path);
if (file.isRelative()) {
QFileInfo themefile(descFile);
Expand Down

0 comments on commit d5ef04c

Please sign in to comment.