Skip to content

Commit

Permalink
Add application icon
Browse files Browse the repository at this point in the history
  • Loading branch information
martonmiklos committed Jan 11, 2025
1 parent 41a2e7f commit 2e950b1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Binary file added doc/smallLogo_for_windowicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions include/AppImages.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ namespace AppImages
{
extern const char *logo2_png;
const int logo2_pngSize = 49015;

extern const char *logosmall_png;
const int logosmall_pngSize = 21145;
}
3 changes: 3 additions & 0 deletions src/AppImages.cpp

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <JuceHeader.h>
#include "ASCIILogFile.hpp"
#include "AppImages.h"
#include "ServerMainComponent.hpp"
#include "isobus/hardware_integration/can_hardware_interface.hpp"
#include "isobus/isobus/can_internal_control_function.hpp"
Expand Down Expand Up @@ -113,6 +114,15 @@ class AgISOVirtualTerminalApplication : public juce::JUCEApplication
centreWithSize(getWidth(), getHeight());
#endif

setIcon(ImageCache::getFromMemory(AppImages::logosmall_png, AppImages::logosmall_pngSize));
#if JUCE_LINUX
// this hack is needed on Linux
ComponentPeer *peer = getPeer();
if (peer)
{
peer->setIcon(ImageCache::getFromMemory(AppImages::logosmall_png, AppImages::logosmall_pngSize));
}
#endif
setVisible(true);
}

Expand Down

0 comments on commit 2e950b1

Please sign in to comment.