Skip to content

Commit

Permalink
Use XdgIcon::fromTheme(...) instead of own implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusbritanicus committed Mar 28, 2024
1 parent 565567f commit 41ee2b2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 161 deletions.
2 changes: 0 additions & 2 deletions panel/backends/wayland/wlroots/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ add_library(lxqt-panel-backend-wlroots STATIC
lxqttaskbarbackendwlr.h
lxqttaskbarwlrwindowmanagment.h
lxqtwlrvirtualdesktop.h
icontools.hpp

lxqttaskbarbackendwlr.cpp
lxqttaskbarwlrwindowmanagment.cpp
lxqtwlrvirtualdesktop.cpp
icontools.cpp
)

qt6_generate_wayland_protocol_client_sources(lxqt-panel-backend-wlroots
Expand Down
150 changes: 0 additions & 150 deletions panel/backends/wayland/wlroots/icontools.cpp

This file was deleted.

6 changes: 0 additions & 6 deletions panel/backends/wayland/wlroots/icontools.hpp

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "lxqttaskbarwlrwindowmanagment.h"
#include "icontools.hpp"

#include <QString>
#include <QFuture>
Expand All @@ -12,7 +11,7 @@
#include <QWaylandClientExtension>
#include <QWindow>

#include <xdgdesktopfile.h>
#include <xdgicon.h>

#include <qpa/qplatformnativeinterface.h>

Expand Down Expand Up @@ -98,7 +97,11 @@ void LXQtTaskBarWlrootsWindow::zwlr_foreign_toplevel_handle_v1_app_id(const QStr
appIdRecieved = true;
emit appIdChanged();

this->icon = getIconForAppId( app_id );
this->icon = XdgIcon::fromTheme(appId);
if ( this->icon.pixmap(64).width() == 0 )
{
this->icon = XdgIcon::fromTheme(appId.toLower());
}

if ( appIdRecieved && titleRecieved )
{
Expand Down

0 comments on commit 41ee2b2

Please sign in to comment.