Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.
Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz
The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.
Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.
Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
This commit is contained in:
@@ -573,9 +573,9 @@ wxString SCH_TEXT::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF SCH_TEXT::GetMenuImage() const
|
||||
BITMAPS SCH_TEXT::GetMenuImage() const
|
||||
{
|
||||
return text_xpm;
|
||||
return BITMAPS::text;
|
||||
}
|
||||
|
||||
|
||||
@@ -824,9 +824,9 @@ wxString SCH_LABEL::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF SCH_LABEL::GetMenuImage() const
|
||||
BITMAPS SCH_LABEL::GetMenuImage() const
|
||||
{
|
||||
return add_line_label_xpm;
|
||||
return BITMAPS::add_line_label;
|
||||
}
|
||||
|
||||
|
||||
@@ -1370,9 +1370,9 @@ wxString SCH_GLOBALLABEL::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF SCH_GLOBALLABEL::GetMenuImage() const
|
||||
BITMAPS SCH_GLOBALLABEL::GetMenuImage() const
|
||||
{
|
||||
return add_glabel_xpm;
|
||||
return BITMAPS::add_glabel;
|
||||
}
|
||||
|
||||
|
||||
@@ -1562,9 +1562,9 @@ wxString SCH_HIERLABEL::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF SCH_HIERLABEL::GetMenuImage() const
|
||||
BITMAPS SCH_HIERLABEL::GetMenuImage() const
|
||||
{
|
||||
return add_hierarchical_label_xpm;
|
||||
return BITMAPS::add_hierarchical_label;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user