diff --git a/resources/bitmaps_png/icons/icon_3d.ico b/resources/bitmaps_png/icons/icon_3d.ico index 2f08e9f1d7..4f38360f3d 100644 Binary files a/resources/bitmaps_png/icons/icon_3d.ico and b/resources/bitmaps_png/icons/icon_3d.ico differ diff --git a/resources/bitmaps_png/icons/icon_bitmap2component.ico b/resources/bitmaps_png/icons/icon_bitmap2component.ico index 794a8573bd..96cdd7a20d 100644 Binary files a/resources/bitmaps_png/icons/icon_bitmap2component.ico and b/resources/bitmaps_png/icons/icon_bitmap2component.ico differ diff --git a/resources/bitmaps_png/icons/icon_cvpcb.ico b/resources/bitmaps_png/icons/icon_cvpcb.ico index 19c7d6d23a..3c1cf6744b 100644 Binary files a/resources/bitmaps_png/icons/icon_cvpcb.ico and b/resources/bitmaps_png/icons/icon_cvpcb.ico differ diff --git a/resources/bitmaps_png/icons/icon_eeschema.ico b/resources/bitmaps_png/icons/icon_eeschema.ico index e8ffd4d772..0c32936f2d 100644 Binary files a/resources/bitmaps_png/icons/icon_eeschema.ico and b/resources/bitmaps_png/icons/icon_eeschema.ico differ diff --git a/resources/bitmaps_png/icons/icon_gerbview.ico b/resources/bitmaps_png/icons/icon_gerbview.ico index 0f81fe7825..5be0544471 100644 Binary files a/resources/bitmaps_png/icons/icon_gerbview.ico and b/resources/bitmaps_png/icons/icon_gerbview.ico differ diff --git a/resources/bitmaps_png/icons/icon_kicad.ico b/resources/bitmaps_png/icons/icon_kicad.ico index f4cf813a30..1541af1a97 100644 Binary files a/resources/bitmaps_png/icons/icon_kicad.ico and b/resources/bitmaps_png/icons/icon_kicad.ico differ diff --git a/resources/bitmaps_png/icons/icon_kicad_nightly.ico b/resources/bitmaps_png/icons/icon_kicad_nightly.ico index 5424763cdd..6ed992f144 100644 Binary files a/resources/bitmaps_png/icons/icon_kicad_nightly.ico and b/resources/bitmaps_png/icons/icon_kicad_nightly.ico differ diff --git a/resources/bitmaps_png/icons/icon_pagelayout_editor.ico b/resources/bitmaps_png/icons/icon_pagelayout_editor.ico index 7d8f1afb06..fefa7c1179 100644 Binary files a/resources/bitmaps_png/icons/icon_pagelayout_editor.ico and b/resources/bitmaps_png/icons/icon_pagelayout_editor.ico differ diff --git a/resources/bitmaps_png/icons/icon_pcbcalculator.ico b/resources/bitmaps_png/icons/icon_pcbcalculator.ico index a162721ba8..958a77b1c1 100644 Binary files a/resources/bitmaps_png/icons/icon_pcbcalculator.ico and b/resources/bitmaps_png/icons/icon_pcbcalculator.ico differ diff --git a/resources/bitmaps_png/icons/icon_pcbnew.ico b/resources/bitmaps_png/icons/icon_pcbnew.ico index 11712c47e1..65b2583945 100644 Binary files a/resources/bitmaps_png/icons/icon_pcbnew.ico and b/resources/bitmaps_png/icons/icon_pcbnew.ico differ diff --git a/resources/bitmaps_png/icons/icon_pcm.ico b/resources/bitmaps_png/icons/icon_pcm.ico index 820ccff9ef..29f5dd4da6 100644 Binary files a/resources/bitmaps_png/icons/icon_pcm.ico and b/resources/bitmaps_png/icons/icon_pcm.ico differ diff --git a/resources/bitmaps_png/icons/mk_icn.sh b/resources/bitmaps_png/icons/mk_icn.sh index 3d299ba52b..88279e3cb1 100644 --- a/resources/bitmaps_png/icons/mk_icn.sh +++ b/resources/bitmaps_png/icons/mk_icn.sh @@ -8,7 +8,7 @@ rm -r tmp rm icon_*.png mkdir tmp -mkdir tmp/22 tmp/26 tmp/32 tmp/48 tmp/64 tmp/128 tmp/256 tmp/ico +mkdir tmp/16 tmp/24 tmp/32 tmp/48 tmp/64 tmp/256 tmp/ico echo "all directories created." cd ../sources/light @@ -28,12 +28,11 @@ ICON_FILES="icon_3d.svg for fl in $ICON_FILES do NAME=${fl%.*} # strip the file extension - inkscape -o ../../icons/tmp/22/$NAME.png -w 22 -h 22 --export-area-snap $fl - inkscape -o ../../icons/tmp/26/$NAME.png -w 26 -h 26 --export-area-snap $fl + inkscape -o ../../icons/tmp/16/$NAME.png -w 16 -h 16 --export-area-snap $fl + inkscape -o ../../icons/tmp/24/$NAME.png -w 24 -h 24 --export-area-snap $fl inkscape -o ../../icons/tmp/32/$NAME.png -w 32 -h 32 --export-area-snap $fl inkscape -o ../../icons/tmp/48/$NAME.png -w 48 -h 48 --export-area-snap $fl inkscape -o ../../icons/tmp/64/$NAME.png -w 64 -h 64 --export-area-snap $fl - inkscape -o ../../icons/tmp/128/$NAME.png -w 128 -h 128 --export-area-snap $fl inkscape -o ../../icons/tmp/256/$NAME.png -w 256 -h 256 --export-area-snap $fl echo "file $fl converted." done @@ -44,8 +43,8 @@ cd ../../icons for fl in $ICON_FILES do NAME=${fl%.*} # strip the file extension - icotool -c tmp/22/$NAME.png tmp/26/$NAME.png tmp/32/$NAME.png tmp/48/$NAME.png \ - tmp/64/$NAME.png tmp/128/$NAME.png tmp/256/$NAME.png -o tmp/ico/$NAME.ico + icotool -c tmp/16/$NAME.png tmp/24/$NAME.png tmp/32/$NAME.png tmp/48/$NAME.png \ + tmp/64/$NAME.png tmp/256/$NAME.png -o tmp/ico/$NAME.ico echo "file $fl converted in .ico file." done diff --git a/resources/msw/bitmap2component.rc b/resources/msw/bitmap2component.rc index 60f31b983e..733fa021c5 100644 --- a/resources/msw/bitmap2component.rc +++ b/resources/msw/bitmap2component.rc @@ -1,4 +1,6 @@ -icon_bitmap2component ICON "../resources/bitmaps_png/icons/icon_bitmap2component.ico" +#include "resource.h" + +IDI_APP_BITMAP2COMPONENT_ICON ICON "../resources/bitmaps_png/icons/icon_bitmap2component.ico" #define RC_VER_FILE_DESCRIPTION "KiCad Image Converter " KICAD_WIN32_RC_PRODVER_STR #define RC_VER_INTERNALNAME "bitmap2component" diff --git a/resources/msw/eeschema.rc b/resources/msw/eeschema.rc index aad773d452..06a6d5e8e9 100644 --- a/resources/msw/eeschema.rc +++ b/resources/msw/eeschema.rc @@ -1,4 +1,8 @@ -icon_eeschema ICON "../resources/bitmaps_png/icons/icon_eeschema.ico" +#include "resource.h" + +IDI_APP_EESCHEMA_ICON ICON "../resources/bitmaps_png/icons/icon_eeschema.ico" +IDI_FILE_SCHEMATIC_ICON ICON "../resources/bitmaps_png/icons/fileicon_schematic.ico" +IDI_FILE_SYMBOL_ICON ICON "../resources/bitmaps_png/icons/fileicon_symbol.ico" #define RC_VER_FILE_DESCRIPTION "KiCad Schematic Editor " KICAD_WIN32_RC_PRODVER_STR #define RC_VER_INTERNALNAME "eeschema" diff --git a/resources/msw/gerbview.rc b/resources/msw/gerbview.rc index 6f67aebb2e..94ffd4152a 100644 --- a/resources/msw/gerbview.rc +++ b/resources/msw/gerbview.rc @@ -1,6 +1,8 @@ -icon_gerbview ICON "../resources/bitmaps_png/icons/icon_gerbview.ico" +#include "resource.h" + +IDI_APP_GERBVIEW_ICON ICON "../resources/bitmaps_png/icons/icon_gerbview.ico" #define RC_VER_FILE_DESCRIPTION "KiCad Gerber Viewer " KICAD_WIN32_RC_PRODVER_STR #define RC_VER_INTERNALNAME "gerbview" #define RC_VER_ORIGINALFILENAME "gerbview.exe" -#include "kiwin32.rc" +#include "kiwin32.rc" \ No newline at end of file diff --git a/resources/msw/kicad.rc b/resources/msw/kicad.rc index b1ce5a486d..0b1698892f 100644 --- a/resources/msw/kicad.rc +++ b/resources/msw/kicad.rc @@ -1,11 +1,19 @@ #define INCLUDE_KICAD_VERSION #include +#include "resource.h" + #if KICAD_IS_NIGHTLY -icon_kicad ICON "../resources/bitmaps_png/icons/icon_kicad_nightly.ico" +IDI_APP_KICAD_ICON ICON "../resources/bitmaps_png/icons/icon_kicad_nightly.ico" #else -icon_kicad ICON "../resources/bitmaps_png/icons/icon_kicad.ico" +IDI_APP_KICAD_ICON ICON "../resources/bitmaps_png/icons/icon_kicad.ico" #endif +IDI_FILE_FOOTPRINT_ICON ICON "../resources/bitmaps_png/icons/fileicon_footprint.ico" +IDI_FILE_PCB_ICON ICON "../resources/bitmaps_png/icons/fileicon_pcb.ico" +IDI_FILE_PROJECT_ICON ICON "../resources/bitmaps_png/icons/fileicon_project.ico" +IDI_FILE_SCHEMATIC_ICON ICON "../resources/bitmaps_png/icons/fileicon_schematic.ico" +IDI_FILE_SYMBOL_ICON ICON "../resources/bitmaps_png/icons/fileicon_symbol.ico" +IDI_FILE_WORKSHEET_ICON ICON "../resources/bitmaps_png/icons/fileicon_worksheet.ico" #define RC_VER_FILE_DESCRIPTION "KiCad EDA " KICAD_WIN32_RC_PRODVER_STR #define RC_VER_INTERNALNAME "kicad" diff --git a/resources/msw/kiwin32.rc b/resources/msw/kiwin32.rc index b085b1d671..52473dc062 100644 --- a/resources/msw/kiwin32.rc +++ b/resources/msw/kiwin32.rc @@ -1,10 +1,34 @@ -// Turn off wxWidgets attempting to use its own manifests -#define wxUSE_NO_MANIFEST 1 -#include "wx/msw/wx.rc" +// We extracted parts of the "stock" wx resource base +// because we want to follow Microsoft convention of numbering +// resources such as icons instead of playing alphabetical ordering games +// We also don't need the stock wx icons + +// Standard wxWindows Cursors +WXCURSOR_HAND CURSOR DISCARDABLE "wx/msw/hand.cur" +WXCURSOR_BULLSEYE CURSOR DISCARDABLE "wx/msw/bullseye.cur" +WXCURSOR_PENCIL CURSOR DISCARDABLE "wx/msw/pencil.cur" +WXCURSOR_MAGNIFIER CURSOR DISCARDABLE "wx/msw/magnif1.cur" +WXCURSOR_ROLLER CURSOR DISCARDABLE "wx/msw/roller.cur" +WXCURSOR_PBRUSH CURSOR DISCARDABLE "wx/msw/pbrush.cur" +WXCURSOR_PLEFT CURSOR DISCARDABLE "wx/msw/pntleft.cur" +WXCURSOR_PRIGHT CURSOR DISCARDABLE "wx/msw/pntright.cur" +WXCURSOR_BLANK CURSOR DISCARDABLE "wx/msw/blank.cur" +WXCURSOR_CROSS CURSOR DISCARDABLE "wx/msw/cross.cur" + +// For wxContextHelpButton +csquery BITMAP "wx/msw/csquery.bmp" + +// For obtaining the RGB values of standard colours +wxBITMAP_STD_COLOURS BITMAP "wx/msw/colours.bmp" + #include // defines VS_VERSION_INFO #define INCLUDE_KICAD_VERSION #include +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 +#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2 +#define RT_MANIFEST 24 + #ifdef ISOLATION_AWARE_ENABLED #define MANIFEST_ID ISOLATIONAWARE_MANIFEST_RESOURCE_ID #else diff --git a/resources/msw/pcb_calculator.rc b/resources/msw/pcb_calculator.rc index 4c2cb98507..539141c38f 100644 --- a/resources/msw/pcb_calculator.rc +++ b/resources/msw/pcb_calculator.rc @@ -1,4 +1,6 @@ -icon_pcbcalculator ICON "../resources/bitmaps_png/icons/icon_pcbcalculator.ico" +#include "resource.h" + +IDI_APP_PCBCALC_ICON ICON "../resources/bitmaps_png/icons/icon_pcbcalculator.ico" #define RC_VER_FILE_DESCRIPTION "KiCad PCB Calculator " KICAD_WIN32_RC_PRODVER_STR #define RC_VER_INTERNALNAME "pcb_calculator" diff --git a/resources/msw/pcbnew.rc b/resources/msw/pcbnew.rc index 02775114e8..bf59a01c13 100644 --- a/resources/msw/pcbnew.rc +++ b/resources/msw/pcbnew.rc @@ -1,4 +1,8 @@ -icon_pcbnew ICON "../resources/bitmaps_png/icons/icon_pcbnew.ico" +#include "resource.h" + +IDI_APP_PCBNEW_ICON ICON "../resources/bitmaps_png/icons/icon_pcbnew.ico" +IDI_FILE_FOOTPRINT_ICON ICON "../resources/bitmaps_png/icons/fileicon_footprint.ico" +IDI_FILE_PCB_ICON ICON "../resources/bitmaps_png/icons/fileicon_pcb.ico" #define RC_VER_FILE_DESCRIPTION "KiCad PCB Editor " KICAD_WIN32_RC_PRODVER_STR #define RC_VER_INTERNALNAME "pcbnew" diff --git a/resources/msw/pl_editor.rc b/resources/msw/pl_editor.rc index 1b4475fafc..d2915ae079 100644 --- a/resources/msw/pl_editor.rc +++ b/resources/msw/pl_editor.rc @@ -1,4 +1,7 @@ -icon_pagelayout_editor ICON "../resources/bitmaps_png/icons/icon_pagelayout_editor.ico" +#include "resource.h" + +IDI_APP_PLEDITOR_ICON ICON "../resources/bitmaps_png/icons/icon_pagelayout_editor.ico" +IDI_FILE_WORKSHEET_ICON ICON "../resources/bitmaps_png/icons/fileicon_worksheet.ico" #define RC_VER_FILE_DESCRIPTION "KiCad Drawing Sheet Editor " KICAD_WIN32_RC_PRODVER_STR #define RC_VER_INTERNALNAME "pl_editor" diff --git a/resources/msw/resource.h b/resources/msw/resource.h new file mode 100644 index 0000000000..d8a7ebb720 --- /dev/null +++ b/resources/msw/resource.h @@ -0,0 +1,42 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma once + +// App icons, we list these first, there will only be one per-exe but they must be first +// out of all possible icons +#define IDI_APP_KICAD_ICON 100 +#define IDI_APP_EESCHEMA_ICON 101 +#define IDI_APP_PCBNEW_ICON 102 +#define IDI_APP_PLEDITOR_ICON 103 +#define IDI_APP_BITMAP2COMPONENT_ICON 104 +#define IDI_APP_PCBCALC_ICON 105 +#define IDI_APP_GERBVIEW_ICON 106 + +// File icons +#define IDI_FILE_PROJECT_ICON 200 +#define IDI_FILE_SCHEMATIC_ICON 201 +#define IDI_FILE_SYMBOL_ICON 202 +#define IDI_FILE_PCB_ICON 203 +#define IDI_FILE_FOOTPRINT_ICON 204 +#define IDI_FILE_WORKSHEET_ICON 205