diff --git a/common/bitmap_info.cpp b/common/bitmap_info.cpp index 1bda9c334b..81cd4becd7 100644 --- a/common/bitmap_info.cpp +++ b/common/bitmap_info.cpp @@ -446,8 +446,10 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_24.png" ), 24, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_24.png" ), 24, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_24.png" ), 24, wxT( "light" ) ); - aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_24.png" ), 24, wxT( "light" ) ); - aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_24.png" ), 24, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_24.png" ), 24, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_24.png" ), 24, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_24.png" ), 24, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_24.png" ), 24, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_24.png" ), 24, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_24.png" ), 24, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_24.png" ), 24, wxT( "light" ) ); @@ -852,8 +854,10 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_24.png" ), 24, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_24.png" ), 24, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_24.png" ), 24, wxT( "dark" ) ); - aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_24.png" ), 24, wxT( "dark" ) ); - aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_24.png" ), 24, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_24.png" ), 24, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_24.png" ), 24, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_24.png" ), 24, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_24.png" ), 24, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_24.png" ), 24, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_24.png" ), 24, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_24.png" ), 24, wxT( "dark" ) ); @@ -1258,8 +1262,10 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_16.png" ), 16, wxT( "light" ) ); - aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_16.png" ), 16, wxT( "light" ) ); - aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_16.png" ), 16, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_16.png" ), 16, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_16.png" ), 16, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_16.png" ), 16, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_16.png" ), 16, wxT( "light" ) ); @@ -1664,8 +1670,10 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_16.png" ), 16, wxT( "dark" ) ); - aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_16.png" ), 16, wxT( "dark" ) ); - aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_16.png" ), 16, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_16.png" ), 16, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_16.png" ), 16, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_16.png" ), 16, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_16.png" ), 16, wxT( "dark" ) ); @@ -2070,8 +2078,10 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_32.png" ), 32, wxT( "light" ) ); - aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_32.png" ), 32, wxT( "light" ) ); - aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_32.png" ), 32, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_32.png" ), 32, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_32.png" ), 32, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_32.png" ), 32, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_32.png" ), 32, wxT( "light" ) ); @@ -2476,8 +2486,10 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_32.png" ), 32, wxT( "dark" ) ); - aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_32.png" ), 32, wxT( "dark" ) ); - aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_32.png" ), 32, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_32.png" ), 32, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_32.png" ), 32, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_32.png" ), 32, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_32.png" ), 32, wxT( "dark" ) ); @@ -2882,8 +2894,10 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_48.png" ), 48, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_48.png" ), 48, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_48.png" ), 48, wxT( "light" ) ); - aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_48.png" ), 48, wxT( "light" ) ); - aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_48.png" ), 48, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_48.png" ), 48, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_48.png" ), 48, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_48.png" ), 48, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_48.png" ), 48, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_48.png" ), 48, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_48.png" ), 48, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_48.png" ), 48, wxT( "light" ) ); @@ -3288,8 +3302,10 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_48.png" ), 48, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_48.png" ), 48, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_48.png" ), 48, wxT( "dark" ) ); - aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_48.png" ), 48, wxT( "dark" ) ); - aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_48.png" ), 48, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_48.png" ), 48, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_48.png" ), 48, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_48.png" ), 48, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_48.png" ), 48, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_48.png" ), 48, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_48.png" ), 48, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_48.png" ), 48, wxT( "dark" ) ); @@ -3694,8 +3710,10 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_64.png" ), 64, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_64.png" ), 64, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_64.png" ), 64, wxT( "light" ) ); - aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_64.png" ), 64, wxT( "light" ) ); - aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_64.png" ), 64, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_64.png" ), 64, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_64.png" ), 64, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_64.png" ), 64, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_64.png" ), 64, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_64.png" ), 64, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_64.png" ), 64, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_64.png" ), 64, wxT( "light" ) ); @@ -4100,8 +4118,10 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_64.png" ), 64, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_64.png" ), 64, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_64.png" ), 64, wxT( "dark" ) ); - aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_64.png" ), 64, wxT( "dark" ) ); - aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_64.png" ), 64, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_64.png" ), 64, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_64.png" ), 64, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_64.png" ), 64, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_64.png" ), 64, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_64.png" ), 64, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_64.png" ), 64, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_64.png" ), 64, wxT( "dark" ) ); diff --git a/include/bitmaps/bitmaps_list.h b/include/bitmaps/bitmaps_list.h index dba30cc731..a4f3fcbc4e 100644 --- a/include/bitmaps/bitmaps_list.h +++ b/include/bitmaps/bitmaps_list.h @@ -155,8 +155,10 @@ enum class BITMAPS : unsigned int directory_browser, directory_open, display_options, - distribute_horizontal, - distribute_vertical, + distribute_horizontal_centers, + distribute_horizontal_gaps, + distribute_vertical_centers, + distribute_vertical_gaps, down, drag, drag_segment, diff --git a/libs/kimath/CMakeLists.txt b/libs/kimath/CMakeLists.txt index 869a19edd5..c587c8e532 100644 --- a/libs/kimath/CMakeLists.txt +++ b/libs/kimath/CMakeLists.txt @@ -12,6 +12,7 @@ set( KIMATH_SRCS src/trigo.cpp src/geometry/chamfer.cpp + src/geometry/distribute.cpp src/geometry/eda_angle.cpp src/geometry/ellipse.cpp src/geometry/circle.cpp diff --git a/libs/kimath/include/geometry/distribute.h b/libs/kimath/include/geometry/distribute.h new file mode 100644 index 0000000000..a2be7e4408 --- /dev/null +++ b/libs/kimath/include/geometry/distribute.h @@ -0,0 +1,43 @@ +/* + * 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 3 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, see . + */ + +#ifndef DISTRIBUTE_H +#define DISTRIBUTE_H + +#include +#include + +/** + * Given a list of 'n' item spans (e.g. left-right edge positions), return the deltas for + * each item to produce even gaps between each item. + * + * The first and last items will not be moved. + * + * @param aItemExtents a list of 'n' item spans, each a pair of integers representing the + * extents of an item. This should be sorted in a meaningful way to + * the caller, for example, left-right based on the item's left edge + * or by anchor. + * + * @return a vector of n deltas, the first and last will be 0. + */ +std::vector GetDeltasForDistributeByGaps( const std::vector>& aItemExtents); + +std::vector GetDeltasForDistributeByPoints( const std::vector& aItemPositions ); + +#endif // DISTRIBUTE_H \ No newline at end of file diff --git a/libs/kimath/src/geometry/distribute.cpp b/libs/kimath/src/geometry/distribute.cpp new file mode 100644 index 0000000000..b8dc3cfd10 --- /dev/null +++ b/libs/kimath/src/geometry/distribute.cpp @@ -0,0 +1,89 @@ +/* + * 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 3 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, see . + */ + +#include + +#include + + +std::vector GetDeltasForDistributeByGaps(const std::vector>& aItemExtents) +{ + std::vector deltas(aItemExtents.size(), 0); + + // This only makes sense for 3 or more items + if (aItemExtents.size() < 3) + return deltas; + + // The space between the first and last items' inner edges + const int totalSpace = aItemExtents.back().first - aItemExtents.front().second; + int totalGap = totalSpace; + + for( size_t i = 1; i < aItemExtents.size() - 1; ++i ) + { + const auto& [start, end] = aItemExtents[i]; + totalGap -= end - start; + } + + const double perItemGap = totalGap / double( aItemExtents.size() - 1 ); + + // Start counting at the end of the first item + int targetPos = aItemExtents.begin()->second; + + // End-cap items don't need to be changed + for( size_t i = 1; i < aItemExtents.size() - 1; ++i ) + { + const auto& [start, end] = aItemExtents[i]; + + // Take care not to stack rounding errors by keeping the integer accumulator + // separate and always re-multiplying the gap + const double accumulatedGaps = i * perItemGap; + const int delta = targetPos - start + KiROUND(accumulatedGaps); + + deltas[i] = delta; + + // Step over one item span (width or height) + targetPos += end - start; + } + + return deltas; +} + +std::vector GetDeltasForDistributeByPoints( const std::vector& aItemPositions ) +{ + std::vector deltas(aItemPositions.size(), 0); + + // This only makes sense for 3 or more items + if (aItemPositions.size() < 3) + return deltas; + + const int startPos = aItemPositions.front(); + const int totalGaps = aItemPositions.back() - startPos; + const double itemGap = totalGaps / double( aItemPositions.size() - 1 ); + + // End-cap items don't need to be changed + for( size_t i = 1; i < aItemPositions.size() - 1; ++i ) + { + const int targetPos = startPos + KiROUND( i * itemGap ); + const int delta = targetPos - aItemPositions[i]; + + deltas[i] = delta; + } + + return deltas; +} \ No newline at end of file diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index ac57d69daa..96ff01a05a 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -1936,20 +1936,37 @@ TOOL_ACTION PCB_ACTIONS::alignCenterX( TOOL_ACTION_ARGS() .Tooltip( _( "Aligns selected items to the horizontal center of the item under the cursor" ) ) .Icon( BITMAPS::align_items_middle ) ); -TOOL_ACTION PCB_ACTIONS::distributeHorizontally( TOOL_ACTION_ARGS() - .Name( "pcbnew.AlignAndDistribute.distributeHorizontally" ) +TOOL_ACTION PCB_ACTIONS::distributeHorizontallyCenters( TOOL_ACTION_ARGS() + .Name( "pcbnew.AlignAndDistribute.distributeHorizontallyCenters" ) .Scope( AS_GLOBAL ) - .FriendlyName( _( "Distribute Horizontally" ) ) - .Tooltip( _( "Distributes selected items between the left-most item and the right-most item" ) ) - .Icon( BITMAPS::distribute_horizontal ) ); + .FriendlyName( _( "Distribute Horizontally by Centers" ) ) + .Tooltip( _( "Distributes selected items between the left-most item and the right-most item" + "so that the item centers are equally distributed" ) ) + .Icon( BITMAPS::distribute_horizontal_centers ) ); -TOOL_ACTION PCB_ACTIONS::distributeVertically( TOOL_ACTION_ARGS() - .Name( "pcbnew.AlignAndDistribute.distributeVertically" ) +TOOL_ACTION PCB_ACTIONS::distributeHorizontallyGaps( TOOL_ACTION_ARGS() + .Name( "pcbnew.AlignAndDistribute.distributeHorizontallyGaps" ) .Scope( AS_GLOBAL ) - .FriendlyName( _( "Distribute Vertically" ) ) - .Tooltip( _( "Distributes selected items between the top-most item and the bottom-most item" ) ) - .Icon( BITMAPS::distribute_vertical ) ); + .FriendlyName( _( "Distribute Horizontally with Even Gaps" ) ) + .Tooltip( _( "Distributes selected items between the left-most item and the right-most item " + "so that the gaps between items are equal" ) ) + .Icon( BITMAPS::distribute_horizontal_gaps ) ); +TOOL_ACTION PCB_ACTIONS::distributeVerticallyGaps( TOOL_ACTION_ARGS() + .Name( "pcbnew.AlignAndDistribute.distributeVerticallyGaps" ) + .Scope( AS_GLOBAL ) + .FriendlyName( _( "Distribute Vertically with Even Gaps" ) ) + .Tooltip( _( "Distributes selected items between the top-most item and the bottom-most item " + "so that the gaps between items are equal" ) ) + .Icon( BITMAPS::distribute_vertical_gaps ) ); + +TOOL_ACTION PCB_ACTIONS::distributeVerticallyCenters( TOOL_ACTION_ARGS() + .Name( "pcbnew.AlignAndDistribute.distributeVerticallyCenters" ) + .Scope( AS_GLOBAL ) + .FriendlyName( _( "Distribute Vertically by Centers" ) ) + .Tooltip( _( "Distributes selected items between the top-most item and the bottom-most item " + "so that the item centers are equally distributed" ) ) + .Icon( BITMAPS::distribute_vertical_centers ) ); // PCB_POINT_EDITOR // diff --git a/pcbnew/tools/pcb_actions.h b/pcbnew/tools/pcb_actions.h index 8495ad3b93..5d10826047 100644 --- a/pcbnew/tools/pcb_actions.h +++ b/pcbnew/tools/pcb_actions.h @@ -309,8 +309,10 @@ public: static TOOL_ACTION alignRight; static TOOL_ACTION alignCenterX; static TOOL_ACTION alignCenterY; - static TOOL_ACTION distributeHorizontally; - static TOOL_ACTION distributeVertically; + static TOOL_ACTION distributeHorizontallyCenters; + static TOOL_ACTION distributeHorizontallyGaps; + static TOOL_ACTION distributeVerticallyCenters; + static TOOL_ACTION distributeVerticallyGaps; // Position Relative Tool /// Activation of the position relative tool diff --git a/pcbnew/tools/placement_tool.cpp b/pcbnew/tools/placement_tool.cpp index 6d121b59fe..3d1b0f8c29 100644 --- a/pcbnew/tools/placement_tool.cpp +++ b/pcbnew/tools/placement_tool.cpp @@ -30,10 +30,11 @@ #include #include -#include #include #include #include +#include +#include #include @@ -73,8 +74,10 @@ bool ALIGN_DISTRIBUTE_TOOL::Init() m_placementMenu->Add( PCB_ACTIONS::alignBottom ); m_placementMenu->AppendSeparator(); - m_placementMenu->Add( PCB_ACTIONS::distributeHorizontally ); - m_placementMenu->Add( PCB_ACTIONS::distributeVertically ); + m_placementMenu->Add( PCB_ACTIONS::distributeHorizontallyCenters ); + m_placementMenu->Add( PCB_ACTIONS::distributeHorizontallyGaps ); + m_placementMenu->Add( PCB_ACTIONS::distributeVerticallyCenters ); + m_placementMenu->Add( PCB_ACTIONS::distributeVerticallyGaps ); CONDITIONAL_MENU& selToolMenu = m_selectionTool->GetToolMenu().GetMenu(); selToolMenu.AddMenu( m_placementMenu, SELECTION_CONDITIONS::MoreThan( 1 ), 100 ); @@ -476,253 +479,136 @@ int ALIGN_DISTRIBUTE_TOOL::AlignCenterY( const TOOL_EVENT& aEvent ) } -int ALIGN_DISTRIBUTE_TOOL::DistributeHorizontally( const TOOL_EVENT& aEvent ) +int ALIGN_DISTRIBUTE_TOOL::DistributeItems( const TOOL_EVENT& aEvent ) { PCB_SELECTION& selection = m_selectionTool->RequestSelection( - []( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector, PCB_SELECTION_TOOL* sTool ) + []( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector, + PCB_SELECTION_TOOL* sTool ) { - // Iterate from the back so we don't have to worry about removals. - for( int i = aCollector.GetCount() - 1; i >= 0; --i ) - { - BOARD_ITEM* item = aCollector[i]; - - if( item->Type() == PCB_MARKER_T ) - aCollector.Remove( item ); - } + sTool->FilterCollectorForMarkers( aCollector ); + sTool->FilterCollectorForHierarchy( aCollector, true ); + sTool->FilterCollectorForFreePads( aCollector ); }, - m_frame->IsType( FRAME_PCB_EDITOR ) /* prompt user regarding locked items */ ); + m_frame->IsType( FRAME_PCB_EDITOR ) /* prompt user regarding locked items */ + ); - if( selection.Size() <= 1 ) + // Need at least 3 items to distribute - one at each end and at least on in the middle + if( selection.Size() < 3 ) return 0; BOARD_COMMIT commit( m_frame ); + wxString commitMsg; std::vector> itemsToDistribute = GetBoundingBoxes( selection ); - // find the last item by reverse sorting - std::sort( itemsToDistribute.begin(), itemsToDistribute.end(), - []( const std::pair& lhs, const std::pair& rhs ) - { - return ( lhs.second.GetRight() > rhs.second.GetRight() ); - } ); - - BOARD_ITEM* lastItem = itemsToDistribute.begin()->first; - const int maxRight = itemsToDistribute.begin()->second.GetRight(); - - // sort to get starting order - std::sort( itemsToDistribute.begin(), itemsToDistribute.end(), - []( const std::pair& lhs, const std::pair& rhs ) - { - return ( lhs.second.GetX() < rhs.second.GetX() ); - } ); - - const int minX = itemsToDistribute.begin()->second.GetX(); - int totalGap = maxRight - minX; - int totalWidth = 0; - - for( const auto& [ item, rect ] : itemsToDistribute ) - totalWidth += rect.GetWidth(); - - if( totalGap < totalWidth ) + if( aEvent.Matches( PCB_ACTIONS::distributeHorizontallyCenters.MakeEvent() ) ) { - // the width of the items exceeds the gap (overlapping items) -> use center point spacing - doDistributeCentersHorizontally( itemsToDistribute, commit ); + doDistributeCenters( true, itemsToDistribute, commit ); + commitMsg = PCB_ACTIONS::distributeHorizontallyCenters.GetFriendlyName(); + } + else if( aEvent.Matches( PCB_ACTIONS::distributeHorizontallyGaps.MakeEvent() ) ) + { + doDistributeGaps( true, itemsToDistribute, commit ); + commitMsg = PCB_ACTIONS::distributeHorizontallyGaps.GetFriendlyName(); + } + else if( aEvent.Matches( PCB_ACTIONS::distributeVerticallyCenters.MakeEvent() ) ) + { + doDistributeCenters( false, itemsToDistribute, commit ); + commitMsg = PCB_ACTIONS::distributeVerticallyCenters.GetFriendlyName(); } else { - totalGap -= totalWidth; - doDistributeGapsHorizontally( itemsToDistribute, commit, lastItem, totalGap ); + doDistributeGaps( false, itemsToDistribute, commit ); + commitMsg = PCB_ACTIONS::distributeVerticallyGaps.GetFriendlyName(); } - commit.Push( _( "Distribute Horizontally" ) ); + commit.Push( commitMsg ); return 0; } -void ALIGN_DISTRIBUTE_TOOL::doDistributeGapsHorizontally( std::vector>& aItems, - BOARD_COMMIT& aCommit, - const BOARD_ITEM* lastItem, - int totalGap ) const -{ - const int itemGap = totalGap / ( aItems.size() - 1 ); - int targetX = aItems.begin()->second.GetX(); - - for( const std::pair& i : aItems ) - { - BOARD_ITEM* item = i.first; - - // cover the corner case where the last item is wider than the previous item and gap - if( lastItem == item ) - continue; - - if( item->GetParent() && item->GetParent()->IsSelected() ) - continue; - - // Don't move a pad by itself unless editing the footprint - if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) ) - item = item->GetParent(); - - int difference = targetX - i.second.GetX(); - aCommit.Stage( item, CHT_MODIFY ); - item->Move( VECTOR2I( difference, 0 ) ); - targetX += ( i.second.GetWidth() + itemGap ); - } -} - - -void ALIGN_DISTRIBUTE_TOOL::doDistributeCentersHorizontally( std::vector> &aItems, - BOARD_COMMIT& aCommit ) const +void ALIGN_DISTRIBUTE_TOOL::doDistributeGaps( bool aIsXAxis, + std::vector>& aItems, + BOARD_COMMIT& aCommit ) const { + // Sort by start position. + // This is a simple way to get the items in a sensible order but it's not perfect. + // It will fail if, say, there's a huge items that's bigger than the total span of + // all the other items, but at that point a gap-equalising algorithm probably isn't + // well-defined anyway. std::sort( aItems.begin(), aItems.end(), - []( const std::pair& lhs, const std::pair& rhs ) - { - return ( lhs.second.Centre().x < rhs.second.Centre().x ); - } ); + [&]( const std::pair& a, const std::pair& b ) + { + return aIsXAxis ? a.second.GetLeft() < b.second.GetLeft() + : a.second.GetTop() < b.second.GetTop(); + } ); - const int totalGap = ( aItems.end()-1 )->second.Centre().x - aItems.begin()->second.Centre().x; - const int itemGap = totalGap / ( aItems.size() - 1 ); - int targetX = aItems.begin()->second.Centre().x; + // Consruct list of item spans in the relevant axis + std::vector> itemSpans; + itemSpans.reserve( aItems.size() ); - for( const std::pair& i : aItems ) + for( const auto& [item, box] : aItems ) { - BOARD_ITEM* item = i.first; - - if( item->GetParent() && item->GetParent()->IsSelected() ) - continue; - - // Don't move a pad by itself unless editing the footprint - if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) ) - item = item->GetParent(); - - int difference = targetX - i.second.Centre().x; - aCommit.Stage( item, CHT_MODIFY ); - item->Move( VECTOR2I( difference, 0 ) ); - targetX += ( itemGap ); - } -} - - -int ALIGN_DISTRIBUTE_TOOL::DistributeVertically( const TOOL_EVENT& aEvent ) -{ - PCB_SELECTION& selection = m_selectionTool->RequestSelection( - []( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector, PCB_SELECTION_TOOL* sTool ) - { - // Iterate from the back so we don't have to worry about removals. - for( int i = aCollector.GetCount() - 1; i >= 0; --i ) - { - BOARD_ITEM* item = aCollector[i]; - - if( item->Type() == PCB_MARKER_T ) - aCollector.Remove( item ); - } - }, - m_frame->IsType( FRAME_PCB_EDITOR ) /* prompt user regarding locked items */ ); - - if( selection.Size() <= 1 ) - return 0; - - BOARD_COMMIT commit( m_frame ); - std::vector> itemsToDistribute = GetBoundingBoxes( selection ); - - // find the last item by reverse sorting - std::sort( itemsToDistribute.begin(), itemsToDistribute.end(), - []( const std::pair& lhs, const std::pair& rhs ) - { - return ( lhs.second.GetBottom() > rhs.second.GetBottom() ); - } ); - - BOARD_ITEM* lastItem = itemsToDistribute.begin()->first; - const int maxBottom = itemsToDistribute.begin()->second.GetBottom(); - - // sort to get starting order - std::sort( itemsToDistribute.begin(), itemsToDistribute.end(), - []( const std::pair& lhs, const std::pair& rhs ) - { - return ( lhs.second.Centre().y < rhs.second.Centre().y ); - } ); - - int minY = itemsToDistribute.begin()->second.GetY(); - int totalGap = maxBottom - minY; - int totalHeight = 0; - - for( const std::pair& i : itemsToDistribute ) - totalHeight += i.second.GetHeight(); - - if( totalGap < totalHeight ) - { - // the width of the items exceeds the gap (overlapping items) -> use center point spacing - doDistributeCentersVertically( itemsToDistribute, commit ); - } - else - { - totalGap -= totalHeight; - doDistributeGapsVertically( itemsToDistribute, commit, lastItem, totalGap ); + const int start = aIsXAxis ? box.GetLeft() : box.GetTop(); + const int end = aIsXAxis ? box.GetRight() : box.GetBottom(); + itemSpans.emplace_back( start, end ); } - commit.Push( _( "Distribute Vertically" ) ); - return 0; -} + // Get the deltas needed to distribute the items evenly + const std::vector deltas = GetDeltasForDistributeByGaps( itemSpans ); - -void ALIGN_DISTRIBUTE_TOOL::doDistributeGapsVertically( std::vector>& aItems, - BOARD_COMMIT& aCommit, - const BOARD_ITEM* lastItem, - int totalGap ) const -{ - const int itemGap = totalGap / ( aItems.size() - 1 ); - int targetY = aItems.begin()->second.GetY(); - - for( std::pair& i : aItems ) + // Apply the deltas to the items + for( size_t i = 1; i < aItems.size() - 1; ++i ) { - BOARD_ITEM* item = i.first; + const auto& [item, box] = aItems[i]; + const int delta = deltas[i]; - // cover the corner case where the last item is wider than the previous item and gap - if( lastItem == item ) - continue; - - if( item->GetParent() && item->GetParent()->IsSelected() ) - continue; - - // Don't move a pad by itself unless editing the footprint - if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) ) - item = item->GetParent(); - - int difference = targetY - i.second.GetY(); - aCommit.Stage( item, CHT_MODIFY ); - item->Move( VECTOR2I( 0, difference ) ); - targetY += ( i.second.GetHeight() + itemGap ); - } -} - - -void ALIGN_DISTRIBUTE_TOOL::doDistributeCentersVertically( std::vector>& aItems, - BOARD_COMMIT& aCommit ) const -{ - std::sort( aItems.begin(), aItems.end(), - [] ( const std::pair& lhs, const std::pair& rhs) + if( delta != 0 ) { - return ( lhs.second.Centre().y < rhs.second.Centre().y ); - } ); + const VECTOR2I deltaVec = aIsXAxis ? VECTOR2I( delta, 0 ) : VECTOR2I( 0, delta ); - const int totalGap = ( aItems.end() - 1 )->second.Centre().y - - aItems.begin()->second.Centre().y; - const int itemGap = totalGap / ( aItems.size() - 1 ); - int targetY = aItems.begin()->second.Centre().y; + aCommit.Stage( item, CHT_MODIFY ); + item->Move( deltaVec ); + } + } +} - for( const std::pair& i : aItems ) + +void ALIGN_DISTRIBUTE_TOOL::doDistributeCenters( bool aIsXAxis, + std::vector>& aItems, + BOARD_COMMIT& aCommit ) const +{ + std::sort( + aItems.begin(), aItems.end(), + [&]( const std::pair& lhs, const std::pair& rhs ) + { + const int lhsPos = aIsXAxis ? lhs.second.Centre().x : lhs.second.Centre().y; + const int rhsPos = aIsXAxis ? rhs.second.Centre().x : rhs.second.Centre().y; + return lhsPos < rhsPos; + } ); + + std::vector itemCenters; + itemCenters.reserve( aItems.size() ); + + for( const auto& [item, box] : aItems ) { - BOARD_ITEM* item = i.first; + itemCenters.push_back( aIsXAxis ? box.Centre().x : box.Centre().y ); + } - if( item->GetParent() && item->GetParent()->IsSelected() ) - continue; + const std::vector deltas = GetDeltasForDistributeByPoints( itemCenters ); - // Don't move a pad by itself unless editing the footprint - if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) ) - item = item->GetParent(); + // Apply the deltas to the items + for( size_t i = 1; i < aItems.size() - 1; ++i ) + { + const auto& [item, box] = aItems[i]; + const int delta = deltas[i]; - int difference = targetY - i.second.Centre().y; - aCommit.Stage( item, CHT_MODIFY ); - item->Move( VECTOR2I( 0, difference ) ); - targetY += ( itemGap ); + if ( delta != 0) + { + const VECTOR2I deltaVec = aIsXAxis ? VECTOR2I( delta, 0 ) : VECTOR2I( 0, delta ); + + aCommit.Stage( item, CHT_MODIFY ); + item->Move( deltaVec ); + } } } @@ -736,8 +622,12 @@ void ALIGN_DISTRIBUTE_TOOL::setTransitions() Go( &ALIGN_DISTRIBUTE_TOOL::AlignCenterX, PCB_ACTIONS::alignCenterX.MakeEvent() ); Go( &ALIGN_DISTRIBUTE_TOOL::AlignCenterY, PCB_ACTIONS::alignCenterY.MakeEvent() ); - Go( &ALIGN_DISTRIBUTE_TOOL::DistributeHorizontally, - PCB_ACTIONS::distributeHorizontally.MakeEvent() ); - Go( &ALIGN_DISTRIBUTE_TOOL::DistributeVertically, - PCB_ACTIONS::distributeVertically.MakeEvent() ); + Go( &ALIGN_DISTRIBUTE_TOOL::DistributeItems, + PCB_ACTIONS::distributeHorizontallyCenters.MakeEvent() ); + Go( &ALIGN_DISTRIBUTE_TOOL::DistributeItems, + PCB_ACTIONS::distributeHorizontallyGaps.MakeEvent() ); + Go( &ALIGN_DISTRIBUTE_TOOL::DistributeItems, + PCB_ACTIONS::distributeVerticallyCenters.MakeEvent() ); + Go( &ALIGN_DISTRIBUTE_TOOL::DistributeItems, + PCB_ACTIONS::distributeVerticallyGaps.MakeEvent() ); } diff --git a/pcbnew/tools/placement_tool.h b/pcbnew/tools/placement_tool.h index 7a26ab3a9b..9b93762f5d 100644 --- a/pcbnew/tools/placement_tool.h +++ b/pcbnew/tools/placement_tool.h @@ -85,14 +85,9 @@ public: int AlignCenterY( const TOOL_EVENT& aEvent ); /** - * Distribute the selected items along the X axis. + * Distribute the selected items in some way */ - int DistributeHorizontally( const TOOL_EVENT& aEvent ); - - /** - * Distribute the selected items along the Y axis. - */ - int DistributeVertically( const TOOL_EVENT& aEvent ); + int DistributeItems( const TOOL_EVENT& aEvent ); ///< Set up handlers for various events. void setTransitions() override; @@ -129,17 +124,6 @@ private: */ int doAlignRight(); - /** - * Distribute selected items using an even spacing between the centers of their bounding - * boxes. - * - * @note Using the centers of bounding box of items can give unsatisfactory visual results - * since items of differing widths will be placed with different gaps. Is only used if - * items overlap. - */ - void doDistributeCentersHorizontally( std::vector>& aItems, - BOARD_COMMIT& aCommit ) const; - /** * Distribute selected items using an even spacing between the centers of their bounding * boxes. @@ -148,28 +132,18 @@ private: * since items of differing widths will be placed with different gaps. Is only used * if items overlap */ - void doDistributeCentersVertically( std::vector>& aItems, - BOARD_COMMIT& aCommit ) const; + void doDistributeCenters( bool aIsXAxis, std::vector>& aItems, + BOARD_COMMIT& aCommit ) const; /** - * Distributes selected items using an even spacing between their bounding boxes + * Distributes selected items using an even spacing between their bounding boxe + * in the x or y axis. * - * @note Using the edges of bounding box of items is only possible if there is enough space - * between them. If this is not the case, use the center spacing method + * @note If the total item widths exceed the available space, the overlaps will be + * distributed evenly. */ - void doDistributeGapsHorizontally( std::vector>& aItems, - BOARD_COMMIT& aCommit, const BOARD_ITEM* lastItem, - int totalGap ) const; - - /** - * Distributes selected items using an even spacing between their bounding boxes - * - * @note Using the edges of bounding box of items is only possible if there is enough space - * between them. If this is not the case, use the center spacing method - */ - void doDistributeGapsVertically( std::vector>& aItems, - BOARD_COMMIT& aCommit, const BOARD_ITEM* lastItem, - int totalGap ) const; + void doDistributeGaps( bool aIsXAxis, std::vector>& aItems, + BOARD_COMMIT& aCommit ) const; private: PCB_SELECTION_TOOL* m_selectionTool; diff --git a/qa/tests/libs/kimath/CMakeLists.txt b/qa/tests/libs/kimath/CMakeLists.txt index 8b5f39c113..713ec4ae6f 100644 --- a/qa/tests/libs/kimath/CMakeLists.txt +++ b/qa/tests/libs/kimath/CMakeLists.txt @@ -28,6 +28,7 @@ set( QA_KIMATH_SRCS test_kimath.cpp geometry/test_chamfer.cpp + geometry/test_distribute.cpp geometry/test_eda_angle.cpp geometry/test_ellipse_to_bezier.cpp geometry/test_fillet.cpp diff --git a/qa/tests/libs/kimath/geometry/test_distribute.cpp b/qa/tests/libs/kimath/geometry/test_distribute.cpp new file mode 100644 index 0000000000..7a7b37b7a3 --- /dev/null +++ b/qa/tests/libs/kimath/geometry/test_distribute.cpp @@ -0,0 +1,169 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2018-2023 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 + */ + +#include + +#include + +#include "geom_test_utils.h" + +struct DistributeFixture +{ +}; + +/** + * Declares the FilletFixture struct as the boost test fixture. + */ +BOOST_FIXTURE_TEST_SUITE( Distribute, DistributeFixture ) + +struct DISTRIBUTE_GAPS_TEST_CASE +{ + std::vector> m_extents; + std::vector m_expectedDeltas; +}; + +static void DoDistributeGapsTestChecks( const DISTRIBUTE_GAPS_TEST_CASE& aTestCase ) +{ + // Actally do the chamfer + const std::vector deltas = GetDeltasForDistributeByGaps( aTestCase.m_extents ); + + BOOST_REQUIRE_EQUAL( deltas.size(), aTestCase.m_expectedDeltas.size() ); + + // First and last items should not be moved + BOOST_CHECK_EQUAL( deltas.front(), 0 ); + BOOST_CHECK_EQUAL( deltas.back(), 0 ); + + for( size_t i = 0; i < deltas.size(); ++i ) + { + BOOST_CHECK_EQUAL( deltas[i], aTestCase.m_expectedDeltas[i] ); + } +} + +BOOST_AUTO_TEST_CASE( DistributeGapsNoChangeNeeded ) +{ + const DISTRIBUTE_GAPS_TEST_CASE testcase{ + { + // Already evenly spaced (100 gaps) + { 0, 100 }, + { 200, 300 }, + { 400, 500 }, + }, + { 0, 0, 0 }, + }; + + DoDistributeGapsTestChecks( testcase ); +} + +BOOST_AUTO_TEST_CASE( DistributeGapsSimpleShiftNeeded ) +{ + const DISTRIBUTE_GAPS_TEST_CASE testcase{ + { + // Need to move item 1 51 to the right + { 0, 100 }, + { 149, 249 }, + { 400, 500 }, + }, + { 0, 51, 0 }, + }; + + DoDistributeGapsTestChecks( testcase ); +} + +BOOST_AUTO_TEST_CASE( DistributeGapsRounding ) +{ + const DISTRIBUTE_GAPS_TEST_CASE testcase{ + { + // Have to fit 3 gaps into total sum of gaps of 100 + // so 33.333333 per gap + // (note one rounds up, the other down) + { -100, 0 }, + { 0, 100 }, // Move this to 33 .. 133 + { 0, 100 }, // Move this to 167 .. 267 + { 300, 400 }, + }, + { 0, 33, 167, 0 }, + }; + + DoDistributeGapsTestChecks( testcase ); +} + + +struct DISTRIBUTE_POINTS_TEST_CASE +{ + std::vector m_points; + std::vector m_expectedDeltas; +}; + +static void DoDistributePointsTestChecks( const DISTRIBUTE_POINTS_TEST_CASE& aTestCase ) +{ + // Actally do the chamfer + const std::vector deltas = GetDeltasForDistributeByPoints( aTestCase.m_points ); + + BOOST_REQUIRE_EQUAL( deltas.size(), aTestCase.m_expectedDeltas.size() ); + + // First and last items should not be moved + BOOST_CHECK_EQUAL( deltas.front(), 0 ); + BOOST_CHECK_EQUAL( deltas.back(), 0 ); + + for( size_t i = 0; i < deltas.size(); ++i ) + { + BOOST_CHECK_EQUAL( deltas[i], aTestCase.m_expectedDeltas[i] ); + } +} + +BOOST_AUTO_TEST_CASE( DistributePointsNoChangeNeeded ) +{ + const DISTRIBUTE_POINTS_TEST_CASE testcase{ + // Already evenly spaced (100 gaps) + { 0, 100, 200, 300, 400 }, + { 0, 0, 0, 0, 0 }, + }; + + DoDistributePointsTestChecks( testcase ); +} + +BOOST_AUTO_TEST_CASE( DistributePointsSimpleShiftNeeded ) +{ + const DISTRIBUTE_POINTS_TEST_CASE testcase{ + // Need to move item 1 51 to the right + { 0, 49, 200 }, + { 0, 51, 0 }, + }; + + DoDistributePointsTestChecks( testcase ); +} + +BOOST_AUTO_TEST_CASE( DistributePointsRounding ) +{ + const DISTRIBUTE_POINTS_TEST_CASE testcase{ + // Have to fit 3 gaps into total sum of gaps of 100 + // so 33.333333 per gap + // (note one rounds up, the other down) + { 0, 0, 0, 100 }, + { 0, 33, 67, 0 }, + }; + + DoDistributePointsTestChecks( testcase ); +} + +BOOST_AUTO_TEST_SUITE_END() diff --git a/resources/bitmaps_png/CMakeLists.txt b/resources/bitmaps_png/CMakeLists.txt index 81b28f5314..b2de647797 100644 --- a/resources/bitmaps_png/CMakeLists.txt +++ b/resources/bitmaps_png/CMakeLists.txt @@ -247,8 +247,10 @@ set( BMAPS_MID directory directory_browser directory_open - distribute_horizontal - distribute_vertical + distribute_horizontal_centers + distribute_horizontal_gaps + distribute_vertical_centers + distribute_vertical_gaps down drag drag_segment diff --git a/resources/bitmaps_png/png/distribute_horizontal_16.png b/resources/bitmaps_png/png/distribute_horizontal_16.png deleted file mode 100644 index f9eda22c09..0000000000 Binary files a/resources/bitmaps_png/png/distribute_horizontal_16.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_24.png b/resources/bitmaps_png/png/distribute_horizontal_24.png deleted file mode 100644 index b6521a18a2..0000000000 Binary files a/resources/bitmaps_png/png/distribute_horizontal_24.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_32.png b/resources/bitmaps_png/png/distribute_horizontal_32.png deleted file mode 100644 index d8edcee299..0000000000 Binary files a/resources/bitmaps_png/png/distribute_horizontal_32.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_48.png b/resources/bitmaps_png/png/distribute_horizontal_48.png deleted file mode 100644 index 6e0920883a..0000000000 Binary files a/resources/bitmaps_png/png/distribute_horizontal_48.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_64.png b/resources/bitmaps_png/png/distribute_horizontal_64.png deleted file mode 100644 index 436aefaf2b..0000000000 Binary files a/resources/bitmaps_png/png/distribute_horizontal_64.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_centers_16.png b/resources/bitmaps_png/png/distribute_horizontal_centers_16.png new file mode 100644 index 0000000000..eb22aaa559 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_centers_16.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_centers_24.png b/resources/bitmaps_png/png/distribute_horizontal_centers_24.png new file mode 100644 index 0000000000..0a98921094 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_centers_24.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_centers_32.png b/resources/bitmaps_png/png/distribute_horizontal_centers_32.png new file mode 100644 index 0000000000..9627945267 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_centers_32.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_centers_48.png b/resources/bitmaps_png/png/distribute_horizontal_centers_48.png new file mode 100644 index 0000000000..f637d49c7e Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_centers_48.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_centers_64.png b/resources/bitmaps_png/png/distribute_horizontal_centers_64.png new file mode 100644 index 0000000000..010c9afbcb Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_centers_64.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_centers_dark_16.png b/resources/bitmaps_png/png/distribute_horizontal_centers_dark_16.png new file mode 100644 index 0000000000..4cb7522f20 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_centers_dark_16.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_centers_dark_24.png b/resources/bitmaps_png/png/distribute_horizontal_centers_dark_24.png new file mode 100644 index 0000000000..4286858fdb Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_centers_dark_24.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_centers_dark_32.png b/resources/bitmaps_png/png/distribute_horizontal_centers_dark_32.png new file mode 100644 index 0000000000..1d7bc12e46 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_centers_dark_32.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_centers_dark_48.png b/resources/bitmaps_png/png/distribute_horizontal_centers_dark_48.png new file mode 100644 index 0000000000..c4ef7943c0 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_centers_dark_48.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_centers_dark_64.png b/resources/bitmaps_png/png/distribute_horizontal_centers_dark_64.png new file mode 100644 index 0000000000..dce90a4b9d Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_centers_dark_64.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_dark_16.png b/resources/bitmaps_png/png/distribute_horizontal_dark_16.png deleted file mode 100644 index 42f9b9310e..0000000000 Binary files a/resources/bitmaps_png/png/distribute_horizontal_dark_16.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_dark_24.png b/resources/bitmaps_png/png/distribute_horizontal_dark_24.png deleted file mode 100644 index 7825f5281a..0000000000 Binary files a/resources/bitmaps_png/png/distribute_horizontal_dark_24.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_dark_32.png b/resources/bitmaps_png/png/distribute_horizontal_dark_32.png deleted file mode 100644 index 0a5220c804..0000000000 Binary files a/resources/bitmaps_png/png/distribute_horizontal_dark_32.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_dark_48.png b/resources/bitmaps_png/png/distribute_horizontal_dark_48.png deleted file mode 100644 index f44f5d41b5..0000000000 Binary files a/resources/bitmaps_png/png/distribute_horizontal_dark_48.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_dark_64.png b/resources/bitmaps_png/png/distribute_horizontal_dark_64.png deleted file mode 100644 index cdc3677c5d..0000000000 Binary files a/resources/bitmaps_png/png/distribute_horizontal_dark_64.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_gaps_16.png b/resources/bitmaps_png/png/distribute_horizontal_gaps_16.png new file mode 100644 index 0000000000..3513e99bc4 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_gaps_16.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_gaps_24.png b/resources/bitmaps_png/png/distribute_horizontal_gaps_24.png new file mode 100644 index 0000000000..08f30253d1 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_gaps_24.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_gaps_32.png b/resources/bitmaps_png/png/distribute_horizontal_gaps_32.png new file mode 100644 index 0000000000..4fbd6162fb Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_gaps_32.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_gaps_48.png b/resources/bitmaps_png/png/distribute_horizontal_gaps_48.png new file mode 100644 index 0000000000..41bbc02459 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_gaps_48.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_gaps_64.png b/resources/bitmaps_png/png/distribute_horizontal_gaps_64.png new file mode 100644 index 0000000000..21987a7012 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_gaps_64.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_16.png b/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_16.png new file mode 100644 index 0000000000..a5f6bf4dbb Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_16.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_24.png b/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_24.png new file mode 100644 index 0000000000..a3afd8d770 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_24.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_32.png b/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_32.png new file mode 100644 index 0000000000..6e3e3609bb Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_32.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_48.png b/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_48.png new file mode 100644 index 0000000000..27b0166a4c Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_48.png differ diff --git a/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_64.png b/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_64.png new file mode 100644 index 0000000000..80cac6fc92 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_horizontal_gaps_dark_64.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_16.png b/resources/bitmaps_png/png/distribute_vertical_16.png deleted file mode 100644 index 2da43531d7..0000000000 Binary files a/resources/bitmaps_png/png/distribute_vertical_16.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_vertical_24.png b/resources/bitmaps_png/png/distribute_vertical_24.png deleted file mode 100644 index fe981e4f11..0000000000 Binary files a/resources/bitmaps_png/png/distribute_vertical_24.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_vertical_32.png b/resources/bitmaps_png/png/distribute_vertical_32.png deleted file mode 100644 index dbfc6c9c0e..0000000000 Binary files a/resources/bitmaps_png/png/distribute_vertical_32.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_vertical_48.png b/resources/bitmaps_png/png/distribute_vertical_48.png deleted file mode 100644 index 611272e7e9..0000000000 Binary files a/resources/bitmaps_png/png/distribute_vertical_48.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_vertical_64.png b/resources/bitmaps_png/png/distribute_vertical_64.png deleted file mode 100644 index 147f682cb3..0000000000 Binary files a/resources/bitmaps_png/png/distribute_vertical_64.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_vertical_centers_16.png b/resources/bitmaps_png/png/distribute_vertical_centers_16.png new file mode 100644 index 0000000000..18f854f06c Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_centers_16.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_centers_24.png b/resources/bitmaps_png/png/distribute_vertical_centers_24.png new file mode 100644 index 0000000000..26d8672da1 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_centers_24.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_centers_32.png b/resources/bitmaps_png/png/distribute_vertical_centers_32.png new file mode 100644 index 0000000000..cd7b901555 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_centers_32.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_centers_48.png b/resources/bitmaps_png/png/distribute_vertical_centers_48.png new file mode 100644 index 0000000000..8f30689a04 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_centers_48.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_centers_64.png b/resources/bitmaps_png/png/distribute_vertical_centers_64.png new file mode 100644 index 0000000000..8d2d4d1b39 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_centers_64.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_centers_dark_16.png b/resources/bitmaps_png/png/distribute_vertical_centers_dark_16.png new file mode 100644 index 0000000000..dc10fe5b4d Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_centers_dark_16.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_centers_dark_24.png b/resources/bitmaps_png/png/distribute_vertical_centers_dark_24.png new file mode 100644 index 0000000000..d237b9aa9e Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_centers_dark_24.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_centers_dark_32.png b/resources/bitmaps_png/png/distribute_vertical_centers_dark_32.png new file mode 100644 index 0000000000..6d510c9baa Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_centers_dark_32.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_centers_dark_48.png b/resources/bitmaps_png/png/distribute_vertical_centers_dark_48.png new file mode 100644 index 0000000000..293e924206 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_centers_dark_48.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_centers_dark_64.png b/resources/bitmaps_png/png/distribute_vertical_centers_dark_64.png new file mode 100644 index 0000000000..bedf3edcae Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_centers_dark_64.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_dark_16.png b/resources/bitmaps_png/png/distribute_vertical_dark_16.png deleted file mode 100644 index 263d831bbd..0000000000 Binary files a/resources/bitmaps_png/png/distribute_vertical_dark_16.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_vertical_dark_24.png b/resources/bitmaps_png/png/distribute_vertical_dark_24.png deleted file mode 100644 index 6e8bd36894..0000000000 Binary files a/resources/bitmaps_png/png/distribute_vertical_dark_24.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_vertical_dark_32.png b/resources/bitmaps_png/png/distribute_vertical_dark_32.png deleted file mode 100644 index 5dde2851cd..0000000000 Binary files a/resources/bitmaps_png/png/distribute_vertical_dark_32.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_vertical_dark_48.png b/resources/bitmaps_png/png/distribute_vertical_dark_48.png deleted file mode 100644 index 38cc2a02df..0000000000 Binary files a/resources/bitmaps_png/png/distribute_vertical_dark_48.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_vertical_dark_64.png b/resources/bitmaps_png/png/distribute_vertical_dark_64.png deleted file mode 100644 index a02877f6e6..0000000000 Binary files a/resources/bitmaps_png/png/distribute_vertical_dark_64.png and /dev/null differ diff --git a/resources/bitmaps_png/png/distribute_vertical_gaps_16.png b/resources/bitmaps_png/png/distribute_vertical_gaps_16.png new file mode 100644 index 0000000000..5461a77da6 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_gaps_16.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_gaps_24.png b/resources/bitmaps_png/png/distribute_vertical_gaps_24.png new file mode 100644 index 0000000000..c26e05c82a Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_gaps_24.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_gaps_32.png b/resources/bitmaps_png/png/distribute_vertical_gaps_32.png new file mode 100644 index 0000000000..486c287402 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_gaps_32.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_gaps_48.png b/resources/bitmaps_png/png/distribute_vertical_gaps_48.png new file mode 100644 index 0000000000..c659b85eee Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_gaps_48.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_gaps_64.png b/resources/bitmaps_png/png/distribute_vertical_gaps_64.png new file mode 100644 index 0000000000..52de91ad0e Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_gaps_64.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_gaps_dark_16.png b/resources/bitmaps_png/png/distribute_vertical_gaps_dark_16.png new file mode 100644 index 0000000000..e267bd8688 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_gaps_dark_16.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_gaps_dark_24.png b/resources/bitmaps_png/png/distribute_vertical_gaps_dark_24.png new file mode 100644 index 0000000000..ff75a400f6 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_gaps_dark_24.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_gaps_dark_32.png b/resources/bitmaps_png/png/distribute_vertical_gaps_dark_32.png new file mode 100644 index 0000000000..5b2c13a2de Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_gaps_dark_32.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_gaps_dark_48.png b/resources/bitmaps_png/png/distribute_vertical_gaps_dark_48.png new file mode 100644 index 0000000000..a738c947d5 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_gaps_dark_48.png differ diff --git a/resources/bitmaps_png/png/distribute_vertical_gaps_dark_64.png b/resources/bitmaps_png/png/distribute_vertical_gaps_dark_64.png new file mode 100644 index 0000000000..9e5d1dba31 Binary files /dev/null and b/resources/bitmaps_png/png/distribute_vertical_gaps_dark_64.png differ diff --git a/resources/bitmaps_png/sources/dark/distribute_horizontal.svg b/resources/bitmaps_png/sources/dark/distribute_horizontal_centers.svg similarity index 85% rename from resources/bitmaps_png/sources/dark/distribute_horizontal.svg rename to resources/bitmaps_png/sources/dark/distribute_horizontal_centers.svg index 7da948dfd0..716a374cb7 100644 --- a/resources/bitmaps_png/sources/dark/distribute_horizontal.svg +++ b/resources/bitmaps_png/sources/dark/distribute_horizontal_centers.svg @@ -1,18 +1,18 @@ + sodipodi:docname="distribute_horizontal_centers.svg" + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + inkscape:current-layer="Слой_1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1"> + empspacing="2" + originx="0" + originy="0" + units="px" + visible="true" /> - image/svg+xml - add_arc + distribute_horizontal_centers + @@ -78,7 +85,7 @@ id="style116572">.cls-1,.cls-3{fill:none;stroke-linecap:round;stroke-linejoin:round;}.cls-1{stroke:#42B8EB;stroke-width:1.0035px;}.cls-2{fill:#8f8f8f;}.cls-3{stroke:#DED3DD;}.cls-4{fill:#DED3DD;} distribute_horizontal + id="title116576">distribute_horizontal_centers + + + + + + + + image/svg+xml + + distribute_horizontal_gaps + + + + + + + + + + + + + + + + distribute_horizontal_gaps + + + + + + + + + + diff --git a/resources/bitmaps_png/sources/dark/distribute_vertical.svg b/resources/bitmaps_png/sources/dark/distribute_vertical_centers.svg similarity index 85% rename from resources/bitmaps_png/sources/dark/distribute_vertical.svg rename to resources/bitmaps_png/sources/dark/distribute_vertical_centers.svg index eead78aed9..103ab09be5 100644 --- a/resources/bitmaps_png/sources/dark/distribute_vertical.svg +++ b/resources/bitmaps_png/sources/dark/distribute_vertical_centers.svg @@ -1,18 +1,18 @@ + sodipodi:docname="distribute_vertical_centers.svg" + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + inkscape:current-layer="Слой_1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1"> + empspacing="2" + originx="0" + originy="0" + units="px" + visible="true" /> - image/svg+xml - distribute_horizontal + distribute_vertical_centers + @@ -78,7 +85,7 @@ id="style116572">.cls-1,.cls-3{fill:none;stroke-linecap:round;stroke-linejoin:round;}.cls-1{stroke:#42B8EB;stroke-width:1.0035px;}.cls-2{fill:#8f8f8f;}.cls-3{stroke:#DED3DD;}.cls-4{fill:#DED3DD;} distribute_horizontal + id="title116576">distribute_vertical_centers + + + + + + + + image/svg+xml + + distribute_vertical_gaps + + + + + + + + + + + + + + + + distribute_vertical_gaps + + + + + + + + + + diff --git a/resources/bitmaps_png/sources/light/distribute_horizontal.svg b/resources/bitmaps_png/sources/light/distribute_horizontal_centers.svg similarity index 85% rename from resources/bitmaps_png/sources/light/distribute_horizontal.svg rename to resources/bitmaps_png/sources/light/distribute_horizontal_centers.svg index 4a846b2d92..17e4ccf5c4 100644 --- a/resources/bitmaps_png/sources/light/distribute_horizontal.svg +++ b/resources/bitmaps_png/sources/light/distribute_horizontal_centers.svg @@ -1,18 +1,18 @@ + sodipodi:docname="distribute_horizontal_centers.svg" + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + inkscape:current-layer="Слой_1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1"> + empspacing="2" + originx="0" + originy="0" + units="px" + visible="true" /> - image/svg+xml - add_arc + distribute_horizontal_centers + @@ -78,7 +85,7 @@ id="style116572">.cls-1,.cls-3{fill:none;stroke-linecap:round;stroke-linejoin:round;}.cls-1{stroke:#1a81c4;stroke-width:1.0035px;}.cls-2{fill:#b9b9b9;}.cls-3{stroke:#545454;}.cls-4{fill:#545454;} distribute_horizontal + id="title116576">distribute_horizontal_centers + + + + + + + + image/svg+xml + + distribute_horizontal_gaps + + + + + + + + + + + + + + + + distribute_horizontal_gaps + + + + + + + + + + diff --git a/resources/bitmaps_png/sources/light/distribute_vertical.svg b/resources/bitmaps_png/sources/light/distribute_vertical_centers.svg similarity index 85% rename from resources/bitmaps_png/sources/light/distribute_vertical.svg rename to resources/bitmaps_png/sources/light/distribute_vertical_centers.svg index ef1b62f2db..3fe18c571f 100644 --- a/resources/bitmaps_png/sources/light/distribute_vertical.svg +++ b/resources/bitmaps_png/sources/light/distribute_vertical_centers.svg @@ -1,18 +1,18 @@ + sodipodi:docname="distribute_vertical_centers.svg" + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + inkscape:current-layer="Слой_1" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1"> + empspacing="2" + originx="0" + originy="0" + units="px" + visible="true" /> - image/svg+xml - distribute_horizontal + distribute_vertical_centers + @@ -78,7 +85,7 @@ id="style116572">.cls-1,.cls-3{fill:none;stroke-linecap:round;stroke-linejoin:round;}.cls-1{stroke:#1a81c4;stroke-width:1.0035px;}.cls-2{fill:#b9b9b9;}.cls-3{stroke:#545454;}.cls-4{fill:#545454;} distribute_horizontal + id="title116576">distribute_vertical_centers + + + + + + + + image/svg+xml + + distribute_vertical_gaps + + + + + + + + + + + + + + + + distribute_vertical_gaps + + + + + + + + + +