From ed0e226aabe31f9e5cdb65aa2abf197aa84a39e3 Mon Sep 17 00:00:00 2001 From: Robbert Lagerweij Date: Thu, 8 Feb 2018 17:07:41 +0100 Subject: [PATCH] pcbnew: add and use new icons for align left, right, top & bottom NEW: add new align icons based on the existing align_items.svg icon, just flipped and rotated CHANGED: change the context menu to use the new align icons --- bitmaps_png/CMakeLists.txt | 4 + bitmaps_png/cpp_26/align_items_bottom.cpp | 23 + bitmaps_png/cpp_26/align_items_left.cpp | 23 + bitmaps_png/cpp_26/align_items_right.cpp | 24 + bitmaps_png/cpp_26/align_items_top.cpp | 23 + bitmaps_png/sources/align_items_bottom.svg | 498 +++++++++++++++++++++ bitmaps_png/sources/align_items_left.svg | 494 ++++++++++++++++++++ bitmaps_png/sources/align_items_right.svg | 494 ++++++++++++++++++++ bitmaps_png/sources/align_items_top.svg | 498 +++++++++++++++++++++ include/bitmaps.h | 4 + pcbnew/tools/placement_tool.cpp | 8 +- 11 files changed, 2089 insertions(+), 4 deletions(-) create mode 100644 bitmaps_png/cpp_26/align_items_bottom.cpp create mode 100644 bitmaps_png/cpp_26/align_items_left.cpp create mode 100644 bitmaps_png/cpp_26/align_items_right.cpp create mode 100644 bitmaps_png/cpp_26/align_items_top.cpp create mode 100644 bitmaps_png/sources/align_items_bottom.svg create mode 100644 bitmaps_png/sources/align_items_left.svg create mode 100644 bitmaps_png/sources/align_items_right.svg create mode 100644 bitmaps_png/sources/align_items_top.svg diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index 6d5023b4cc..c50a80c5d6 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -138,6 +138,10 @@ set( BMAPS_MID add_zone_cutout add_zone align_items + align_items_left + align_items_right + align_items_top + align_items_bottom align_items_center align_items_middle anchor diff --git a/bitmaps_png/cpp_26/align_items_bottom.cpp b/bitmaps_png/cpp_26/align_items_bottom.cpp new file mode 100644 index 0000000000..618b3d7413 --- /dev/null +++ b/bitmaps_png/cpp_26/align_items_bottom.cpp @@ -0,0 +1,23 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x00, 0x5e, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0x60, 0x18, 0x05, 0x38, + 0x00, 0xa3, 0x4a, 0xc4, 0x67, 0x06, 0xa5, 0xd0, 0xff, 0xc8, 0x18, 0x2c, 0x46, 0x75, 0x00, 0x34, + 0x38, 0x74, 0xe6, 0x7f, 0x14, 0x0c, 0xb6, 0x70, 0xd4, 0x22, 0xaa, 0x59, 0x44, 0x71, 0x64, 0x12, + 0xed, 0x23, 0x4a, 0xbd, 0x3e, 0x6a, 0xd1, 0xc8, 0xb1, 0x88, 0x60, 0xaa, 0xa4, 0x9a, 0x8f, 0x28, + 0x95, 0x1f, 0xb5, 0x68, 0xd4, 0x22, 0xcc, 0x42, 0x55, 0x35, 0xfc, 0x13, 0x46, 0xf2, 0x05, 0x89, + 0x51, 0x49, 0x7e, 0x98, 0x82, 0xb4, 0xb4, 0xb4, 0x7b, 0x40, 0xfc, 0x9f, 0x46, 0xf8, 0xde, 0xf0, + 0x0c, 0x35, 0x00, 0x35, 0x2f, 0x68, 0x13, 0xd7, 0x53, 0x83, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x49, + 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE align_items_bottom_xpm[1] = {{ png, sizeof( png ), "align_items_bottom_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/align_items_left.cpp b/bitmaps_png/cpp_26/align_items_left.cpp new file mode 100644 index 0000000000..8bcbaf7efb --- /dev/null +++ b/bitmaps_png/cpp_26/align_items_left.cpp @@ -0,0 +1,23 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x00, 0x65, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0x60, 0xa0, 0x37, 0x48, + 0x4b, 0x4b, 0xbb, 0x4f, 0x2f, 0x8b, 0xfe, 0xc3, 0xd8, 0x8c, 0x2a, 0x11, 0x9f, 0x19, 0x94, 0x42, + 0xff, 0x93, 0x82, 0xc1, 0x7a, 0x48, 0xb5, 0x08, 0xa4, 0x31, 0x74, 0xe6, 0x7f, 0x92, 0x30, 0xd8, + 0xc2, 0x51, 0x8b, 0xe8, 0x66, 0x11, 0xfd, 0x12, 0x03, 0xbd, 0x92, 0xf7, 0xa0, 0xc8, 0x47, 0x44, + 0x07, 0x11, 0xa5, 0x89, 0x81, 0xe8, 0x48, 0x1f, 0xb5, 0x88, 0xa6, 0x16, 0xd1, 0x2f, 0x31, 0x8c, + 0xa8, 0x7c, 0x44, 0x71, 0xb1, 0x44, 0x69, 0xa1, 0x4a, 0x74, 0xc2, 0x19, 0xb5, 0x88, 0x2a, 0x16, + 0xd1, 0x3a, 0x31, 0xd0, 0xa7, 0xb9, 0x45, 0x6b, 0x00, 0x00, 0x0c, 0xa6, 0x68, 0x1b, 0xd5, 0x4d, + 0xbe, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE align_items_left_xpm[1] = {{ png, sizeof( png ), "align_items_left_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/align_items_right.cpp b/bitmaps_png/cpp_26/align_items_right.cpp new file mode 100644 index 0000000000..33184fbb39 --- /dev/null +++ b/bitmaps_png/cpp_26/align_items_right.cpp @@ -0,0 +1,24 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x00, 0x6a, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0x60, 0x18, 0x0e, 0x20, + 0x2d, 0x2d, 0xed, 0x3e, 0x51, 0x0a, 0x19, 0x55, 0x22, 0x3e, 0x33, 0x28, 0x85, 0xfe, 0x27, 0x05, + 0x83, 0xf5, 0x20, 0x2c, 0xfa, 0x4f, 0x9c, 0x93, 0x80, 0x1a, 0x43, 0x67, 0xfe, 0x27, 0x09, 0x83, + 0x2d, 0x1c, 0xb5, 0x88, 0x6e, 0x16, 0xd1, 0x2f, 0x31, 0x50, 0x9e, 0xbc, 0x87, 0x88, 0x45, 0xf8, + 0x82, 0x94, 0xba, 0x41, 0x87, 0x27, 0x91, 0x90, 0x97, 0xea, 0x46, 0x2d, 0xa2, 0xb6, 0x45, 0xf4, + 0x4b, 0x0c, 0x43, 0x22, 0x1f, 0x91, 0x53, 0xdc, 0x90, 0x17, 0x74, 0x64, 0x14, 0xa0, 0xe4, 0x25, + 0x86, 0x51, 0x8b, 0xc8, 0xb5, 0x88, 0x7e, 0x89, 0x61, 0x20, 0x9b, 0x5b, 0xd4, 0x04, 0x00, 0x2a, + 0xee, 0x68, 0x1b, 0x1d, 0x4b, 0xdc, 0x48, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, + 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE align_items_right_xpm[1] = {{ png, sizeof( png ), "align_items_right_xpm" }}; + +//EOF diff --git a/bitmaps_png/cpp_26/align_items_top.cpp b/bitmaps_png/cpp_26/align_items_top.cpp new file mode 100644 index 0000000000..aa6816d52e --- /dev/null +++ b/bitmaps_png/cpp_26/align_items_top.cpp @@ -0,0 +1,23 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, + 0xce, 0x00, 0x00, 0x00, 0x59, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0x60, 0x18, 0x96, 0x20, + 0x2d, 0x2d, 0xed, 0x1e, 0x10, 0xff, 0xa7, 0x11, 0xbe, 0xc7, 0x30, 0xbc, 0x01, 0xa3, 0x4a, 0xc4, + 0x67, 0x06, 0xa5, 0xd0, 0xff, 0xc8, 0x18, 0x2c, 0x46, 0x25, 0x79, 0x04, 0x00, 0x4a, 0x84, 0xce, + 0xfc, 0x8f, 0x82, 0xc1, 0x1a, 0xa8, 0x25, 0x3f, 0x6a, 0xd1, 0xa8, 0x45, 0x24, 0x5b, 0x44, 0x30, + 0xf9, 0x52, 0xcd, 0x47, 0x84, 0xc0, 0xa8, 0x45, 0xc3, 0xc7, 0x22, 0xe2, 0x0b, 0x45, 0x4a, 0x7d, + 0x44, 0x29, 0x18, 0xb5, 0x68, 0xd0, 0x5b, 0x44, 0x71, 0x62, 0x1a, 0x72, 0x00, 0x00, 0x16, 0x60, + 0x68, 0x19, 0x7c, 0xfa, 0xc9, 0x16, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, + 0x60, 0x82, +}; + +const BITMAP_OPAQUE align_items_top_xpm[1] = {{ png, sizeof( png ), "align_items_top_xpm" }}; + +//EOF diff --git a/bitmaps_png/sources/align_items_bottom.svg b/bitmaps_png/sources/align_items_bottom.svg new file mode 100644 index 0000000000..5a34d7dc85 --- /dev/null +++ b/bitmaps_png/sources/align_items_bottom.svg @@ -0,0 +1,498 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/align_items_left.svg b/bitmaps_png/sources/align_items_left.svg new file mode 100644 index 0000000000..161520cde9 --- /dev/null +++ b/bitmaps_png/sources/align_items_left.svg @@ -0,0 +1,494 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/align_items_right.svg b/bitmaps_png/sources/align_items_right.svg new file mode 100644 index 0000000000..4ad793e40b --- /dev/null +++ b/bitmaps_png/sources/align_items_right.svg @@ -0,0 +1,494 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bitmaps_png/sources/align_items_top.svg b/bitmaps_png/sources/align_items_top.svg new file mode 100644 index 0000000000..4f7f66ac8e --- /dev/null +++ b/bitmaps_png/sources/align_items_top.svg @@ -0,0 +1,498 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/include/bitmaps.h b/include/bitmaps.h index dd9f9b71ce..a13292e40d 100644 --- a/include/bitmaps.h +++ b/include/bitmaps.h @@ -67,6 +67,10 @@ EXTERN_BITMAP( annotate_down_right_xpm ) EXTERN_BITMAP( annotate_right_down_xpm ) EXTERN_BITMAP( annotate_xpm ) EXTERN_BITMAP( align_items_xpm ) +EXTERN_BITMAP( align_items_left_xpm ) +EXTERN_BITMAP( align_items_right_xpm ) +EXTERN_BITMAP( align_items_top_xpm ) +EXTERN_BITMAP( align_items_bottom_xpm ) EXTERN_BITMAP( align_items_center_xpm ) EXTERN_BITMAP( align_items_middle_xpm ) EXTERN_BITMAP( apply_pad_settings_xpm ) diff --git a/pcbnew/tools/placement_tool.cpp b/pcbnew/tools/placement_tool.cpp index 7dc9e6c44c..80184311c7 100644 --- a/pcbnew/tools/placement_tool.cpp +++ b/pcbnew/tools/placement_tool.cpp @@ -40,22 +40,22 @@ TOOL_ACTION PCB_ACTIONS::alignTop( "pcbnew.AlignAndDistribute.alignTop", AS_GLOBAL, 0, _( "Align to Top" ), - _( "Aligns selected items to the top edge" ), up_xpm ); + _( "Aligns selected items to the top edge" ), align_items_top_xpm ); TOOL_ACTION PCB_ACTIONS::alignBottom( "pcbnew.AlignAndDistribute.alignBottom", AS_GLOBAL, 0, _( "Align to Bottom" ), - _( "Aligns selected items to the bottom edge" ), down_xpm ); + _( "Aligns selected items to the bottom edge" ), align_items_bottom_xpm ); TOOL_ACTION PCB_ACTIONS::alignLeft( "pcbnew.AlignAndDistribute.alignLeft", AS_GLOBAL, 0, _( "Align to Left" ), - _( "Aligns selected items to the left edge" ), left_xpm ); + _( "Aligns selected items to the left edge" ), align_items_left_xpm ); TOOL_ACTION PCB_ACTIONS::alignRight( "pcbnew.AlignAndDistribute.alignRight", AS_GLOBAL, 0, _( "Align to Right" ), - _( "Aligns selected items to the right edge" ), right_xpm ); + _( "Aligns selected items to the right edge" ), align_items_right_xpm ); TOOL_ACTION PCB_ACTIONS::alignCenterX( "pcbnew.AlignAndDistribute.alignCenterX", AS_GLOBAL, 0,