Add wxIconEx
This simplifies loading DPI-aware icons. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
27
include/wxex/icon.h
Normal file
27
include/wxex/icon.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2025 Amebis
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <codeanalysis\warnings.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include <wx/msw/icon.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
|
||||
///
|
||||
/// Icon for DPI aware applications
|
||||
///
|
||||
class wxIconEx : public wxIcon
|
||||
{
|
||||
public:
|
||||
wxIconEx(const wxString& name,
|
||||
wxBitmapType type = wxICON_DEFAULT_TYPE,
|
||||
int desiredWidth = -1, int desiredHeight = -1,
|
||||
wxWindowBase *window = nullptr);
|
||||
};
|
||||
Reference in New Issue
Block a user