Compare commits

..

1 Commits

Author SHA1 Message Date
Jeff Young 68f7a820b5 Flip symbol editor's Y axis to match other editors. 2024-04-22 13:47:48 +01:00
1651 changed files with 319738 additions and 382971 deletions
+2
View File
@@ -17,6 +17,8 @@ include/fp_lib_table_lexer.h
include/lib_table_lexer.h
include/netlist_lexer.h
include/page_layout_reader_lexer.h
eeschema/cmp_library_lexer.h
eeschema/cmp_library_keywords.*
eeschema/dialogs/dialog_bom_cfg_keywords.cpp
eeschema/dialogs/dialog_bom_cfg_lexer.h
common/template_fieldnames_keywords.cpp
+1 -1
View File
@@ -6,7 +6,7 @@ build_doxygen_docker:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB_NAME == "doxygen"
tags:
- gitlab-org-docker
- docker
before_script:
- docker info
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
+19 -1
View File
@@ -15,7 +15,25 @@ macos_build:
- cd build/macos
- cmake
-G Ninja
-DCMAKE_TOOLCHAIN_FILE=/Users/ci/kicad-mac-builder/toolchain/kicad-mac-builder.cmake
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DDEFAULT_INSTALL_PATH=/Library/Application\ Support /kicad
-DOCC_INCLUDE_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/include/opencascade
-DOCC_LIBRARY_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/Lib
-DCMAKE_INSTALL_PREFIX=/Users/ci/kicad-mac-builder/build/kicad-dest
-DCMAKE_C_COMPILER=/usr/bin/clang
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
-DwxWidgets_CONFIG_EXECUTABLE=/Users/ci/kicad-mac-builder/build/wxwidgets-dest/bin/wx-config
-DKICAD_BUILD_I18N=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON
-DPYTHON_EXECUTABLE=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/bin/python3
-DPYTHON_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/include/python3.9/
-DPYTHON_LIBRARY=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/libpython3.9.dylib
-DPYTHON_SITE_PACKAGE_PATH=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/python3.9/site-packages
-DPYTHON_FRAMEWORK=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework
-DNGSPICE_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/ngspice-dest/include
-DNGSPICE_LIBRARY=/Users/ci/kicad-mac-builder/build/ngspice-dest/lib/libngspice.dylib
-DKICAD_USE_3DCONNEXION=ON
../../
- cmake --build . 2>&1 | tee compilation_log.txt
- cd ../../
+1 -1
View File
@@ -18,7 +18,7 @@
stage: test
when: on_success
variables:
BOOST_TEST_LOGGER: 'JUNIT,warning,test_results.${TEST}.xml:HRF,message'
BOOST_TEST_LOGGER: 'JUNIT,warning,test_results.${TEST}.xml:HRF,warning'
CTEST_OUTPUT_ON_FAILURE: 1
script:
- cd build/linux/qa
+3 -3
View File
@@ -236,7 +236,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
char const* cp = pp->GetFileFilter( i );
if( cp )
addFilterString( cp );
addFilterString( wxString::FromUTF8Unchecked( cp ) );
}
addExtensionMap( pp );
@@ -328,7 +328,7 @@ void S3D_PLUGIN_MANAGER::checkPluginName( const wxString& aPath,
++bl;
}
// prevent loading non-plugin dlls
// prevent loading non-plugin dlls
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
{
if( !path.GetName().StartsWith( "s3d_plugin" )
@@ -416,7 +416,7 @@ void S3D_PLUGIN_MANAGER::addExtensionMap( KICAD_PLUGIN_LDR_3D* aPlugin )
wxString ws;
if( cp )
ws = wxString( cp );
ws = wxString::FromUTF8Unchecked( cp );
if( !ws.empty() )
{
+1 -1
View File
@@ -476,7 +476,7 @@ SGVECTOR S3D::CalcTriNorm( const SGPOINT& p1, const SGPOINT& p2, const SGPOINT&
// normal
tri = glm::cross( pts[1] - pts[0], pts[2] - pts[0] );
(void)glm::normalize( tri );
glm::normalize( tri );
return SGVECTOR( tri.x, tri.y, tri.z );
}
+1 -7
View File
@@ -344,7 +344,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
BOX2I bbbox;
if( m_board )
bbbox = m_board->ComputeBoundingBox( !m_board->IsFootprintHolder() && haveOutline, false );
bbbox = m_board->ComputeBoundingBox( !m_board->IsFootprintHolder() && haveOutline );
// Gives a non null size to avoid issues in zoom / scale calculations
if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
@@ -698,10 +698,6 @@ std::map<int, COLOR4D> BOARD_ADAPTER::GetLayerColors() const
}
colors[ LAYER_3D_COPPER_BOTTOM ] = colors[ LAYER_3D_COPPER_TOP ];
for( const auto& [layer, val] : m_ColorOverrides )
colors[layer] = val;
return colors;
}
@@ -712,8 +708,6 @@ void BOARD_ADAPTER::SetLayerColors( const std::map<int, COLOR4D>& aColors )
for( const auto& [ layer, color ] : aColors )
settings->SetColor( layer, color );
Pgm().GetSettingsManager().SaveColorSettings( settings, "3d_viewer" );
}
-2
View File
@@ -430,8 +430,6 @@ public:
SFVEC4F m_ECO1Color;
SFVEC4F m_ECO2Color;
std::map<int, COLOR4D> m_ColorOverrides; ///< allows to override color scheme colors
private:
BOARD* m_board;
S3D_CACHE* m_3dModelManager;
@@ -34,7 +34,6 @@
#include "../3d_rendering/raytracing/shapes2D/round_segment_2d.h"
#include "../3d_rendering/raytracing/shapes2D/triangle_2d.h"
#include <board_adapter.h>
#include <board.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_text.h>
+4 -7
View File
@@ -36,7 +36,6 @@
#include "../3d_rendering/raytracing/shapes2D/filled_circle_2d.h"
#include "raytracing/shapes2D/triangle_2d.h"
#include <board_design_settings.h>
#include <board.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_text.h>
@@ -875,15 +874,14 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
}
// Add via tech layers
if( ( layer == F_Mask || layer == B_Mask ) )
if( ( layer == F_Mask || layer == B_Mask ) && !m_board->GetTentVias() )
{
int maskExpansion = GetBoard()->GetDesignSettings().m_SolderMaskExpansion;
for( PCB_TRACK* track : m_board->Tracks() )
{
if( track->Type() == PCB_VIA_T
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer )
&& !static_cast<const PCB_VIA*>( track )->IsTented( layer ) )
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer ) )
{
createViaWithMargin( track, layerContainer, maskExpansion );
}
@@ -967,15 +965,14 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
}
// NON-TENTED VIAS
if( ( layer == F_Mask || layer == B_Mask ) )
if( ( layer == F_Mask || layer == B_Mask ) && !m_board->GetTentVias() )
{
int maskExpansion = GetBoard()->GetDesignSettings().m_SolderMaskExpansion;
for( PCB_TRACK* track : m_board->Tracks() )
{
if( track->Type() == PCB_VIA_T
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer )
&& !static_cast<const PCB_VIA*>( track )->IsTented( layer ) )
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer ) )
{
track->TransformShapeToPolygon( *layerPoly, layer, maskExpansion, maxError,
ERROR_INSIDE );
-82
View File
@@ -33,7 +33,6 @@
#include <3d_rendering/opengl/render_3d_opengl.h>
#include <3d_viewer_id.h>
#include <advanced_config.h>
#include <build_version.h>
#include <board.h>
#include <reporter.h>
#include <gal/opengl/gl_context_mgr.h>
@@ -73,11 +72,6 @@ BEGIN_EVENT_TABLE( EDA_3D_CANVAS, HIDPI_GL_3D_CANVAS )
EVT_MOTION( EDA_3D_CANVAS::OnMouseMove )
EVT_MAGNIFY( EDA_3D_CANVAS::OnMagnify )
// touch gesture events
EVT_GESTURE_ZOOM( wxID_ANY, EDA_3D_CANVAS::OnZoomGesture )
EVT_GESTURE_PAN( wxID_ANY, EDA_3D_CANVAS::OnPanGesture )
EVT_GESTURE_ROTATE( wxID_ANY, EDA_3D_CANVAS::OnRotateGesture )
// other events
EVT_ERASE_BACKGROUND( EDA_3D_CANVAS::OnEraseBackground )
EVT_CUSTOM(wxEVT_REFRESH_CUSTOM_COMMAND, ID_CUSTOM_EVENT_1, EDA_3D_CANVAS::OnRefreshRequest )
@@ -149,10 +143,6 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const wxGLAttributes& aGLAttrib
wxASSERT( a3DCachePointer != nullptr );
m_boardAdapter.Set3dCacheManager( a3DCachePointer );
#ifdef __WXMSW__
EnableTouchEvents( wxTOUCH_ZOOM_GESTURE | wxTOUCH_PAN_GESTURES | wxTOUCH_ROTATE_GESTURE );
#endif
const wxEventType events[] =
{
// Binding both EVT_CHAR and EVT_CHAR_HOOK ensures that all key events,
@@ -239,9 +229,6 @@ bool EDA_3D_CANVAS::initializeOpenGL()
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
}
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
wxString version = From_UTF8( (char *) glGetString( GL_VERSION ) );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL version string %s." ),
@@ -640,75 +627,6 @@ void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event )
}
void EDA_3D_CANVAS::OnZoomGesture( wxZoomGestureEvent& aEvent )
{
SetFocus();
if( aEvent.IsGestureStart() )
{
m_gestureLastZoomFactor = 1.0;
m_camera.SetCurMousePosition( aEvent.GetPosition() );
}
if( m_camera_is_moving )
return;
restart_editingTimeOut_Timer();
m_camera.Pan( aEvent.GetPosition() );
m_camera.SetCurMousePosition( aEvent.GetPosition() );
m_camera.Zoom( aEvent.GetZoomFactor() / m_gestureLastZoomFactor );
m_gestureLastZoomFactor = aEvent.GetZoomFactor();
DisplayStatus();
Request_refresh();
}
void EDA_3D_CANVAS::OnPanGesture( wxPanGestureEvent& aEvent )
{
SetFocus();
if( aEvent.IsGestureStart() )
m_camera.SetCurMousePosition( aEvent.GetPosition() );
if( m_camera_is_moving )
return;
m_camera.Pan( aEvent.GetPosition() );
m_camera.SetCurMousePosition( aEvent.GetPosition() );
DisplayStatus();
Request_refresh();
}
void EDA_3D_CANVAS::OnRotateGesture( wxRotateGestureEvent& aEvent )
{
SetFocus();
if( aEvent.IsGestureStart() )
{
m_gestureLastAngle = 0;
m_camera.SetCurMousePosition( aEvent.GetPosition() );
// We don't want to process the first angle
return;
}
if( m_camera_is_moving )
return;
m_camera.RotateScreen( m_gestureLastAngle - aEvent.GetRotationAngle() );
m_gestureLastAngle = aEvent.GetRotationAngle();
DisplayStatus();
Request_refresh();
}
void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
{
if( m_3d_render && m_3d_render->IsReloadRequestPending() )
-8
View File
@@ -237,10 +237,6 @@ private:
void OnResize( wxSizeEvent& event );
void OnTimerTimeout_Redraw( wxTimerEvent& event );
void OnZoomGesture( wxZoomGestureEvent& event );
void OnPanGesture( wxPanGestureEvent& event );
void OnRotateGesture( wxRotateGestureEvent& event );
DECLARE_EVENT_TABLE()
/**
@@ -328,10 +324,6 @@ private:
bool m_render3dmousePivot = false; // Render the 3dmouse pivot
SFVEC3F m_3dmousePivotPos; // The position of the 3dmouse pivot
///< Used to track gesture events.
double m_gestureLastZoomFactor = 1.0;
double m_gestureLastAngle = 0.0;
/**
* Trace mask used to enable or disable the trace output of this class.
* The debug output can be turned on by setting the WXTRACE environment variable to
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2021 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
@@ -35,7 +35,6 @@
#include "../3d_cache/3d_cache.h"
#include <wx/dcclient.h>
#include <base_units.h>
#include <build_version.h>
#include <gal/opengl/gl_context_mgr.h>
#include <settings/common_settings.h>
#include <pgm_base.h>
@@ -103,6 +102,11 @@ EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER( wxWindow* aParent, const wxGLAttribute
m_BiuTo3dUnits = 1.0;
m_glRC = nullptr;
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING_COMMON dpi{ settings, this };
SetScaleFactor( dpi.GetScaleFactor() );
}
@@ -196,9 +200,6 @@ void EDA_3D_MODEL_VIEWER::ogl_initialize()
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
}
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST );
@@ -30,7 +30,6 @@
#include "render_3d_opengl.h"
#include "opengl_utils.h"
#include "common_ogl/ogl_utils.h"
#include <board.h>
#include <footprint.h>
#include <3d_math.h>
#include <glm/geometric.hpp>
@@ -1570,6 +1570,10 @@ SFVEC4F RENDER_3D_RAYTRACE_BASE::shadeHit( const SFVEC4F& aBgColor, const RAY& a
sum_color += add;
}
else
{
sum_color += aBgColor;
}
}
outColor += (sum_color / SFVEC4F( (float)reflection_number_of_samples) );
@@ -31,7 +31,6 @@
#define _BBOX_3D_H_
#include <plugins/3dapi/xv3d_types.h> // SFVEC2F
#include <glm/mat4x4.hpp>
struct RAY;
+4 -5
View File
@@ -5,7 +5,7 @@
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-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
@@ -54,17 +54,16 @@ void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
// Set up toolbar
m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
KiBitmapBundle( BITMAPS::import3d ),
_( "Reload board" ) );
KiScaledBitmap( BITMAPS::import3d, this ), _( "Reload board" ) );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
KiBitmapBundle( BITMAPS::copy ),
KiScaledBitmap( BITMAPS::copy, this ),
_( "Copy 3D image to clipboard" ) );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
KiBitmapBundle( BITMAPS::render_mode ),
KiScaledBitmap( BITMAPS::render_mode, this ),
_( "Render current view using Raytracing" ), wxITEM_CHECK );
m_mainToolBar->AddScaledSeparator( this );
+3 -1
View File
@@ -38,7 +38,6 @@
#include <3d_viewer/tools/eda_3d_actions.h>
#include <3d_viewer/tools/eda_3d_controller.h>
#include <3d_viewer/tools/eda_3d_conditions.h>
#include <board.h>
#include <advanced_config.h>
#include <bitmaps.h>
#include <board_design_settings.h>
@@ -811,6 +810,9 @@ void EDA_3D_VIEWER_FRAME::loadCommonSettings()
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING_COMMON dpi{ settings, this };
m_canvas->SetScaleFactor( dpi.GetScaleFactor() );
// TODO(JE) use all control options
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
}
@@ -382,7 +382,7 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
m_params.emplace_back( new PARAM_LAYER_PRESET_3D( "layer_presets",
&m_LayerPresets ) );
m_params.emplace_back( new PARAM<wxString>( "current_layer_preset",
&m_CurrentPreset, FOLLOW_PLOT_SETTINGS ) );
&m_CurrentPreset, LEGACY_PRESET_FLAG ) );
registerMigration( 0, 1, std::bind( &EDA_3D_VIEWER_SETTINGS::migrateSchema0to1, this ) );
+8 -6
View File
@@ -100,6 +100,7 @@ APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
{
DPI_SCALING_COMMON dpi( nullptr, m_frame );
int indicatorSize = ConvertDialogToPixels( wxSize( 6, 6 ) ).x / dpi.GetContentScaleFactor();
int screenHeight = wxSystemSettings::GetMetric( wxSYS_SCREEN_Y );
m_pointSize = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ).GetPointSize();
@@ -152,13 +153,13 @@ APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ),
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ) ) );
if( screenHeight <= 900 && m_pointSize >= FromDIP( KIUI::c_IndicatorSizeDIP ) )
if( screenHeight <= 900 && m_pointSize >= indicatorSize )
m_pointSize = m_pointSize * 8 / 10;
m_cbLayerPresets->Bind( wxEVT_CHOICE, &APPEARANCE_CONTROLS_3D::onLayerPresetChanged, this );
m_toggleGridRenderer = new GRID_BITMAP_TOGGLE_RENDERER(
KiBitmapBundle( BITMAPS::visibility ), KiBitmapBundle( BITMAPS::visibility_off ) );
m_toggleGridRenderer = new GRID_BITMAP_TOGGLE_RENDERER( KiBitmap( BITMAPS::visibility ),
KiBitmap( BITMAPS::visibility_off ) );
m_frame->Bind( EDA_LANG_CHANGED, &APPEARANCE_CONTROLS_3D::OnLanguageChanged, this );
}
@@ -520,9 +521,10 @@ void APPEARANCE_CONTROLS_3D::rebuildLayers()
}
else
{
BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE(
m_windowLayers, layer, KiBitmapBundle( BITMAPS::visibility ),
KiBitmapBundle( BITMAPS::visibility_off ), aSetting->m_Visible );
BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE( m_windowLayers, layer,
KiBitmap( BITMAPS::visibility ),
KiBitmap( BITMAPS::visibility_off ),
aSetting->m_Visible );
btn_visible->Bind( TOGGLE_CHANGED,
[this]( wxCommandEvent& aEvent )
+17 -38
View File
@@ -192,6 +192,9 @@ void PANEL_PREVIEW_3D_MODEL::loadSettings()
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING_COMMON dpi{ settings, this };
m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
// TODO(JE) use all control options
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
@@ -253,10 +256,6 @@ wxString PANEL_PREVIEW_3D_MODEL::formatScaleValue( double aValue )
wxString PANEL_PREVIEW_3D_MODEL::formatRotationValue( double aValue )
{
// Sigh. Did we really need differentiated +/- 0.0?
if( aValue == -0.0 )
aValue = 0.0;
return wxString::Format( wxT( "%.2f%s" ),
aValue,
EDA_UNIT_UTILS::GetText( EDA_UNITS::DEGREES ) );
@@ -290,11 +289,9 @@ void PANEL_PREVIEW_3D_MODEL::SetSelectedModel( int idx )
yscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.y ) );
zscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.z ) );
// Rotation is stored in the file as postive-is-CW, but we use postive-is-CCW in the GUI
// to match the rest of KiCad
xrot->ChangeValue( formatRotationValue( -modelInfo.m_Rotation.x ) );
yrot->ChangeValue( formatRotationValue( -modelInfo.m_Rotation.y ) );
zrot->ChangeValue( formatRotationValue( -modelInfo.m_Rotation.z ) );
xrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.x ) );
yrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.y ) );
zrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.z ) );
xoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.x ) );
yoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.y ) );
@@ -337,11 +334,9 @@ void PANEL_PREVIEW_3D_MODEL::updateOrientation( wxCommandEvent &event )
modelInfo->m_Scale.z = EDA_UNIT_UTILS::UI::DoubleValueFromString(
pcbIUScale, EDA_UNITS::UNSCALED, zscale->GetValue() );
// Rotation is stored in the file as postive-is-CW, but we use postive-is-CCW in the GUI
// to match the rest of KiCad
modelInfo->m_Rotation.x = -rotationFromString( xrot->GetValue() );
modelInfo->m_Rotation.y = -rotationFromString( yrot->GetValue() );
modelInfo->m_Rotation.z = -rotationFromString( zrot->GetValue() );
modelInfo->m_Rotation.x = rotationFromString( xrot->GetValue() );
modelInfo->m_Rotation.y = rotationFromString( yrot->GetValue() );
modelInfo->m_Rotation.z = rotationFromString( zrot->GetValue() );
modelInfo->m_Offset.x = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
xoff->GetValue() )
@@ -431,15 +426,10 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign
else if( spinCtrl == m_spinZscale )
textCtrl = zscale;
double step = SCALE_INCREMENT;
if( wxGetMouseState().ShiftDown( ) )
step = SCALE_INCREMENT_FINE;
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::UNSCALED,
textCtrl->GetValue() );
curr_value += ( step * aSign );
curr_value += ( SCALE_INCREMENT * aSign );
curr_value = std::max( 1/MAX_SCALE, curr_value );
curr_value = std::min( curr_value, MAX_SCALE );
@@ -457,15 +447,10 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aS
else if( spinCtrl == m_spinZrot )
textCtrl = zrot;
double step = ROTATION_INCREMENT;
if( wxGetMouseState().ShiftDown( ) )
step = ROTATION_INCREMENT_FINE;
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( unityScale, EDA_UNITS::DEGREES,
textCtrl->GetValue() );
curr_value += ( step * aSign );
curr_value += ( ROTATION_INCREMENT * aSign );
curr_value = std::max( -MAX_ROTATION, curr_value );
curr_value = std::min( curr_value, MAX_ROTATION );
@@ -485,22 +470,16 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
textCtrl = zoff;
double step_mm = OFFSET_INCREMENT_MM;
if( wxGetMouseState().ShiftDown( ) )
step_mm = OFFSET_INCREMENT_MM_FINE;
double curr_value_mm =
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
textCtrl->GetValue() )
/ pcbIUScale.IU_PER_MM;
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
{
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
if( wxGetMouseState().ShiftDown( ) )
step_mm = 25.4*OFFSET_INCREMENT_MIL_FINE/1000;;
}
double curr_value_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
textCtrl->GetValue() )
/ pcbIUScale.IU_PER_MM;
curr_value_mm += ( step_mm * aSign );
curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
@@ -536,10 +515,10 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event )
{
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
double step = ROTATION_INCREMENT;
double step = ROTATION_INCREMENT_WHEEL;
if( event.ShiftDown( ) )
step = ROTATION_INCREMENT_FINE;
step = ROTATION_INCREMENT_WHEEL_FINE;
if( event.GetWheelRotation() >= 0 )
step = -step;
+3 -2
View File
@@ -43,8 +43,9 @@
#define SCALE_INCREMENT_FINE 0.02
#define SCALE_INCREMENT 0.1
#define ROTATION_INCREMENT 90 // in degrees
#define ROTATION_INCREMENT_FINE 1 // in degrees
#define ROTATION_INCREMENT 90 // in degrees, for spin button command
#define ROTATION_INCREMENT_WHEEL 90 // in degrees, for mouse wheel command
#define ROTATION_INCREMENT_WHEEL_FINE 1 // in degrees, for mouse wheel command
#define OFFSET_INCREMENT_MM 0.5
#define OFFSET_INCREMENT_MM_FINE 0.1
+12 -46
View File
@@ -31,11 +31,6 @@ cmake_policy( SET CMP0116 OLD )
# The current structure requires the add_custom_command to get called twice, the NEW behavior deduplicates it
cmake_policy( SET CMP0113 OLD )
# Enable CMAKE_MSVC_DEBUG_INFORMATION_FORMAT to override the cmake pdb flags easily
if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
endif (POLICY CMP0141)
# Default to CMAKE_BUILD_TYPE = Release unless overridden on command line
# http://www.cmake.org/pipermail/cmake/2008-September/023808.html
if( DEFINED CMAKE_BUILD_TYPE )
@@ -267,10 +262,6 @@ option( KICAD_IPC_API
"Enable experimental IPC API"
OFF )
option( KICAD_IDF_TOOLS
"Build additional idf tools"
ON )
# Global setting: exports are explicit
set( CMAKE_CXX_VISIBILITY_PRESET "hidden" )
set( CMAKE_VISIBILITY_INLINES_HIDDEN ON )
@@ -359,9 +350,13 @@ add_compile_definitions( $<$<BOOL:${KICAD_BUILD_ARCH_ARM64}>:KICAD_BUILD_ARCH_AR
if (USE_CCACHE)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
# Set ccache on the actual lang
list(PREPEND CMAKE_C_COMPILER_LAUNCHER ${CCACHE_FOUND})
list(PREPEND CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_FOUND})
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
set(RULE_LAUNCH_COMPILE "${RULE_LAUNCH_COMPILE} ${CCACHE_FOUND}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${RULE_LAUNCH_COMPILE})
get_property(RULE_LAUNCH_LINK GLOBAL PROPERTY RULE_LAUNCH_LINK)
set(RULE_LAUNCH_LINK "${RULE_LAUNCH_LINK} ${CCACHE_FOUND}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${RULE_LAUNCH_LINK})
message(STATUS "Used ${CCACHE_FOUND} for compilation.")
else(CCACHE_FOUND)
@@ -376,9 +371,9 @@ endif(USE_CCACHE)
if (USE_DISTCC)
find_program(DISTCC_FOUND distcc)
if(DISTCC_FOUND)
list(APPEND CMAKE_C_COMPILER_LAUNCHER ${DISTCC_FOUND})
list(APPEND CMAKE_CXX_COMPILER_LAUNCHER ${DISTCC_FOUND})
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
set(RULE_LAUNCH_COMPILE "${RULE_LAUNCH_COMPILE} ${DISTCC_FOUND}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${RULE_LAUNCH_COMPILE})
message(STATUS "Using ${DISTCC_FOUND} for distributed build.")
else(DISTCC_FOUND)
message(INFO "Distcc was requested but not found.")
@@ -536,18 +531,8 @@ if( MSVC )
string( APPEND CMAKE_CXX_FLAGS " /wd4290" )
# C4800: non-bool is explicitly cast to bool, forcing value of 0 or 1
string( APPEND CMAKE_CXX_FLAGS " /wd4800" )
# cmake 3.25 or higher requried for MSVC, should be fine
if( USE_CCACHE AND CCACHE_FOUND )
# Equivalent to /Z7, ensures cmake doesn't fight over the default
# ccache may encounter external PDB file write errors due to paralleism
# Using the embedded PDB mode is ok for development use of ccache
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "Embedded")
else()
# Equivalent to /Zi, ensures cmake doesn't fight over the default
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase")
endif()
# /Zi: create PDB
string( APPEND CMAKE_CXX_FLAGS " /Zi" )
# /Zc:__cplusplus: define this macro according to C++ standard version
string( APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus" )
# /GF: enable string pooling
@@ -1058,25 +1043,6 @@ find_package( wxWidgets ${wxWidgets_REQ_VERSION} COMPONENTS gl aui adv html core
# Include wxWidgets macros.
include( ${wxWidgets_USE_FILE} )
# Detect wxWidgets port being used
if( wxWidgets_FIND_STYLE STREQUAL "win32" )
string(REGEX MATCH "^[msw|qt|gtk]*" KICAD_WX_PORT "${WX_CONFIGURATION}")
if( KICAD_WX_PORT STREQUAL "qt" )
add_compile_definitions( __WXQT__ )
elseif( KICAD_WX_PORT STREQUAL "gtk" )
add_compile_definitions( __WXGTK__ )
endif()
elseif( _wx_selected_config )
string(REGEX MATCH "^[msw|qt|gtk|osx]*" KICAD_WX_PORT "${_wx_selected_config}")
endif()
if( KICAD_WX_PORT )
message( STATUS "Detected wxWidgets port: ${KICAD_WX_PORT}")
else()
message( FATAL_ERROR "Unable to detect wxWidgets port")
endif()
if( NOT MSVC )
if( ${wxWidgets_VERSION_STRING} VERSION_LESS 3.2 )
message( FATAL_ERROR "wxWidgets 3.2.0 or greater is required" )
+6 -34
View File
@@ -132,19 +132,11 @@ message Arc
Net net = 8;
}
// What copper layer shape mode the padstack uses
enum PadStackType
{
PST_UNKNOWN = 0;
// The same shape is used on all copper layers
PST_NORMAL = 1;
// The padstack uses up to three different shapes (F_Cu, inner layers, B_Cu)
PST_TOP_INNER_BOTTOM = 2;
// The padstack's shape may differ on arbitrary copper layers
PST_CUSTOM = 3;
PST_UNKNOWN = 0;
PST_THROUGH = 1; // Through all layers; same shape on all layers
PST_BLIND_BURIED = 2; // From a start layer to end layer (inclusive); same shape on all included layers
}
enum UnconnectedLayerRemoval
@@ -197,18 +189,15 @@ message PadStackLayer
// How much to round the corners of the shape by, as a fraction of min(size.x, size.y)
// Only used for PSS_ROUNDRECT or PSS_CHAMFEREDRECT
double corner_rounding_ratio = 4;
float corner_rounding_ratio = 4;
// How much to round the corners of the shape by, as a fraction of min(size.x, size.y)
// Only used for PSS_CHAMFEREDRECT
double chamfer_ratio = 5;
float chamfer_ratio = 5;
ChamferedRectCorners chamfered_corners = 6;
repeated GraphicShape custom_shapes = 7;
// If shape == PSS_CUSTOM, defines the shape of the anchor (only PSS_CIRCLE and PSS_RECTANGLE supported at present)
PadStackShape custom_anchor_shape = 8;
}
// A pad stack definition for a multilayer pad or via.
@@ -236,21 +225,6 @@ message PadStack
kiapi.common.types.Angle angle = 7;
}
enum ViaType
{
VT_UNKNOWN = 0;
// Through vias always start on F_Cu and end on B_Cu
VT_THROUGH = 1;
// Blind/buried vias can have arbitrary start and end layers
VT_BLIND_BURIED = 2;
// Microvias, blind/buried vias, can have arbitrary start and end layers, but also have different
// size defaults and design rules
VT_MICRO = 3;
}
// Represents a via
message Via
{
@@ -260,14 +234,12 @@ message Via
// The location of the via's center point
kiapi.common.types.Vector2 position = 2;
// The pad stack definition for this via.
// The pad stack definition for this via. The via's VIATYPE (blind/buried/normal) is inferred from this.
PadStack pad_stack = 3;
kiapi.common.types.LockedState locked = 4;
Net net = 5;
ViaType type = 6;
}
message GraphicSegmentAttributes
+1 -2
View File
@@ -138,7 +138,7 @@ void IMAGE_SIZE::SetUnit( EDA_UNITS aUnit )
}
BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, KIWAY_PLAYER )
BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, EDA_BASE_FRAME )
EVT_MENU( wxID_CLOSE, BITMAP2CMP_FRAME::OnExit )
EVT_MENU( wxID_EXIT, BITMAP2CMP_FRAME::OnExit )
@@ -193,7 +193,6 @@ BITMAP2CMP_FRAME::BITMAP2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_toolManager->InitTools();
ReCreateMenuBar();
setupUIConditions();
GetSizer()->SetSizeHints( this );
+1 -3
View File
@@ -36,9 +36,7 @@ endfunction()
get_kicad_doc_version(KICAD_DOC_VERSION)
# copy and modify the "normal" Doxyfile
cmake_path(GET DOCSET_DOXYFILE PARENT_PATH OUTPUT_DIR)
file(MAKE_DIRECTORY ${OUTPUT_DIR})
file(COPY_FILE ${SRC_DOXYFILE} ${DOCSET_DOXYFILE})
file(COPY ${SRC_DOXYFILE} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(APPEND ${DOCSET_DOXYFILE} "
# Added for DocSet generation
-3
View File
@@ -53,9 +53,6 @@ if( MSVC )
# This is a workaround borrowed from https://github.com/dotnet/runtime/blob/main/eng/native/configurecompiler.cmake
# CMake currently cannot handle the fact that "armasm" is used in combination with standard MSVC "cl" for ARM targets
# So this is basically a hack (incombination with the MSVCAssemblyHelper.cmake) to make this all work
# This workaround can be removed when https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9326 is finally part of a
# cmake release AND when MSVC ships said cmake release
if(KICAD_BUILD_ARCH_ARM)
message( "Configuring ARM assembler" )
# Explicitly specify the assembler to be used for Arm32 compile
-1
View File
@@ -86,7 +86,6 @@ set( OCC_LIBS_POST_78
TKDEGLTF
TKDESTEP
TKDESTL
TKDEVRML
)
set(OCC_TYPE "OpenCASCADE Standard Edition")
+1 -1
View File
@@ -37,7 +37,7 @@ unset(_Python_NAMES)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
# Disabling the "search every possible place" code for now
# see https://gitlab.com/kicad/code/kicad/-/issues/8553
+1 -1
View File
@@ -44,7 +44,7 @@ cmake_find_frameworks(Python)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
if(PythonLibs_FIND_VERSION)
if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+1 -5
View File
@@ -523,8 +523,6 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
if(BUILD_SHARED_LIBS)
find_path(wxWidgets_LIB_DIR
NAMES
qtu/wx/setup.h
qtud/wx/setup.h
msw/wx/setup.h
mswd/wx/setup.h
mswu/wx/setup.h
@@ -542,8 +540,6 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
else()
find_path(wxWidgets_LIB_DIR
NAMES
qtu/wx/setup.h
qtud/wx/setup.h
msw/wx/setup.h
mswd/wx/setup.h
mswu/wx/setup.h
@@ -575,7 +571,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
endif()
# Search for available configuration types.
foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw qt qtd qtu qtud)
foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw)
set(WX_${CFG}_FOUND FALSE)
if(EXISTS ${WX_LIB_DIR}/${CFG})
list(APPEND WX_CONFIGURATION_LIST ${CFG})
+1 -1
View File
@@ -62,7 +62,7 @@ if( KICAD_TEST_XML_OUTPUT )
# Due to Boost issue in 1.62, have to use the --logger parameter, rather than
# separate --log_format, --log_sink, etc parameter
# https://svn.boost.org/trac10/ticket/12507
set(BOOST_TEST_PARAMS --logger=JUNIT,warning,${TEST_NAME}.boost-results.xml:HRF,message)
set(BOOST_TEST_PARAMS --logger=JUNIT,warning,${TEST_NAME}.boost-results.xml:HRF,warning)
endif()
# Add the test to the CTest registry
+2 -5
View File
@@ -133,7 +133,6 @@ set( KICOMMON_SRCS
exceptions.cpp
gestfich.cpp
json_conversions.cpp
kidialog.cpp
kiid.cpp
kiway.cpp
kiway_express.cpp
@@ -582,7 +581,6 @@ set( COMMON_SRCS
tool/action_toolbar.cpp
tool/actions.cpp
tool/common_control.cpp
tool/library_editor_control.cpp
tool/common_tools.cpp
tool/conditional_menu.cpp
tool/edit_constraints.cpp
@@ -719,7 +717,6 @@ set( PCB_COMMON_SRCS
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_item.cpp
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_list.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pad.cpp
${CMAKE_SOURCE_DIR}/pcbnew/padstack.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_target.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_reference_image.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_field.cpp
@@ -817,7 +814,7 @@ add_dependencies( pcbcommon delaunator )
# The lemon grammar for the numeric evaluator
generate_lemon_grammar(
kicommon
common
libeval
libeval/numeric_evaluator.cpp
libeval/grammar.lemon
@@ -825,7 +822,7 @@ generate_lemon_grammar(
# The lemon grammar for the expression compiler
generate_lemon_grammar(
kicommon
common
libeval_compiler
libeval_compiler/libeval_compiler.cpp
libeval_compiler/grammar.lemon
-14
View File
@@ -111,8 +111,6 @@ static const wxChar TriangulateSimplificationLevel[] = wxT( "TriangulateSimplifi
static const wxChar TriangulateMinimumArea[] = wxT( "TriangulateMinimumArea" );
static const wxChar EnableCacheFriendlyFracture[] = wxT( "EnableCacheFriendlyFracture" );
static const wxChar EnableAPILogging[] = wxT( "EnableAPILogging" );
static const wxChar MaxFileSystemWatchers[] = wxT( "MaxFileSystemWatchers" );
static const wxChar MinorSchematicGraphSize[] = wxT( "MinorSchematicGraphSize" );
} // namespace KEYS
@@ -267,10 +265,6 @@ ADVANCED_CFG::ADVANCED_CFG()
m_EnableCacheFriendlyFracture = true;
m_MaxFilesystemWatchers = 16384;
m_MinorSchematicGraphSize = 10000;
loadFromConfigFile();
}
@@ -493,14 +487,6 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
&m_EnableCacheFriendlyFracture,
m_EnableCacheFriendlyFracture ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::MaxFileSystemWatchers,
&m_MaxFilesystemWatchers, m_MaxFilesystemWatchers,
0, 2147483647 ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::MinorSchematicGraphSize,
&m_MinorSchematicGraphSize, m_MinorSchematicGraphSize,
0, 2147483647 ) );
// Special case for trace mask setting...we just grab them and set them immediately
// Because we even use wxLogTrace inside of advanced config
wxString traceMasks;
+1 -1
View File
@@ -455,7 +455,7 @@ void BITMAP_BASE::Rotate( bool aRotateCCW )
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONX, resX);
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONY, resY);
m_rotation += ( aRotateCCW ? ANGLE_90 : -ANGLE_90 );
m_rotation += ( aRotateCCW ? -ANGLE_90 : ANGLE_90 );
rebuildBitmap( false );
UpdateImageDataBuffer();
}
+42 -131
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2022 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
@@ -17,10 +17,9 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/***************************************************************************************
* This file is auto-generated by CMake when MAINTAIN_PNGS is on. Do not edit by hand! *
* See resources/bitmap.png/CMakeLists.txt to build/see/edit the actual list of icons *
***************************************************************************************/
/**
* This file is auto-generated by CMake when MAINTAIN_PNGS is on. Do not edit by hand!
*/
#include <bitmaps/bitmaps_list.h>
#include <bitmaps/bitmap_info.h>
@@ -447,10 +446,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& 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_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::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::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" ) );
@@ -527,17 +524,9 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_24.png" ), 24, wxT( "light" ) );
@@ -863,10 +852,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& 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_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::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::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" ) );
@@ -943,17 +930,9 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_24.png" ), 24, wxT( "dark" ) );
@@ -1279,10 +1258,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& 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_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::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::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" ) );
@@ -1359,17 +1336,9 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_16.png" ), 16, wxT( "light" ) );
@@ -1695,10 +1664,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& 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_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::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::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" ) );
@@ -1775,17 +1742,9 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_16.png" ), 16, wxT( "dark" ) );
@@ -2111,10 +2070,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& 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_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::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::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" ) );
@@ -2191,17 +2148,9 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_32.png" ), 32, wxT( "light" ) );
@@ -2527,10 +2476,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& 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_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::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::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" ) );
@@ -2607,17 +2554,9 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_32.png" ), 32, wxT( "dark" ) );
@@ -2943,10 +2882,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& 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_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::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::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" ) );
@@ -3023,17 +2960,9 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_48.png" ), 48, wxT( "light" ) );
@@ -3359,10 +3288,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& 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_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::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::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" ) );
@@ -3439,17 +3366,9 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_48.png" ), 48, wxT( "dark" ) );
@@ -3775,10 +3694,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& 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_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::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::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" ) );
@@ -3855,17 +3772,9 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_64.png" ), 64, wxT( "light" ) );
@@ -4191,10 +4100,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& 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_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::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::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" ) );
@@ -4271,17 +4178,9 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4535,6 +4434,24 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_32].emplace_back( BITMAPS::icon_pagelayout_editor_32, wxT( "icon_pagelayout_editor_32_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_32].emplace_back( BITMAPS::icon_pcbcalculator_32, wxT( "icon_pcbcalculator_32_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_32].emplace_back( BITMAPS::icon_pcbnew_32, wxT( "icon_pcbnew_32_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_64.png" ), 64, wxT( "light" ) );
@@ -4546,7 +4463,6 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4558,7 +4474,6 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_128.png" ), 128, wxT( "light" ) );
@@ -4570,7 +4485,6 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_dark_128.png" ), 128, wxT( "dark" ) );
@@ -4582,7 +4496,6 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_256.png" ), 256, wxT( "light" ) );
@@ -4594,7 +4507,6 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_dark_256.png" ), 256, wxT( "dark" ) );
@@ -4606,7 +4518,6 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::dialog_warning].emplace_back( BITMAPS::dialog_warning, wxT( "dialog_warning_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_3d].emplace_back( BITMAPS::icon_3d, wxT( "icon_3d_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_48.png" ), 48, wxT( "light" ) );
-19
View File
@@ -51,19 +51,6 @@ extern std::string GetCurlLibVersion();
#include <kicad_build_version.h>
#undef INCLUDE_KICAD_VERSION
// Remember OpenGL info
static wxString s_glVendor;
static wxString s_glRenderer;
static wxString s_glVersion;
void SetOpenGLInfo( const char* aVendor, const char* aRenderer, const char* aVersion )
{
s_glVendor = wxString::FromUTF8( aVendor );
s_glRenderer = wxString::FromUTF8( aRenderer );
s_glVersion = wxString::FromUTF8( aVersion );
}
wxString GetPlatformGetBitnessName()
{
wxPlatformInfo platform;
@@ -213,12 +200,6 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
<< ", " << wxGetenv( "XDG_SESSION_TYPE" );
#endif
if( !s_glVendor.empty() || !s_glRenderer.empty() || !s_glVersion.empty() )
{
aMsg << eol;
aMsg << "OpenGL: " << s_glVendor << ", " << s_glRenderer << ", " << s_glVersion;
}
aMsg << eol << eol;
if( !aBrief )
+124 -14
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2023, 2024 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-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
@@ -22,23 +22,134 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <confirm.h>
#include <functional>
#include <wx/app.h>
#include <wx/stockitem.h>
#include <wx/richmsgdlg.h>
#include <wx/msgdlg.h>
#include <wx/choicdlg.h>
#include <wx/crt.h>
#include <confirm.h>
#include <functional>
#include <unordered_map>
// Set of dialogs that have been chosen not to be shown again
static std::unordered_map<unsigned long, int> doNotShowAgainDlgs;
/**
* Flag to enable confirmation dialog debugging output.
*
* @ingroup trace_env_vars
*/
static const wxChar traceConfirm[] = wxT( "KICAD_CONFIRM" );
KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, const wxString& aCaption,
long aStyle )
: wxRichMessageDialog( aParent, aMessage, aCaption, aStyle | wxCENTRE | wxSTAY_ON_TOP ),
m_hash( 0 ),
m_cancelMeansCancel( true )
{
}
KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, KD_TYPE aType,
const wxString& aCaption )
: wxRichMessageDialog( aParent, aMessage, getCaption( aType, aCaption ), getStyle( aType ) ),
m_hash( 0 ),
m_cancelMeansCancel( true )
{
}
void KIDIALOG::DoNotShowCheckbox( wxString aUniqueId, int line )
{
ShowCheckBox( _( "Do not show again" ), false );
m_hash = std::hash<wxString>{}( aUniqueId ) + line;
}
bool KIDIALOG::DoNotShowAgain() const
{
return doNotShowAgainDlgs.count( m_hash ) > 0;
}
void KIDIALOG::ForceShowAgain()
{
doNotShowAgainDlgs.erase( m_hash );
}
bool KIDIALOG::Show( bool aShow )
{
// We should check the do-not-show-again setting only when the dialog is displayed
if( aShow )
{
// Check if this dialog should be shown to the user
auto it = doNotShowAgainDlgs.find( m_hash );
if( it != doNotShowAgainDlgs.end() )
return it->second;
}
int ret = wxRichMessageDialog::Show( aShow );
// Has the user asked not to show the dialog again?
// Note that we don't save a Cancel value unless the Cancel button is being used for some
// other function (which is actually more common than it being used for Cancel).
if( IsCheckBoxChecked() && (!m_cancelMeansCancel || ret != wxID_CANCEL ) )
doNotShowAgainDlgs[m_hash] = ret;
return ret;
}
int KIDIALOG::ShowModal()
{
// Check if this dialog should be shown to the user
auto it = doNotShowAgainDlgs.find( m_hash );
if( it != doNotShowAgainDlgs.end() )
return it->second;
int ret = wxRichMessageDialog::ShowModal();
// Has the user asked not to show the dialog again?
// Note that we don't save a Cancel value unless the Cancel button is being used for some
// other function (which is actually more common than it being used for Cancel).
if( IsCheckBoxChecked() && (!m_cancelMeansCancel || ret != wxID_CANCEL ) )
doNotShowAgainDlgs[m_hash] = ret;
return ret;
}
wxString KIDIALOG::getCaption( KD_TYPE aType, const wxString& aCaption )
{
if( !aCaption.IsEmpty() )
return aCaption;
switch( aType )
{
case KD_NONE: /* fall through */
case KD_INFO: return _( "Message" );
case KD_QUESTION: return _( "Question" );
case KD_WARNING: return _( "Warning" );
case KD_ERROR: return _( "Error" );
}
return wxEmptyString;
}
long KIDIALOG::getStyle( KD_TYPE aType )
{
long style = wxOK | wxCENTRE | wxSTAY_ON_TOP;
switch( aType )
{
case KD_NONE: break;
case KD_INFO: style |= wxICON_INFORMATION; break;
case KD_QUESTION: style |= wxICON_QUESTION; break;
case KD_WARNING: style |= wxICON_WARNING; break;
case KD_ERROR: style |= wxICON_ERROR; break;
}
return style;
}
bool AskOverrideLock( wxWindow* aParent, const wxString& aMessage )
@@ -100,8 +211,7 @@ int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage )
// wxMessageDialog on windows invokes TaskDialogIndirect which is a native function for a dialog
// As a result it skips wxWidgets for modal management...and we don't parent frames properly
// among other things for Windows to do the right thing by default
// Disable all the windows manually to avoid being able to hit this dialog from the tool frame
// and kicad frame at the same time.
// Disable all the windows manually to avoid being able to hit this dialog from the tool frame and kicad frame at the same time
wxWindowDisabler disable( true );
#endif
@@ -223,7 +333,7 @@ void DisplayInfoMessage( wxWindow* aParent, const wxString& aMessage, const wxSt
{
if( !wxTheApp || !wxTheApp->GetTopWindow() )
{
wxLogTrace( traceConfirm, wxS( "%s %s" ), aMessage, aExtraInfo );
wxLogDebug( "%s %s", aMessage, aExtraInfo );
return;
}
+53 -88
View File
@@ -347,24 +347,6 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
return true;
}
}
else
{
wxLogTrace( traceDatabase, wxT( "SelectOne: table `%s` not in row cache; will SelectAll" ),
tableName, aWhere.second );
selectAllAndCache( tableName, aWhere.first );
if( m_cache->Get( tableName, cacheEntry ) )
{
if( cacheEntry.count( aWhere.second ) )
{
wxLogTrace( traceDatabase, wxT( "SelectOne: `%s` with parameter `%s` - cache hit" ),
tableName, aWhere.second );
aResult = cacheEntry.at( aWhere.second );
return true;
}
}
}
if( !m_columnCache.count( tableName ) )
{
@@ -390,14 +372,15 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
columnsFor( tableName ),
m_quoteChar, tableName, m_quoteChar,
m_quoteChar, columnName, m_quoteChar );
nanodbc::statement statement( *m_conn );
nanodbc::string query = fromUTF8( queryStr );
PROF_TIMER timer;
nanodbc::statement statement;
try
{
statement.prepare( *m_conn, query );
statement.prepare( query );
statement.bind( 0, aWhere.second.c_str() );
}
catch( nanodbc::database_error& e )
@@ -491,14 +474,44 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
}
bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const std::string& aKey )
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
std::vector<ROW>& aResults )
{
if( !m_conn )
{
wxLogTrace( traceDatabase, wxT( "Called SelectAll without valid connection!" ) );
return false;
}
auto tableMapIter = m_tables.find( aTable );
if( tableMapIter == m_tables.end() )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: requested table %s not found in cache" ),
aTable );
return false;
}
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
if( m_cache->Get( aTable, cacheEntry ) )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` - cache hit" ), aTable );
aResults.reserve( cacheEntry.size() );
for( auto &[ key, row ] : cacheEntry )
aResults.emplace_back( row );
return true;
}
nanodbc::statement statement( *m_conn );
nanodbc::string query = fromUTF8( fmt::format( "SELECT {} FROM {}{}{}", columnsFor( aTable ),
m_quoteChar, aTable, m_quoteChar ) );
wxLogTrace( traceDatabase, wxT( "selectAllAndCache: `%s`" ), toUTF8( query ) );
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s`" ), toUTF8( query ) );
PROF_TIMER timer;
@@ -509,8 +522,7 @@ bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const st
catch( nanodbc::database_error& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase,
wxT( "Exception while preparing query for selectAllAndCache: %s" ),
wxLogTrace( traceDatabase, wxT( "Exception while preparing query for SelectAll: %s" ),
m_lastError );
// Exception may be due to a connection error; nanodbc won't auto-reconnect
@@ -528,8 +540,7 @@ bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const st
catch( nanodbc::database_error& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase,
wxT( "Exception while executing query for selectAllAndCache: %s" ),
wxLogTrace( traceDatabase, wxT( "Exception while executing query for SelectAll: %s" ),
m_lastError );
// Exception may be due to a connection error; nanodbc won't auto-reconnect
@@ -540,17 +551,15 @@ bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const st
timer.Stop();
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
auto handleException =
[&]( std::runtime_error& aException, const std::string& aExtraContext = "" )
{
m_lastError = aException.what();
std::string extra = aExtraContext.empty() ? "" : ": " + aExtraContext;
wxLogTrace( traceDatabase,
wxT( "Exception while parsing result %d from selectAllAndCache: %s%s" ),
cacheEntry.size(), m_lastError, extra );
};
{
m_lastError = aException.what();
std::string extra = aExtraContext.empty() ? "" : ": " + aExtraContext;
wxLogTrace( traceDatabase,
wxT( "Exception while parsing result %d from SelectAll: %s%s" ),
aResults.size(), m_lastError, extra );
};
while( results.next() )
{
@@ -627,64 +636,20 @@ bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const st
}
}
wxASSERT( result.count( aKey ) );
std::string keyStr = std::any_cast<std::string>( result.at( aKey ) );
cacheEntry[keyStr] = result;
aResults.emplace_back( std::move( result ) );
}
wxLogTrace( traceDatabase, wxT( "selectAllAndCache from %s completed in %0.1f ms" ), aTable,
wxLogTrace( traceDatabase, wxT( "SelectAll from %s completed in %0.1f ms" ), aTable,
timer.msecs() );
for( const ROW& row : aResults )
{
wxASSERT( row.count( aKey ) );
std::string keyStr = std::any_cast<std::string>( row.at( aKey ) );
cacheEntry[keyStr] = row;
}
m_cache->Put( aTable, cacheEntry );
return true;
}
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
std::vector<ROW>& aResults )
{
if( !m_conn )
{
wxLogTrace( traceDatabase, wxT( "Called SelectAll without valid connection!" ) );
return false;
}
auto tableMapIter = m_tables.find( aTable );
if( tableMapIter == m_tables.end() )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: requested table %s not found in cache" ),
aTable );
return false;
}
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
if( !m_cache->Get( aTable, cacheEntry ) )
{
if( !selectAllAndCache( aTable, aKey ) )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` cache fill failed" ), aTable );
return false;
}
// Now it should be filled
m_cache->Get( aTable, cacheEntry );
}
if( !m_cache->Get( aTable, cacheEntry ) )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` failed to get results from cache!" ),
aTable );
return false;
}
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` - returning cached results" ), aTable );
aResults.reserve( cacheEntry.size() );
for( auto &[ key, row ] : cacheEntry )
aResults.emplace_back( row );
return true;
}
-1
View File
@@ -24,7 +24,6 @@
#include <build_version.h>
#include <eda_base_frame.h>
#include <wx/clipbrd.h>
#include <wx/msgdlg.h>
#include <wx/hyperlink.h>
+1 -1
View File
@@ -526,7 +526,7 @@ int DIALOG_SHIM::ShowQuasiModal()
m_qmodal_showing = true;
wxGUIEventLoop event_loop;
WX_EVENT_LOOP event_loop;
m_qmodal_loop = &event_loop;
@@ -26,7 +26,6 @@
#include <project.h>
#include <project/project_file.h>
#include <project/net_settings.h>
#include <eda_base_frame.h>
DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS( EDA_BASE_FRAME* aParent, const wxString aNetName,
+1 -2
View File
@@ -23,8 +23,7 @@
#include <dialogs/dialog_book_reporter.h>
#include <widgets/wx_html_report_box.h>
#include <wx/event.h>
#include <kiway_player.h>
#include <wx/wxhtml.h>
wxDEFINE_EVENT( EDA_EVT_CLOSE_DIALOG_BOOK_REPORTER, wxCommandEvent );
+31 -76
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2018-2024 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2018-2022 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
@@ -18,7 +18,6 @@
*/
#include <kiplatform/ui.h>
#include <dialogs/dialog_color_picker.h>
#include <cmath>
#include <algorithm>
@@ -29,7 +28,6 @@
#include <wx/dcmemory.h>
#define ALPHA_MAX 100 // the max value returned by the alpha (opacity) slider
#define SLOPE_AXIS ( bmsize.y / 5.28 ) // was 50 at 264 size
using KIGFX::COLOR4D;
@@ -54,19 +52,13 @@ DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER( wxWindow* aParent, const COLOR4D& aCur
m_allowOpacityCtrl = aAllowOpacityControl;
m_previousColor4D = aCurrentColor;
m_newColor4D = aCurrentColor;
m_cursorsSize = 8; // Size of square cursors drawn on color bitmaps
m_newColor4D.ToHSV( m_hue, m_sat, m_val, true );
m_bitmapRGB = nullptr;
m_bitmapHSV = nullptr;
m_selectedCursor = nullptr;
m_defaultColor = aDefaultColor;
updateHandleSize();
m_OldColorRect->SetMinSize( FromDIP( wxSize( 20, 20 ) ) );
m_NewColorRect->SetMinSize( FromDIP( wxSize( 20, 20 ) ) );
m_colorValue->SetMinSize( wxSize( GetTextExtent( wxS( "#DDDDDDDD" ) ).x + FromDIP( 8 ), -1 ) );
if( !m_allowOpacityCtrl )
{
m_SizerTransparency->Show( false );
@@ -126,22 +118,19 @@ DIALOG_COLOR_PICKER::~DIALOG_COLOR_PICKER()
void DIALOG_COLOR_PICKER::updatePreview( wxStaticBitmap* aStaticBitmap, COLOR4D& aColor4D )
{
wxSize swatchSize = aStaticBitmap->GetSize();
wxSize checkerboardSize = ConvertDialogToPixels( CHECKERBOARD_SIZE_DU );
wxBitmap newBm = COLOR_SWATCH::MakeBitmap( aColor4D, COLOR4D::WHITE,
ToPhys( swatchSize ),
ToPhys( checkerboardSize ),
wxBitmap newBm = COLOR_SWATCH::MakeBitmap( aColor4D, COLOR4D::WHITE, aStaticBitmap->GetSize(),
ConvertDialogToPixels( CHECKERBOARD_SIZE_DU ),
aStaticBitmap->GetParent()->GetBackgroundColour() );
newBm.SetScaleFactor( GetDPIScaleFactor() );
aStaticBitmap->SetBitmap( newBm );
}
bool DIALOG_COLOR_PICKER::TransferDataToWindow()
{
// Draw all bitmaps, with colors according to the color 4D
updatePreview( m_OldColorRect, m_previousColor4D );
SetEditVals( ALL_CHANGED, false );
drawAll();
// Configure the spin control sizes
configureSpinCtrl( m_spinCtrlGreen );
@@ -155,10 +144,6 @@ bool DIALOG_COLOR_PICKER::TransferDataToWindow()
finishDialogSettings();
// Draw all bitmaps, with colors according to the color 4D
updatePreview( m_OldColorRect, m_previousColor4D );
drawAll();
return true;
}
@@ -184,12 +169,8 @@ void DIALOG_COLOR_PICKER::initDefinedColors( CUSTOM_COLORS_LIST* aPredefinedColo
auto addSwatch =
[&]( int aId, COLOR4D aColor, const wxString& aColorName )
{
wxBitmap bm = COLOR_SWATCH::MakeBitmap( aColor, COLOR4D::WHITE,
ToPhys( swatchSize ),
ToPhys( checkerboardSize ),
checkboardBackground );
bm.SetScaleFactor( GetDPIScaleFactor() );
wxBitmap bm = COLOR_SWATCH::MakeBitmap( aColor, COLOR4D::WHITE, swatchSize,
checkerboardSize, checkboardBackground );
wxStaticBitmap* swatch = new wxStaticBitmap( m_panelDefinedColors, aId, bm );
m_fgridColor->Add( swatch, 0, wxALIGN_CENTER_VERTICAL, 5 );
@@ -246,7 +227,7 @@ void DIALOG_COLOR_PICKER::initDefinedColors( CUSTOM_COLORS_LIST* aPredefinedColo
void DIALOG_COLOR_PICKER::createRGBBitmap()
{
wxSize bmsize = ToPhys( m_RgbBitmap->GetSize() );
wxSize bmsize = m_RgbBitmap->GetSize();
int half_size = std::min( bmsize.x, bmsize.y )/2;
// We use here a Y axis from bottom to top and origin to center, So we need to map
@@ -264,6 +245,7 @@ void DIALOG_COLOR_PICKER::createRGBBitmap()
// Red blue area in X Z 3d axis
double inc = 255.0 / half_size;
#define SLOPE_AXIS 50.0
double slope = SLOPE_AXIS/half_size;
color.g = 0.0;
@@ -333,15 +315,13 @@ void DIALOG_COLOR_PICKER::createRGBBitmap()
delete m_bitmapRGB;
m_bitmapRGB = new wxBitmap( img, 24 );
m_bitmapRGB->SetScaleFactor( GetDPIScaleFactor() );
m_RgbBitmap->SetBitmap( *m_bitmapRGB );
}
void DIALOG_COLOR_PICKER::createHSVBitmap()
{
wxSize bmsize = ToPhys( m_HsvBitmap->GetSize() );
wxSize bmsize = m_HsvBitmap->GetSize();
int half_size = std::min( bmsize.x, bmsize.y )/2;
// We use here a Y axis from bottom to top and origin to center, So we need to map
@@ -399,24 +379,19 @@ void DIALOG_COLOR_PICKER::createHSVBitmap()
delete m_bitmapHSV;
m_bitmapHSV = new wxBitmap( img, 24 );
m_bitmapHSV->SetScaleFactor( GetDPIScaleFactor() );
m_HsvBitmap->SetBitmap( *m_bitmapHSV );
}
void DIALOG_COLOR_PICKER::drawRGBPalette()
{
if( !m_bitmapRGB || m_bitmapRGB->GetSize() != ToPhys( m_RgbBitmap->GetSize() ) )
if( !m_bitmapRGB || m_bitmapRGB->GetSize() != m_RgbBitmap->GetSize() )
createRGBBitmap();
wxMemoryDC bitmapDC;
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y )/2;
wxBitmap newBm( *m_bitmapRGB );
newBm.SetScaleFactor( 1.0 );
bitmapDC.SelectObject( newBm );
// Use Y axis from bottom to top and origin to center
@@ -438,6 +413,7 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
bitmapDC.SetBrush( brush );
int half_csize = m_cursorsSize / 2;
#define SLOPE_AXIS 50.0
double slope = SLOPE_AXIS / half_size;
// Red axis cursor (Z 3Daxis):
@@ -469,7 +445,6 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
bitmapDC.DrawLine( 0, 0, half_size, - half_size*slope ); // Blue axis (X 3D axis)
bitmapDC.DrawLine( 0, 0, -half_size, - half_size*slope ); // green axis (Y 3D axis)
newBm.SetScaleFactor( GetDPIScaleFactor() );
m_RgbBitmap->SetBitmap( newBm );
/* Deselect the Tool Bitmap from DC,
@@ -480,16 +455,13 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
void DIALOG_COLOR_PICKER::drawHSVPalette()
{
if( !m_bitmapHSV || m_bitmapHSV->GetSize() != ToPhys( m_HsvBitmap->GetSize() ) )
if( !m_bitmapHSV || m_bitmapHSV->GetSize() != m_HsvBitmap->GetSize() )
createHSVBitmap();
wxMemoryDC bitmapDC;
wxSize bmsize = m_bitmapHSV->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxSize bmsize = m_bitmapHSV->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxBitmap newBm( *m_bitmapHSV );
newBm.SetScaleFactor( 1.0 );
bitmapDC.SelectObject( newBm );
// Use Y axis from bottom to top and origin to center
@@ -513,11 +485,11 @@ void DIALOG_COLOR_PICKER::drawHSVPalette()
bitmapDC.SetPen( pen );
bitmapDC.SetBrush( brush );
bitmapDC.DrawRectangle( m_cursorBitmapHSV.x - ( m_cursorsSize / 2 ),
m_cursorBitmapHSV.y - ( m_cursorsSize / 2 ),
int half_csize = m_cursorsSize/2;
bitmapDC.DrawRectangle( m_cursorBitmapHSV.x- half_csize,
m_cursorBitmapHSV.y-half_csize,
m_cursorsSize, m_cursorsSize );
newBm.SetScaleFactor( GetDPIScaleFactor() );
m_HsvBitmap->SetBitmap( newBm );
/* Deselect the Tool Bitmap from DC,
@@ -567,15 +539,8 @@ void DIALOG_COLOR_PICKER::SetEditVals( CHANGED_COLOR aChanged, bool aCheckTransp
}
void DIALOG_COLOR_PICKER::updateHandleSize()
{
m_cursorsSize = ToPhys( FromDIP( 8 ) ); // Size of square cursors drawn on color bitmaps
}
void DIALOG_COLOR_PICKER::drawAll()
{
updateHandleSize();
m_NewColorRect->Freeze(); // Avoid flicker
m_HsvBitmap->Freeze();
m_RgbBitmap->Freeze();
@@ -618,12 +583,11 @@ void DIALOG_COLOR_PICKER::buttColorClick( wxMouseEvent& event )
void DIALOG_COLOR_PICKER::onRGBMouseClick( wxMouseEvent& event )
{
m_allowMouseEvents = true;
wxPoint mousePos = event.GetPosition();
// The cursor position is relative to the m_bitmapHSV wxBitmap center
wxPoint mousePos = ToPhys( event.GetPosition() );
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
mousePos.x -= half_size;
mousePos.y -= half_size;
mousePos.y = -mousePos.y; // Use the bottom to top vertical axis
@@ -673,10 +637,9 @@ void DIALOG_COLOR_PICKER::onRGBMouseDrag( wxMouseEvent& event )
// Adjust the HSV cursor position to follow the mouse cursor
// The cursor position is relative to the m_bitmapHSV wxBitmap center
wxPoint mousePos = ToPhys( event.GetPosition() );
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxPoint mousePos = event.GetPosition();
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
mousePos.x -= half_size;
mousePos.y -= half_size;
mousePos.y = -mousePos.y; // Use the bottom to top vertical axis
@@ -736,14 +699,6 @@ void DIALOG_COLOR_PICKER::onHSVMouseDrag( wxMouseEvent& event )
}
void DIALOG_COLOR_PICKER::onSize( wxSizeEvent& event )
{
drawAll();
event.Skip();
}
void DIALOG_COLOR_PICKER::OnColorValueText( wxCommandEvent& event )
{
if( m_newColor4D.SetFromHexString( m_colorValue->GetValue() ) )
@@ -758,9 +713,9 @@ void DIALOG_COLOR_PICKER::OnColorValueText( wxCommandEvent& event )
bool DIALOG_COLOR_PICKER::setHSvaluesFromCursor( const wxPoint& aMouseCursor )
{
wxPoint mousePos = ToPhys( aMouseCursor );
wxSize bmsize = m_bitmapHSV->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxPoint mousePos = aMouseCursor;
wxSize bmsize = m_bitmapHSV->GetSize();
int half_size = std::min( bmsize.x, bmsize.y )/2;
// Make the cursor position relative to the m_bitmapHSV wxBitmap center
mousePos.x -= half_size;
+29 -25
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -33,10 +33,7 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
m_RgbBitmap = new wxStaticBitmap( sbSizerViewRGB->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 264,264 ), 0 );
m_RgbBitmap->SetMinSize( wxSize( 264,264 ) );
sbSizerViewRGB->Add( m_RgbBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND|wxSHAPED, 5 );
sbSizerViewRGB->Add( 0, 0, 1, wxEXPAND, 5 );
sbSizerViewRGB->Add( m_RgbBitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
wxFlexGridSizer* fgSizerRGB;
fgSizerRGB = new wxFlexGridSizer( 0, 3, 0, 0 );
@@ -71,18 +68,18 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
sbSizerViewRGB->Add( fgSizerRGB, 0, wxEXPAND, 5 );
bSizerPanels->Add( sbSizerViewRGB, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizerPanels->Add( sbSizerViewRGB, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizerViewHSV;
sbSizerViewHSV = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, _("HSV") ), wxVERTICAL );
sbSizerViewHSV = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, _("HSV") ), wxHORIZONTAL );
wxBoxSizer* bSizer10;
bSizer10 = new wxBoxSizer( wxVERTICAL );
m_HsvBitmap = new wxStaticBitmap( sbSizerViewHSV->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 264,264 ), 0 );
m_HsvBitmap->SetMinSize( wxSize( 264,264 ) );
sbSizerViewHSV->Add( m_HsvBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND|wxSHAPED, 5 );
sbSizerViewHSV->Add( 0, 0, 1, wxEXPAND, 5 );
bSizer10->Add( m_HsvBitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
wxFlexGridSizer* fgSizerHSV;
fgSizerHSV = new wxFlexGridSizer( 0, 2, 0, 0 );
@@ -106,23 +103,26 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
fgSizerHSV->Add( m_spinCtrlSaturation, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
sbSizerViewHSV->Add( fgSizerHSV, 0, wxEXPAND, 5 );
bSizer10->Add( fgSizerHSV, 0, wxEXPAND, 5 );
bSizerPanels->Add( sbSizerViewHSV, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
sbSizerViewHSV->Add( bSizer10, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerBright;
bSizerBright = new wxBoxSizer( wxVERTICAL );
m_staticTextBright = new wxStaticText( m_panelFreeColors, wxID_ANY, _("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextBright = new wxStaticText( sbSizerViewHSV->GetStaticBox(), wxID_ANY, _("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextBright->Wrap( -1 );
bSizerBright->Add( m_staticTextBright, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_sliderBrightness = new wxSlider( m_panelFreeColors, wxID_ANY, 255, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_INVERSE|wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
m_sliderBrightness = new wxSlider( sbSizerViewHSV->GetStaticBox(), wxID_ANY, 255, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_INVERSE|wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
bSizerBright->Add( m_sliderBrightness, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP, 5 );
bSizerPanels->Add( bSizerBright, 0, wxALL|wxEXPAND, 5 );
sbSizerViewHSV->Add( bSizerBright, 0, wxEXPAND, 5 );
bSizerPanels->Add( sbSizerViewHSV, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
bSizerUpperFreeColors->Add( bSizerPanels, 1, wxEXPAND, 5 );
@@ -153,7 +153,7 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
m_SizerDefinedColors->Fit( m_panelDefinedColors );
m_notebook->AddPage( m_panelDefinedColors, _("Defined Colors"), false );
bSizerUpperMain->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
bSizerUpperMain->Add( m_notebook, 0, wxEXPAND | wxALL, 5 );
m_SizerTransparency = new wxBoxSizer( wxVERTICAL );
@@ -171,29 +171,35 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
bSizerUpperMain->Add( m_SizerTransparency, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerMain->Add( bSizerUpperMain, 1, wxEXPAND, 5 );
bSizerUpperMain->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerMain->Add( bSizerUpperMain, 0, wxEXPAND, 5 );
wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
m_staticTextOldColor = new wxStaticText( this, wxID_ANY, _("Preview (old/new):"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextOldColor->Wrap( -1 );
bButtonsSizer->Add( m_staticTextOldColor, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
bButtonsSizer->Add( m_staticTextOldColor, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_OldColorRect = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_OldColorRect->SetMinSize( wxSize( 24,24 ) );
bButtonsSizer->Add( m_OldColorRect, 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 5 );
bButtonsSizer->Add( m_OldColorRect, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_NewColorRect = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_NewColorRect->SetMinSize( wxSize( 24,24 ) );
bButtonsSizer->Add( m_NewColorRect, 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 5 );
bButtonsSizer->Add( m_NewColorRect, 0, wxALIGN_CENTER_VERTICAL, 5 );
bButtonsSizer->Add( 10, 0, 0, wxEXPAND, 5 );
m_colorValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_colorValue->SetMinSize( wxSize( 176,-1 ) );
bButtonsSizer->Add( m_colorValue, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
bButtonsSizer->Add( m_colorValue, 0, wxALIGN_CENTER_VERTICAL, 5 );
bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
@@ -211,7 +217,7 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
bButtonsSizer->Add( m_sdbSizer, 1, wxALL, 5 );
bSizerMain->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT, 10 );
bSizerMain->Add( bButtonsSizer, 1, wxEXPAND|wxLEFT, 10 );
this->SetSizer( bSizerMain );
@@ -228,7 +234,6 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
m_spinCtrlBlue->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditBlue ), NULL, this );
m_HsvBitmap->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseClick ), NULL, this );
m_HsvBitmap->Connect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseDrag ), NULL, this );
m_HsvBitmap->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_COLOR_PICKER_BASE::onSize ), NULL, this );
m_spinCtrlHue->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditHue ), NULL, this );
m_spinCtrlSaturation->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditSat ), NULL, this );
m_sliderBrightness->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeBrightness ), NULL, this );
@@ -263,7 +268,6 @@ DIALOG_COLOR_PICKER_BASE::~DIALOG_COLOR_PICKER_BASE()
m_spinCtrlBlue->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditBlue ), NULL, this );
m_HsvBitmap->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseClick ), NULL, this );
m_HsvBitmap->Disconnect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseDrag ), NULL, this );
m_HsvBitmap->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_COLOR_PICKER_BASE::onSize ), NULL, this );
m_spinCtrlHue->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditHue ), NULL, this );
m_spinCtrlSaturation->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditSat ), NULL, this );
m_sliderBrightness->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeBrightness ), NULL, this );
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -81,7 +81,6 @@ class DIALOG_COLOR_PICKER_BASE : public DIALOG_SHIM
virtual void OnChangeEditBlue( wxSpinEvent& event ) { event.Skip(); }
virtual void onHSVMouseClick( wxMouseEvent& event ) { event.Skip(); }
virtual void onHSVMouseDrag( wxMouseEvent& event ) { event.Skip(); }
virtual void onSize( wxSizeEvent& event ) { event.Skip(); }
virtual void OnChangeEditHue( wxSpinEvent& event ) { event.Skip(); }
virtual void OnChangeEditSat( wxSpinEvent& event ) { event.Skip(); }
virtual void OnChangeBrightness( wxScrollEvent& event ) { event.Skip(); }
@@ -26,10 +26,8 @@
#include <bitmaps.h>
#include <confirm.h>
#include <kidialog.h>
#include <validators.h>
#include <dialogs/html_message_box.h>
#include <settings/common_settings.h>
#include <filename_resolver.h>
#include <env_vars.h>
#include <grid_tricks.h>
@@ -17,8 +17,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <wx/statline.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <dialogs/dialog_edit_library_tables.h>
@@ -43,9 +43,6 @@ void DIALOG_EDIT_LIBRARY_TABLES::InstallPanel( wxPanel* aPanel )
auto mainSizer = new wxBoxSizer( wxVERTICAL );
SetSizer( mainSizer );
m_infoBar = new WX_INFOBAR( this );
mainSizer->Add( m_infoBar, 0, wxEXPAND, 0 );
mainSizer->Add( m_contentPanel, 1, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 5 );
m_contentPanel->SetMinSize( FromDIP( wxSize( 1000, 600 ) ) );
+2 -1
View File
@@ -22,7 +22,8 @@
*/
#include <bitmaps.h>
#include <wx/msgdlg.h>
#include <confirm.h>
#include <wx/textdlg.h>
#include <dialogs/dialog_grid_settings.h>
#include <widgets/std_bitmap_button.h>
#include <common.h>
-1
View File
@@ -23,7 +23,6 @@
#include <dialogs/dialog_hotkey_list.h>
#include <kiface_base.h>
#include <eda_base_frame.h>
#include <panel_hotkeys_editor.h>
#include <widgets/ui_common.h>
+1 -1
View File
@@ -22,6 +22,7 @@
#include <bitmaps.h>
#include <base_screen.h>
#include <common.h> // ExpandEnvVarSubstitutions
#include <confirm.h>
#include <core/arraydim.h>
#include <dialogs/dialog_page_settings.h>
#include <eda_draw_frame.h>
@@ -42,7 +43,6 @@
#include <wx/tokenzr.h>
#include <wx/filedlg.h>
#include <wx/dcmemory.h>
#include <wx/msgdlg.h>
#define MAX_PAGE_EXAMPLE_SIZE 200
+1 -1
View File
@@ -19,10 +19,10 @@
#include <dialogs/dialog_print_generic.h>
#include <confirm.h>
#include <eda_draw_frame.h>
#include <printout.h>
#include <pgm_base.h>
#include <confirm.h>
#include <wx/print.h>
#include <wx/printdlg.h>
+7 -6
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -15,16 +15,17 @@ WX_TEXT_ENTRY_DIALOG_BASE::WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindow
m_mainSizer = new wxBoxSizer( wxVERTICAL );
m_ContentSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerContent;
bSizerContent = new wxBoxSizer( wxVERTICAL );
m_label = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
m_label->Wrap( -1 );
m_ContentSizer->Add( m_label, 0, wxALL|wxEXPAND, 5 );
bSizerContent->Add( m_label, 0, wxALL|wxEXPAND, 5 );
m_textCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrl->SetMinSize( wxSize( 300,-1 ) );
m_ContentSizer->Add( m_textCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerContent->Add( m_textCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxBoxSizer* bSizer3;
bSizer3 = new wxBoxSizer( wxHORIZONTAL );
@@ -43,10 +44,10 @@ WX_TEXT_ENTRY_DIALOG_BASE::WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindow
bSizer3->Add( m_choice, 3, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_ContentSizer->Add( bSizer3, 1, wxEXPAND, 5 );
bSizerContent->Add( bSizer3, 1, wxEXPAND, 5 );
m_mainSizer->Add( m_ContentSizer, 1, wxALL|wxEXPAND, 5 );
m_mainSizer->Add( bSizerContent, 1, wxALL|wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
+347 -352
View File
@@ -1,362 +1,357 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="17"/>
<object class="Project" expanded="true">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_text_entry_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_text_entry_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="true">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="center">wxBOTH</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">WX_TEXT_ENTRY_DIALOG_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title"></property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">m_mainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">protected</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true">
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_text_entry_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_text_entry_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="center">wxBOTH</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ContentSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">public</property>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="name">WX_TEXT_ENTRY_DIALOG_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title"></property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_label</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="name">m_mainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">300,-1</property>
<property name="moveable">1</property>
<property name="name">m_textCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bSizer3</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choiceLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerContent</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_label</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">300,-1</property>
<property name="moveable">1</property>
<property name="name">m_textCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer3</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choiceLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">3</property>
<object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choice</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">3</property>
<object class="wxChoice" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choice</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="0">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
<property name="permission">protected</property>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="false">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
<property name="permission">protected</property>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>
+1 -2
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -44,7 +44,6 @@ class WX_TEXT_ENTRY_DIALOG_BASE : public DIALOG_SHIM
wxButton* m_sdbSizer1Cancel;
public:
wxBoxSizer* m_ContentSizer;
WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
@@ -18,7 +18,6 @@
*/
#include <algorithm>
#include <set>
#include <bitmaps.h>
#include <string_utils.h>
#include <dialogs/eda_reorderable_list_dialog.h>
-4
View File
@@ -26,13 +26,9 @@
#include <dialog_shim.h>
#include <git2.h>
#include <vector>
class wxCheckBox;
class wxTextCtrl;
class wxListCtrl;
class wxButton;
class DIALOG_GIT_COMMIT : public DIALOG_SHIM
{
public:
+4 -5
View File
@@ -45,7 +45,8 @@ DIALOG_GIT_REPOSITORY::DIALOG_GIT_REPOSITORY( wxWindow* aParent, git_repository*
m_tested( 0 ),
m_failedTest( false ),
m_testError( wxEmptyString ),
m_tempRepo( false )
m_tempRepo( false ),
m_repoType( KIGIT_COMMON::GIT_CONN_TYPE::GIT_CONN_LOCAL )
{
m_txtURL->SetFocus();
@@ -55,8 +56,7 @@ DIALOG_GIT_REPOSITORY::DIALOG_GIT_REPOSITORY( wxWindow* aParent, git_repository*
m_tempRepo = true;
m_tempPath = wxFileName::CreateTempFileName( "kicadtestrepo" );
git_repository_init_options options;
git_repository_init_init_options( &options, GIT_REPOSITORY_INIT_OPTIONS_VERSION );
git_repository_init_options options = GIT_REPOSITORY_INIT_OPTIONS_INIT;
options.flags = GIT_REPOSITORY_INIT_MKPATH | GIT_REPOSITORY_INIT_NO_REINIT;
git_repository_init_ext( &m_repository, m_tempPath.ToStdString().c_str(), &options );
}
@@ -260,8 +260,7 @@ void DIALOG_GIT_REPOSITORY::updateURLData()
void DIALOG_GIT_REPOSITORY::OnTestClick( wxCommandEvent& event )
{
git_remote* remote = nullptr;
git_remote_callbacks callbacks;
git_remote_init_callbacks( &callbacks, GIT_REMOTE_CALLBACKS_VERSION );
git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT;
// We track if we have already tried to connect.
// If we have, the server may come back to offer another connection
@@ -121,6 +121,8 @@ private:
bool m_tempRepo;
wxString m_tempPath;
KIGIT_COMMON::GIT_CONN_TYPE m_repoType;
};
#endif /* DIALOG_GIT_REPOSITORY_H_ */
-1
View File
@@ -29,7 +29,6 @@
#include <wx/listctrl.h>
#include <wx/event.h>
#include <wx/sizer.h>
#include <wx/timer.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
+1 -1
View File
@@ -26,12 +26,12 @@
#define DIALOG_GIT_SWITCH_H
#include <dialog_shim.h>
#include <wx/timer.h>
#include <git2.h>
class wxButton;
class wxListView;
class wxTextCtrl;
class wxTimer;
class wxListEvent;
struct BranchData
-1
View File
@@ -31,7 +31,6 @@
#include <wx/bmpbuttn.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/log.h>
PANEL_GIT_REPOS::PANEL_GIT_REPOS( wxWindow* aParent ) : PANEL_GIT_REPOS_BASE( aParent)
-1
View File
@@ -27,7 +27,6 @@
#include <eda_view_switcher_base.h>
class EDA_DRAW_FRAME;
class wxTimer;
/**
* Similar to EDA_VIEW_SWITCHER, this dialog is a popup that shows feedback when using a hotkey to
-2
View File
@@ -27,12 +27,10 @@
#include <settings/common_settings.h>
#include <settings/settings_manager.h>
#include <validators.h>
#include <widgets/ui_common.h>
#include <widgets/color_swatch.h>
#include <widgets/wx_panel.h>
#include <wx/msgdlg.h>
#include <wx/menu.h>
#include <wx/textdlg.h>
// Button ID starting point
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -396,7 +396,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
m_staticText9->Wrap( -1 );
m_staticText9->SetToolTip( _("How many backup files total to keep (set to 0 for no limit)") );
gbSizer3->Add( m_staticText9, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
gbSizer3->Add( m_staticText9, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_backupLimitTotalFiles = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
gbSizer3->Add( m_backupLimitTotalFiles, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
@@ -408,7 +408,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
gbSizer3->Add( m_staticText10, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
m_backupLimitDailyFiles = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
gbSizer3->Add( m_backupLimitDailyFiles, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
gbSizer3->Add( m_backupLimitDailyFiles, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_staticText11 = new wxStaticText( this, wxID_ANY, _("Minimum time between backups:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 );
@@ -427,7 +427,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
m_staticText16->Wrap( -1 );
m_staticText16->SetToolTip( _("If the total size of backup files grows above this limit, old backups will be deleted (set to 0 for no limit)") );
gbSizer3->Add( m_staticText16, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
gbSizer3->Add( m_staticText16, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_backupLimitTotalSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
gbSizer3->Add( m_backupLimitTotalSize, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
@@ -4036,7 +4036,7 @@
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="row">2</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="false">
@@ -4232,7 +4232,7 @@
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="row">3</property>
<property name="rowspan">1</property>
<object class="wxSpinCtrl" expanded="false">
@@ -4494,7 +4494,7 @@
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
<property name="row">5</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="false">
+1 -1
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
+1 -1
View File
@@ -22,12 +22,12 @@
*/
#include <bitmaps.h>
#include <confirm.h>
#include <wx/textdlg.h>
#include <dialogs/panel_grid_settings.h>
#include <dialogs/dialog_grid_settings.h>
#include <widgets/std_bitmap_button.h>
#include <common.h>
#include <confirm.h>
#include <settings/app_settings.h>
#include <eda_draw_frame.h>
#include <tool/tool_manager.h>
+1 -2
View File
@@ -23,12 +23,11 @@
*/
#include <wx/dcclient.h>
#include <wx/msgdlg.h>
#include <confirm.h>
#include <bitmap_base.h>
#include <pcb_base_edit_frame.h>
#include <tool/tool_manager.h>
#include <tool/actions.h>
#include <confirm.h>
#include <dialogs/panel_image_editor.h>
+126 -120
View File
@@ -29,6 +29,7 @@
#include <eda_draw_frame.h>
#include <bitmaps.h>
#include <netclass.h>
#include <confirm.h>
#include <gal/painter.h>
#include <grid_tricks.h>
#include <dialogs/panel_setup_netclasses.h>
@@ -42,7 +43,6 @@
#include <widgets/wx_panel.h>
#include <widgets/std_bitmap_button.h>
#include <project/net_settings.h>
#include <confirm.h>
// columns of netclasses grid
@@ -119,8 +119,6 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
m_splitter->SetMinimumPaneSize( FromDIP( m_splitter->GetMinimumPaneSize() ) );
wxASSERT( m_netclassGrid->GetNumberCols() == GRID_END );
// Calculate a min best size to handle longest usual numeric values:
int const min_best_width = m_netclassGrid->GetTextExtent( "555,555555 mils" ).x;
@@ -133,24 +131,36 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
int const weighted_min_best_width = ( i == GRID_LINESTYLE ) ? min_best_width * 3 / 2
: min_best_width;
m_netclassGrid->SetColMinimalWidth( i, min_width );
// We use a "best size" >= min_best_width
m_originalColWidths[ i ] = std::max( min_width, weighted_min_best_width );
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
if( i >= GRID_FIRST_EESCHEMA )
m_netclassGrid->SetUnitsProvider( m_schUnitsProvider.get(), i );
else
m_netclassGrid->SetUnitsProvider( m_pcbUnitsProvider.get(), i );
}
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
for( int i = GRID_FIRST_PCBNEW; i < GRID_END; ++i )
{
if( i >= GRID_FIRST_EESCHEMA )
{
m_netclassGrid->SetUnitsProvider( m_schUnitsProvider.get(), i );
if( m_isEEschema )
m_netclassGrid->ShowHideColumns( cfg->m_NetclassPanel.eeschema_visible_columns );
else
m_netclassGrid->ShowHideColumns( cfg->m_NetclassPanel.pcbnew_visible_columns );
if( !m_isEEschema )
{
m_netclassGrid->HideCol( i );
m_originalColWidths[ i ] = 0;
}
}
else
{
m_netclassGrid->SetUnitsProvider( m_pcbUnitsProvider.get(), i );
m_shownColumns = m_netclassGrid->GetShownColumns();
if( m_isEEschema )
{
m_netclassGrid->HideCol( i );
m_originalColWidths[ i ] = 0;
}
}
}
wxGridCellAttr* attr = new wxGridCellAttr;
attr->SetRenderer( new GRID_CELL_COLOR_RENDERER( PAGED_DIALOG::GetDialog( this ) ) );
@@ -160,8 +170,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
attr = new wxGridCellAttr;
attr->SetRenderer( new GRID_CELL_COLOR_RENDERER( PAGED_DIALOG::GetDialog( this ) ) );
attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ),
m_netclassGrid ) );
attr->SetEditor(
new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ), m_netclassGrid ) );
m_netclassGrid->SetColAttr( GRID_PCB_COLOR, attr );
attr = new wxGridCellAttr;
@@ -208,6 +218,7 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
m_netclassGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
m_assignmentGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
m_splitter->SetSashPosition( cfg->m_NetclassPanel.sash_pos );
m_addButton->SetBitmap( KiBitmapBundle( BITMAPS::small_plus ) );
@@ -256,11 +267,6 @@ PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES()
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
cfg->m_NetclassPanel.sash_pos = m_splitter->GetSashPosition();
if( m_isEEschema )
cfg->m_NetclassPanel.eeschema_visible_columns = m_netclassGrid->GetShownColumnsAsString();
else
cfg->m_NetclassPanel.pcbnew_visible_columns = m_netclassGrid->GetShownColumnsAsString();
// Delete the GRID_TRICKS.
m_netclassGrid->PopEventHandler( true );
m_assignmentGrid->PopEventHandler( true );
@@ -276,7 +282,6 @@ PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES()
void PANEL_SETUP_NETCLASSES::loadNetclasses()
{
KIGFX::PCB_RENDER_SETTINGS* rs = nullptr;
if( !m_isEEschema )
{
rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
@@ -285,53 +290,55 @@ void PANEL_SETUP_NETCLASSES::loadNetclasses()
int row = 0;
auto netclassToGridRow =
[&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
auto netclassToGridRow = [&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
{
m_netclassGrid->SetCellValue( aRow, GRID_NAME, nc->GetName() );
m_netclassGrid->SetUnitValue( aRow, GRID_WIREWIDTH, nc->GetWireWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_BUSWIDTH, nc->GetBusWidth() );
wxString colorAsString = nc->GetSchematicColor().ToCSSString();
m_netclassGrid->SetCellValue( aRow, GRID_SCHEMATIC_COLOR, colorAsString );
int lineStyleIdx = std::max( 0, nc->GetLineStyle() );
if( lineStyleIdx >= (int) g_lineStyleNames.size() )
lineStyleIdx = 0;
m_netclassGrid->SetCellValue( aRow, GRID_LINESTYLE, g_lineStyleNames[lineStyleIdx] );
m_netclassGrid->SetUnitValue( aRow, GRID_CLEARANCE, nc->GetClearance() );
m_netclassGrid->SetUnitValue( aRow, GRID_TRACKSIZE, nc->GetTrackWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_VIASIZE, nc->GetViaDiameter() );
m_netclassGrid->SetUnitValue( aRow, GRID_VIADRILL, nc->GetViaDrill() );
m_netclassGrid->SetUnitValue( aRow, GRID_uVIASIZE, nc->GetuViaDiameter() );
m_netclassGrid->SetUnitValue( aRow, GRID_uVIADRILL, nc->GetuViaDrill() );
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH, nc->GetDiffPairWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_GAP, nc->GetDiffPairGap() );
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
if( m_isEEschema )
{
colorAsString = nc->GetPcbColor().ToCSSString();
}
if( rs )
{
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
if( netclassColors.find( nc->GetName() ) != netclassColors.end() )
{
m_netclassGrid->SetCellValue( aRow, GRID_NAME, nc->GetName() );
colorAsString = netclassColors[nc->GetName()].ToCSSString();
}
}
m_netclassGrid->SetUnitValue( aRow, GRID_WIREWIDTH, nc->GetWireWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_BUSWIDTH, nc->GetBusWidth() );
if( isDefault )
{
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
m_netclassGrid->SetReadOnly( aRow, GRID_PCB_COLOR );
}
wxString colorAsString = nc->GetSchematicColor().ToCSSString();
m_netclassGrid->SetCellValue( aRow, GRID_SCHEMATIC_COLOR, colorAsString );
int lineStyleIdx = std::max( 0, nc->GetLineStyle() );
if( lineStyleIdx >= (int) g_lineStyleNames.size() )
lineStyleIdx = 0;
m_netclassGrid->SetCellValue( aRow, GRID_LINESTYLE, g_lineStyleNames[lineStyleIdx] );
m_netclassGrid->SetUnitValue( aRow, GRID_CLEARANCE, nc->GetClearance() );
m_netclassGrid->SetUnitValue( aRow, GRID_TRACKSIZE, nc->GetTrackWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_VIASIZE, nc->GetViaDiameter() );
m_netclassGrid->SetUnitValue( aRow, GRID_VIADRILL, nc->GetViaDrill() );
m_netclassGrid->SetUnitValue( aRow, GRID_uVIASIZE, nc->GetuViaDiameter() );
m_netclassGrid->SetUnitValue( aRow, GRID_uVIADRILL, nc->GetuViaDrill() );
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH, nc->GetDiffPairWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_GAP, nc->GetDiffPairGap() );
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
if( m_isEEschema )
colorAsString = nc->GetPcbColor().ToCSSString();
if( rs )
{
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
if( netclassColors.find( nc->GetName() ) != netclassColors.end() )
colorAsString = netclassColors[nc->GetName()].ToCSSString();
}
if( isDefault )
{
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
m_netclassGrid->SetReadOnly( aRow, GRID_PCB_COLOR );
}
m_netclassGrid->SetCellValue( aRow, GRID_PCB_COLOR, colorAsString );
};
m_netclassGrid->SetCellValue( aRow, GRID_PCB_COLOR, colorAsString );
};
m_netclassGrid->ClearRows();
@@ -437,51 +444,56 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
int row = 0;
auto gridRowToNetclass =
[&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
auto gridRowToNetclass = [&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
{
nc->SetName( m_netclassGrid->GetCellValue( aRow, GRID_NAME ) );
nc->SetWireWidth( m_netclassGrid->GetUnitValue( aRow, GRID_WIREWIDTH ) );
nc->SetBusWidth( m_netclassGrid->GetUnitValue( aRow, GRID_BUSWIDTH ) );
wxString color = m_netclassGrid->GetCellValue( aRow, GRID_SCHEMATIC_COLOR );
nc->SetSchematicColor( wxColour( color ) );
wxString lineStyle = m_netclassGrid->GetCellValue( aRow, GRID_LINESTYLE );
nc->SetLineStyle( g_lineStyleNames.Index( lineStyle ) );
wxASSERT_MSG( nc->GetLineStyle() >= 0, "Line style name not found." );
nc->SetClearance( m_netclassGrid->GetUnitValue( aRow, GRID_CLEARANCE ) );
nc->SetTrackWidth( m_netclassGrid->GetUnitValue( aRow, GRID_TRACKSIZE ) );
nc->SetViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_VIASIZE ) );
nc->SetViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_VIADRILL ) );
nc->SetuViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_uVIASIZE ) );
nc->SetuViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_uVIADRILL ) );
nc->SetDiffPairWidth( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH ) );
nc->SetDiffPairGap( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_GAP ) );
if( !isDefault )
{
color = m_netclassGrid->GetCellValue( aRow, GRID_PCB_COLOR );
KIGFX::COLOR4D newPcbColor( color );
if( newPcbColor != KIGFX::COLOR4D::UNSPECIFIED )
{
nc->SetName( m_netclassGrid->GetCellValue( aRow, GRID_NAME ) );
nc->SetPcbColor( newPcbColor );
}
nc->SetWireWidth( m_netclassGrid->GetUnitValue( aRow, GRID_WIREWIDTH ) );
nc->SetBusWidth( m_netclassGrid->GetUnitValue( aRow, GRID_BUSWIDTH ) );
if( !m_isEEschema )
{
KIGFX::PCB_RENDER_SETTINGS* rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
m_frame->GetCanvas()->GetView()->GetPainter()->GetSettings() );
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
wxString color = m_netclassGrid->GetCellValue( aRow, GRID_SCHEMATIC_COLOR );
nc->SetSchematicColor( wxColour( color ) );
wxString lineStyle = m_netclassGrid->GetCellValue( aRow, GRID_LINESTYLE );
nc->SetLineStyle( g_lineStyleNames.Index( lineStyle ) );
wxASSERT_MSG( nc->GetLineStyle() >= 0, "Line style name not found." );
nc->SetClearance( m_netclassGrid->GetUnitValue( aRow, GRID_CLEARANCE ) );
nc->SetTrackWidth( m_netclassGrid->GetUnitValue( aRow, GRID_TRACKSIZE ) );
nc->SetViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_VIASIZE ) );
nc->SetViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_VIADRILL ) );
nc->SetuViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_uVIASIZE ) );
nc->SetuViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_uVIADRILL ) );
nc->SetDiffPairWidth( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH ) );
nc->SetDiffPairGap( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_GAP ) );
if( !isDefault )
if( newPcbColor != COLOR4D::UNSPECIFIED )
{
color = m_netclassGrid->GetCellValue( aRow, GRID_PCB_COLOR );
KIGFX::COLOR4D newPcbColor( color );
if( newPcbColor != KIGFX::COLOR4D::UNSPECIFIED )
nc->SetPcbColor( newPcbColor );
if( !m_isEEschema )
{
KIGFX::PCB_RENDER_SETTINGS* rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
m_frame->GetCanvas()->GetView()->GetPainter()->GetSettings() );
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
if( newPcbColor != COLOR4D::UNSPECIFIED )
netclassColors[nc->GetName()] = newPcbColor;
else
netclassColors.erase( nc->GetName() );
}
netclassColors[nc->GetName()] = newPcbColor;
}
};
else
{
netclassColors.erase( nc->GetName() );
}
}
}
};
m_netSettings->m_NetClasses.clear();
@@ -504,10 +516,13 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
wxString netclass = m_assignmentGrid->GetCellValue( row, 1 );
m_netSettings->m_NetClassPatternAssignments.push_back(
{ std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ), netclass } );
}
{
std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ),
netclass
} );
m_netSettings->m_NetClassPatternAssignmentCache.clear();
m_netSettings->m_NetClassPatternAssignmentCache.clear();
}
return true;
}
@@ -692,11 +707,8 @@ void PANEL_SETUP_NETCLASSES::AdjustNetclassGridColumns( int aWidth )
for( int i = 1; i < m_netclassGrid->GetNumberCols(); i++ )
{
if( m_netclassGrid->GetColSize( i ) > 0 )
{
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
aWidth -= m_originalColWidths[ i ];
}
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
aWidth -= m_originalColWidths[ i ];
}
m_netclassGrid->SetColSize( 0, std::max( aWidth - 2, m_originalColWidths[ 0 ] ) );
@@ -794,12 +806,6 @@ void PANEL_SETUP_NETCLASSES::OnUpdateUI( wxUpdateUIEvent& event )
m_netclassesDirty = false;
}
if( m_shownColumns != m_netclassGrid->GetShownColumns() )
{
AdjustNetclassGridColumns( GetSize().x - 1 );
m_shownColumns = m_netclassGrid->GetShownColumns();
}
if( m_assignmentGrid->GetNumberRows() == 0 )
return;
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.1.0-3-g43bf300c)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -89,17 +89,16 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi
m_removeButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
buttonBoxSizer->Add( m_removeButton, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
buttonBoxSizer->Add( 60, 0, 1, wxEXPAND, 5 );
m_colorDefaultHelpText = new wxStaticText( m_netclassesPane, wxID_ANY, _("Set color to transparent to use KiCad default color."), wxDefaultPosition, wxDefaultSize, 0 );
m_colorDefaultHelpText->Wrap( -1 );
buttonBoxSizer->Add( m_colorDefaultHelpText, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
m_importColorsButton = new wxButton( m_netclassesPane, wxID_ANY, _("Import colors from schematic"), wxDefaultPosition, wxDefaultSize, 0 );
m_importColorsButton = new wxButton( m_netclassesPane, wxID_ANY, _("Import colors from schematic") );
buttonBoxSizer->Add( m_importColorsButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
bUpperSizer->Add( buttonBoxSizer, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.1.0-3-g43bf300c)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -48,8 +48,8 @@ class PANEL_SETUP_NETCLASSES_BASE : public wxPanel
WX_GRID* m_netclassGrid;
STD_BITMAP_BUTTON* m_addButton;
STD_BITMAP_BUTTON* m_removeButton;
wxStaticText* m_colorDefaultHelpText;
wxButton* m_importColorsButton;
wxStaticText* m_colorDefaultHelpText;
WX_PANEL* m_membershipPane;
wxStaticText* m_staticText5;
WX_GRID* m_assignmentGrid;
@@ -27,7 +27,6 @@
#include <dialogs/panel_setup_severities.h>
#include <wx/radiobut.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include "confirm.h"
+5 -6
View File
@@ -51,7 +51,7 @@ const wxChar* const traceHiDpi = wxT( "KICAD_TRACE_HIGH_DPI" );
static std::optional<double> getKiCadConfiguredScale( const COMMON_SETTINGS& aConfig )
{
std::optional<double> scale;
double canvas_scale = aConfig.m_Appearance.canvas_scale;
double canvas_scale = aConfig.m_Appearance.canvas_scale;
if( canvas_scale > 0.0 )
{
@@ -70,8 +70,8 @@ static std::optional<double> getKiCadConfiguredScale( const COMMON_SETTINGS& aCo
*/
static std::optional<double> getEnvironmentScale()
{
const wxPortId port_id = wxPlatformInfo::Get().GetPortId();
std::optional<double> scale;
const wxPortId port_id = wxPlatformInfo::Get().GetPortId();
std::optional<double> scale;
if( port_id == wxPORT_GTK )
{
@@ -83,9 +83,8 @@ static std::optional<double> getEnvironmentScale()
}
DPI_SCALING_COMMON::DPI_SCALING_COMMON( COMMON_SETTINGS* aConfig, const wxWindow* aWindow ) :
m_config( aConfig ),
m_window( aWindow )
DPI_SCALING_COMMON::DPI_SCALING_COMMON( COMMON_SETTINGS* aConfig, const wxWindow* aWindow )
: m_config( aConfig ), m_window( aWindow )
{
}
+21 -39
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013-2017 CERN
* Copyright (C) 2013-2024, 2024 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2013-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* @author Maciej Suminski <maciej.suminski@cern.ch>
@@ -24,6 +24,7 @@
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <confirm.h>
#include <eda_draw_frame.h>
#include <kiface_base.h>
#include <macros.h>
@@ -53,16 +54,6 @@
#include <core/profile.h>
#include <pgm_base.h>
#include <confirm.h>
/**
* Flag to enable drawing panel debugging output.
*
* @ingroup trace_env_vars
*/
static const wxChar traceDrawPanel[] = wxT( "KICAD_DRAW_PANEL" );
EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId,
const wxPoint& aPosition, const wxSize& aSize,
@@ -186,7 +177,6 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL()
void EDA_DRAW_PANEL_GAL::SetFocus()
{
KIPLATFORM::UI::ImeNotifyCancelComposition( this );
wxScrolledCanvas::SetFocus();
m_lostFocus = false;
}
@@ -246,7 +236,6 @@ bool EDA_DRAW_PANEL_GAL::DoRePaint()
bool isDirty = false;
cntTotal.Start();
try
{
cntUpd.Start();
@@ -259,7 +248,9 @@ bool EDA_DRAW_PANEL_GAL::DoRePaint()
{
// Don't do anything here but don't fail
// This can happen when we don't catch `at()` calls
wxLogTrace( traceDrawPanel, wxS( "Out of Range error: %s" ), err.what() );
wxString msg;
msg.Printf( wxT( "Out of Range error: %s" ), err.what() );
wxLogDebug( msg );
}
cntUpd.Stop();
@@ -281,10 +272,20 @@ bool EDA_DRAW_PANEL_GAL::DoRePaint()
m_gal->SetGridColor( settings->GetGridColor() );
m_gal->SetCursorColor( settings->GetCursorColor() );
m_gal->ClearScreen();
// TODO: find why ClearScreen() must be called here in opengl mode
// and only if m_view->IsDirty() in Cairo mode to avoid display artifacts
// when moving the mouse cursor
if( m_backend == GAL_TYPE_OPENGL )
m_gal->ClearScreen();
if( m_view->IsDirty() )
{
if( m_backend != GAL_TYPE_OPENGL // Already called in opengl
&& m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
{
m_gal->ClearScreen();
}
m_view->ClearTargets();
// Grid has to be redrawn only when the NONCACHED target is redrawn
@@ -381,16 +382,10 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent )
}
void EDA_DRAW_PANEL_GAL::RequestRefresh()
{
m_needIdleRefresh = true;
}
void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect )
{
if( !DoRePaint() )
RequestRefresh();
m_needIdleRefresh = true;
}
@@ -594,7 +589,7 @@ void EDA_DRAW_PANEL_GAL::OnEvent( wxEvent& aEvent )
if( endDelta > timeLimit )
Refresh();
else
RequestRefresh();
m_needIdleRefresh = true;
}
@@ -653,21 +648,8 @@ void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent )
void EDA_DRAW_PANEL_GAL::SetCurrentCursor( KICURSOR aCursor )
{
if( !m_gal )
return;
DPI_SCALING_COMMON dpi( nullptr, m_parent );
bool hidpi = false;
// Cursor scaling factor cannot be set for a wxCursor on GTK and OSX (at least before wx 3.3),
// resulting in 4x rendered size on 2x window scale.
// MSW renders the bitmap as-is, without scaling, so this works here.
#ifdef __WXMSW__
hidpi = dpi.GetContentScaleFactor() >= 2.0;
#endif
m_gal->SetNativeCursorStyle( aCursor, hidpi );
if( m_gal )
m_gal->SetNativeCursorStyle( aCursor );
}
@@ -715,4 +697,4 @@ KIGFX::VC_SETTINGS EDA_DRAW_PANEL_GAL::GetVcSettings()
vcSettings.m_scrollReversePanH = cfg->m_Input.reverse_scroll_pan_h;
return vcSettings;
}
}
-29
View File
@@ -681,35 +681,6 @@ void DS_DATA_ITEM_TEXT::SetConstrainedTextSize()
if( m_ConstrainedTextSize.y == 0 )
m_ConstrainedTextSize.y = DS_DATA_MODEL::GetTheInstance().m_DefaultTextSize.y;
if( m_BoundingBoxSize.x > 0 || m_BoundingBoxSize.y > 0 )
{
// to know the X and Y size of the line, we should use EDA_TEXT::GetTextBox()
// but this function uses integers
// So, to avoid truncations with our unit in mm, use microns.
VECTOR2I size_micron;
#define FSCALE 1000.0
int linewidth = 0;
size_micron.x = KiROUND( m_ConstrainedTextSize.x * FSCALE );
size_micron.y = KiROUND( m_ConstrainedTextSize.y * FSCALE );
DS_DRAW_ITEM_TEXT dummy( unityScale, this, 0, m_FullText, VECTOR2I( 0, 0 ), size_micron,
linewidth, m_Font, m_Italic, m_Bold, m_TextColor );
dummy.SetMultilineAllowed( true );
dummy.SetHorizJustify( m_Hjustify ) ;
dummy.SetVertJustify( m_Vjustify );
dummy.SetTextAngle( EDA_ANGLE( m_Orient, DEGREES_T ) );
BOX2I rect = dummy.GetTextBox();
VECTOR2D size;
size.x = KiROUND( (int) rect.GetWidth() / FSCALE );
size.y = KiROUND( (int) rect.GetHeight() / FSCALE );
if( m_BoundingBoxSize.x > 0 && size.x > m_BoundingBoxSize.x )
m_ConstrainedTextSize.x *= m_BoundingBoxSize.x / size.x;
if( m_BoundingBoxSize.y > 0 && size.y > m_BoundingBoxSize.y )
m_ConstrainedTextSize.y *= m_BoundingBoxSize.y / size.y;
}
}
+9 -12
View File
@@ -191,14 +191,14 @@ const BOX2I DS_DRAW_ITEM_TEXT::GetApproxBBox()
const wxString text = GetShownText( true );
BOX2I bbox( GetTextPos() );
bbox.SetWidth( KiROUND( (int) text.length() * attrs.m_Size.x * 1.3 ) );
bbox.SetWidth( (int) text.length() * attrs.m_Size.x * 1.3 );
bbox.SetHeight( attrs.m_Size.y );
switch( attrs.m_Halign )
{
case GR_TEXT_H_ALIGN_LEFT: break;
case GR_TEXT_H_ALIGN_CENTER: bbox.Offset( - (int) bbox.GetWidth() / 2, 0 ); break;
case GR_TEXT_H_ALIGN_RIGHT: bbox.Offset( - (int) bbox.GetWidth(), 0 ); break;
case GR_TEXT_H_ALIGN_LEFT: break;
case GR_TEXT_H_ALIGN_CENTER: bbox.Offset( -bbox.GetWidth() / 2, 0 ); break;
case GR_TEXT_H_ALIGN_RIGHT: bbox.Offset( -bbox.GetWidth(), 0 ); break;
case GR_TEXT_H_ALIGN_INDETERMINATE:
wxFAIL_MSG( wxT( "Indeterminate state legal only in dialogs." ) );
break;
@@ -206,9 +206,9 @@ const BOX2I DS_DRAW_ITEM_TEXT::GetApproxBBox()
switch( GetAttributes().m_Valign )
{
case GR_TEXT_V_ALIGN_TOP: break;
case GR_TEXT_V_ALIGN_CENTER: bbox.Offset( 0, - (int) bbox.GetHeight() / 2 ); break;
case GR_TEXT_V_ALIGN_BOTTOM: bbox.Offset( 0, - (int) bbox.GetHeight() ); break;
case GR_TEXT_V_ALIGN_TOP: break;
case GR_TEXT_V_ALIGN_CENTER: bbox.Offset( 0, -bbox.GetHeight() / 2 ); break;
case GR_TEXT_V_ALIGN_BOTTOM: bbox.Offset( 0, -bbox.GetHeight() ); break;
case GR_TEXT_V_ALIGN_INDETERMINATE:
wxFAIL_MSG( wxT( "Indeterminate state legal only in dialogs." ) );
break;
@@ -265,7 +265,7 @@ void DS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem( const RENDER_SETTINGS* aSettings,
outline.CPoint( ii ).y + aOffset.y );
}
GRPoly( DC, (int) points_moved.size(), &points_moved[0], true, penWidth, color, color );
GRPoly( DC, points_moved.size(), &points_moved[0], true, penWidth, color, color );
}
}
@@ -371,21 +371,18 @@ bool DS_DRAW_ITEM_RECT::HitTest( const VECTOR2I& aPosition, int aAccuracy ) cons
// Right line
start = end;
end.y = GetEnd().y;
if( TestSegmentHit( aPosition, start, end, dist ) )
return true;
// lower line
start = end;
end.x = GetStart().x;
if( TestSegmentHit( aPosition, start, end, dist ) )
return true;
// left line
start = end;
end = GetStart();
if( TestSegmentHit( aPosition, start, end, dist ) )
return true;
@@ -467,7 +464,7 @@ bool DS_DRAW_ITEM_LINE::HitTest( const VECTOR2I& aPosition, int aAccuracy ) cons
wxString DS_DRAW_ITEM_LINE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Line, length %s" ),
aUnitsProvider->MessageTextFromValue( GetStart().Distance( GetEnd() ) ) );
aUnitsProvider->MessageTextFromValue( EuclideanNorm( GetStart() - GetEnd() ) ) );
}
+1 -1
View File
@@ -104,7 +104,7 @@ void DS_PROXY_VIEW_ITEM::ViewDraw( int aLayer, VIEW* aView ) const
buildDrawList( aView, m_properties, &drawList );
BOX2I viewport = BOX2ISafe( aView->GetViewport() );
BOX2I viewport( aView->GetViewport().GetOrigin(), aView->GetViewport().GetSize() );
// Draw the title block normally even if the view is flipped
bool flipped = gal->IsFlippedX();
+1 -4
View File
@@ -24,8 +24,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <eda_base_frame.h>
#include <advanced_config.h>
#include <bitmaps.h>
#include <bitmap_store.h>
@@ -68,7 +66,6 @@
#include <wx/display.h>
#include <wx/stdpaths.h>
#include <wx/string.h>
#include <wx/msgdlg.h>
#include <kiplatform/app.h>
#include <kiplatform/io.h>
#include <kiplatform/ui.h>
@@ -1611,7 +1608,7 @@ void EDA_BASE_FRAME::onIconize( wxIconizeEvent& aEvent )
}
#ifdef __WXMSW__
#ifdef _WIN32
WXLRESULT EDA_BASE_FRAME::MSWWindowProc( WXUINT message, WXWPARAM wParam, WXLPARAM lParam )
{
// This will help avoid the menu keeping focus when the alt key is released
+18 -8
View File
@@ -28,11 +28,10 @@
#include <gestfich.h>
#include <settings/common_settings.h>
#include <wx/filedlg.h>
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/mimetype.h>
#include <wx/filename.h>
#include <wx/uri.h>
#include <wx/filedlg.h>
// Mime type extensions (PDF files are not considered here)
@@ -66,16 +65,27 @@ bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT
wxString command;
bool success = false;
// Is an internet url
static const std::vector<wxString> url_header =
{
wxT( "http:" ),
wxT( "https:" ),
wxT( "ftp:" ),
wxT( "www." ),
wxT( "file:" )
};
// Replace before resolving as we might have a URL in a variable
docname = ResolveUriByEnvVars( aDocName, aProject );
// We don't want the wx error message about not being able to open the URI
for( const wxString& proc : url_header)
{
wxURI uri( docname );
wxLogNull logNo; // Disable log messages
if( uri.HasScheme() && wxLaunchDefaultBrowser( docname ) )
if( docname.StartsWith( proc ) ) // looks like an internet url
{
wxURI uri( docname );
wxLaunchDefaultBrowser( uri.BuildURI() );
return true;
}
}
#ifdef __WINDOWS__
+45 -56
View File
@@ -61,7 +61,6 @@
#include <trace_helpers.h>
#include <view/view.h>
#include <drawing_sheet/ds_draw_item.h>
#include <view/view_controls.h>
#include <widgets/msgpanel.h>
#include <widgets/properties_panel.h>
#include <widgets/net_inspector_panel.h>
@@ -118,6 +117,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
m_drawBgColor = COLOR4D( BLACK ); // the background color of the draw canvas:
// BLACK for Pcbnew, BLACK or WHITE for Eeschema
m_colorSettings = nullptr;
m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight( this );
m_polarCoords = false;
m_findReplaceData = std::make_unique<EDA_SEARCH_DATA>();
m_hotkeyPopup = nullptr;
@@ -132,29 +132,61 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
{
CreateStatusBar( 8 )->SetDoubleBuffered( true );
GetStatusBar()->SetFont( KIUI::GetStatusFont( this ) );
// set the size of the status bar subwindows:
// set the size of the status bar subwindows:
updateStatusBarWidths();
wxWindow* stsbar = GetStatusBar();
int spacer = KIUI::GetTextSize( wxT( "M" ), stsbar ).x * 2;
int dims[] =
{
// remainder of status bar on far left is set to a default or whatever is left over.
-1,
// When using GetTextSize() remember the width of character '1' is not the same
// as the width of '0' unless the font is fixed width, and it usually won't be.
// zoom:
KIUI::GetTextSize( wxT( "Z 762000" ), stsbar ).x,
// cursor coords
KIUI::GetTextSize( wxT( "X 1234.1234 Y 1234.1234" ), stsbar ).x,
// delta distances
KIUI::GetTextSize( wxT( "dx 1234.1234 dy 1234.1234 dist 1234.1234" ), stsbar ).x,
// grid size
KIUI::GetTextSize( wxT( "grid X 1234.1234 Y 1234.1234" ), stsbar ).x,
// units display, Inches is bigger than mm
KIUI::GetTextSize( _( "Inches" ), stsbar ).x,
// Size for the "Current Tool" panel; longest string from SetTool()
KIUI::GetTextSize( wxT( "Add layer alignment target" ), stsbar ).x,
// constraint mode
KIUI::GetTextSize( _( "Constrain to H, V, 45" ), stsbar ).x
};
for( size_t ii = 1; ii < arrayDim( dims ); ii++ )
dims[ii] += spacer;
SetStatusWidths( arrayDim( dims ), dims );
stsbar->SetFont( KIUI::GetStatusFont( this ) );
}
m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_frameSize.y ), wxDefaultSize );
m_messagePanel->SetBackgroundColour( COLOR4D( LIGHTGRAY ).ToColour() );
m_msgFrameHeight = m_messagePanel->GetBestSize().y;
// Create child subwindows.
GetClientSize( &m_frameSize.x, &m_frameSize.y );
m_framePos.x = m_framePos.y = 0;
m_frameSize.y -= m_msgFrameHeight;
m_messagePanel->SetSize( m_frameSize.x, m_msgFrameHeight );
m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_frameSize.y ),
wxSize( m_frameSize.x, m_msgFrameHeight ) );
m_messagePanel->SetBackgroundColour( COLOR4D( LIGHTGRAY ).ToColour() );
Bind( wxEVT_DPI_CHANGED,
[&]( wxDPIChangedEvent& )
{
if( ( GetWindowStyle() & wxFRAME_NO_TASKBAR ) == 0 )
updateStatusBarWidths();
wxMoveEvent dummy;
OnMove( dummy );
@@ -162,13 +194,11 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
// especially important even for first launches as the constructor of the window
// here usually doesn't have the correct dpi awareness yet
m_frameSize.y += m_msgFrameHeight;
m_msgFrameHeight = m_messagePanel->GetBestSize().y;
m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight( this );
m_frameSize.y -= m_msgFrameHeight;
m_messagePanel->SetPosition( wxPoint( 0, m_frameSize.y ) );
m_messagePanel->SetSize( m_frameSize.x, m_msgFrameHeight );
// Don't skip, otherwise the frame gets too big
} );
}
@@ -657,47 +687,6 @@ void EDA_DRAW_FRAME::OnSize( wxSizeEvent& SizeEv )
}
void EDA_DRAW_FRAME::updateStatusBarWidths()
{
wxWindow* stsbar = GetStatusBar();
int spacer = KIUI::GetTextSize( wxT( "M" ), stsbar ).x * 2;
int dims[] = {
// remainder of status bar on far left is set to a default or whatever is left over.
-1,
// When using GetTextSize() remember the width of character '1' is not the same
// as the width of '0' unless the font is fixed width, and it usually won't be.
// zoom:
KIUI::GetTextSize( wxT( "Z 762000" ), stsbar ).x,
// cursor coords
KIUI::GetTextSize( wxT( "X 1234.1234 Y 1234.1234" ), stsbar ).x,
// delta distances
KIUI::GetTextSize( wxT( "dx 1234.1234 dy 1234.1234 dist 1234.1234" ), stsbar ).x,
// grid size
KIUI::GetTextSize( wxT( "grid X 1234.1234 Y 1234.1234" ), stsbar ).x,
// units display, Inches is bigger than mm
KIUI::GetTextSize( _( "Inches" ), stsbar ).x,
// Size for the "Current Tool" panel; longest string from SetTool()
KIUI::GetTextSize( wxT( "Add layer alignment target" ), stsbar ).x,
// constraint mode
KIUI::GetTextSize( _( "Constrain to H, V, 45" ), stsbar ).x
};
for( size_t ii = 1; ii < arrayDim( dims ); ii++ )
dims[ii] += spacer;
SetStatusWidths( arrayDim( dims ), dims );
}
void EDA_DRAW_FRAME::UpdateStatusBar()
{
SetStatusText( GetZoomLevelIndicator(), 1 );
-1
View File
@@ -374,7 +374,6 @@ static struct EDA_ITEM_DESC
.Map( SCH_LINE_T, _HKI( "Line" ) )
.Map( SCH_BITMAP_T, _HKI( "Bitmap" ) )
.Map( SCH_SHAPE_T, _HKI( "Graphic" ) )
.Map( SCH_RULE_AREA_T, _HKI( "Rule Area" ) )
.Map( SCH_TEXT_T, _HKI( "Text" ) )
.Map( SCH_TEXTBOX_T, _HKI( "Text Box" ) )
.Map( SCH_TABLE_T, _HKI( "Table" ) )
-6
View File
@@ -401,12 +401,6 @@ EDA_COMBINED_MATCHER::EDA_COMBINED_MATCHER( const wxString& aPattern,
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_SUBSTR>() );
break;
case CTX_NET:
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_REGEX>() );
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_WILDCARD>() );
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_SUBSTR>() );
break;
case CTX_NETCLASS:
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_REGEX_ANCHORED>() );
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_WILDCARD_ANCHORED>() );
+33 -78
View File
@@ -25,8 +25,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <eda_shape.h>
#include <bezier_curves.h>
#include <convert_basic_shapes_to_polygon.h>
#include <eda_draw_frame.h>
@@ -35,7 +33,7 @@
#include <geometry/shape_circle.h>
#include <macros.h>
#include <math/util.h> // for KiROUND
#include <eda_item.h>
#include <eda_shape.h>
#include <plotters/plotter.h>
@@ -128,12 +126,12 @@ double EDA_SHAPE::GetLength() const
{
case SHAPE_T::BEZIER:
for( size_t ii = 1; ii < m_bezierPoints.size(); ++ii )
length += m_bezierPoints[ ii - 1].Distance( m_bezierPoints[ii] );
length += GetLineLength( m_bezierPoints[ ii - 1], m_bezierPoints[ii] );
return length;
case SHAPE_T::SEGMENT:
return GetStart().Distance( GetEnd() );
return GetLineLength( GetStart(), GetEnd() );
case SHAPE_T::POLY:
for( int ii = 0; ii < m_poly.COutline( 0 ).SegmentCount(); ii++ )
@@ -185,32 +183,6 @@ void EDA_SHAPE::SetLength( const double& aLength )
}
}
void EDA_SHAPE::SetRectangleHeight( const int& aHeight )
{
switch ( m_shape )
{
case SHAPE_T::RECTANGLE:
m_rectangleHeight = aHeight;
SetEndY( GetStartY() + m_rectangleHeight );
break;
default: UNIMPLEMENTED_FOR( SHAPE_T_asString() );
}
}
void EDA_SHAPE::SetRectangleWidth( const int& aWidth )
{
switch ( m_shape )
{
case SHAPE_T::RECTANGLE:
m_rectangleWidth = aWidth;
SetEndX( GetStartX() + m_rectangleWidth );
break;
default: UNIMPLEMENTED_FOR( SHAPE_T_asString() );
}
}
void EDA_SHAPE::SetRectangle( const long long int& aHeight, const long long int& aWidth )
{
switch ( m_shape )
@@ -623,11 +595,11 @@ int EDA_SHAPE::GetRadius() const
switch( m_shape )
{
case SHAPE_T::ARC:
radius = m_arcCenter.Distance( m_start );
radius = GetLineLength( m_arcCenter, m_start );
break;
case SHAPE_T::CIRCLE:
radius = m_start.Distance( m_end );
radius = GetLineLength( m_start, m_end );
break;
default:
@@ -796,7 +768,7 @@ void EDA_SHAPE::ShapeGetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PA
case SHAPE_T::SEGMENT:
{
aList.emplace_back( _( "Length" ),
aFrame->MessageTextFromValue( GetStart().Distance( GetEnd() ) ));
aFrame->MessageTextFromValue( GetLineLength( GetStart(), GetEnd() ) ));
// angle counter-clockwise from 3'o-clock
EDA_ANGLE angle( atan2( (double)( GetStart().y - GetEnd().y ),
@@ -869,19 +841,21 @@ const BOX2I EDA_SHAPE::getBoundingBox() const
bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
{
double maxdist = aAccuracy;
int maxdist = aAccuracy;
if( GetWidth() > 0 )
maxdist += GetWidth() / 2.0;
maxdist += GetWidth() / 2;
switch( m_shape )
{
case SHAPE_T::CIRCLE:
{
double radius = GetRadius();
double dist = aPosition.Distance( getCenter() );
int radius = GetRadius();
if( IsFilledForHitTesting() )
VECTOR2I::extended_type dist = KiROUND<double, VECTOR2I::extended_type>(
EuclideanNorm( aPosition - getCenter() ) );
if( IsFilled() )
return dist <= radius + maxdist; // Filled circle hit-test
else
return abs( radius - dist ) <= maxdist; // Ring hit-test
@@ -889,17 +863,19 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
case SHAPE_T::ARC:
{
if( aPosition.Distance( m_start ) <= maxdist )
if( EuclideanNorm( aPosition - m_start ) <= maxdist )
return true;
if( aPosition.Distance( m_end ) <= maxdist )
if( EuclideanNorm( aPosition - m_end ) <= maxdist )
return true;
double radius = GetRadius();
VECTOR2D relPos( VECTOR2D( aPosition ) - getCenter() );
double dist = relPos.EuclideanNorm();
VECTOR2I relPos = aPosition - getCenter();
int radius = GetRadius();
if( IsFilledForHitTesting() )
VECTOR2I::extended_type dist =
KiROUND<double, VECTOR2I::extended_type>( EuclideanNorm( relPos ) );
if( IsFilled() )
{
// Check distance from arc center
if( dist > radius + maxdist )
@@ -944,7 +920,7 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
return TestSegmentHit( aPosition, GetStart(), GetEnd(), maxdist );
case SHAPE_T::RECTANGLE:
if( IsProxyItem() || IsFilledForHitTesting() ) // Filled rect hit-test
if( IsProxyItem() || IsFilled() ) // Filled rect hit-test
{
SHAPE_POLY_SET poly;
poly.NewOutline();
@@ -965,7 +941,7 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
}
case SHAPE_T::POLY:
if( IsFilledForHitTesting() )
if( IsFilled() )
{
if( !m_poly.COutline( 0 ).IsClosed() )
{
@@ -1487,14 +1463,14 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
case 1:
m_end = aPosition;
radius = m_start.Distance( m_end ) * M_SQRT1_2;
radius = sqrt( sq( GetLineLength( m_start, m_end ) ) / 2.0 );
break;
case 2:
case 3:
{
VECTOR2I v = m_start - m_end;
double chordBefore = v.SquaredEuclideanNorm();
double chordBefore = sq( v.x ) + sq( v.y );
if( m_editState == 2 )
m_start = aPosition;
@@ -1503,7 +1479,7 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
v = m_start - m_end;
double chordAfter = v.SquaredEuclideanNorm();
double chordAfter = sq( v.x ) + sq( v.y );
double ratio = 0.0;
if( chordBefore > 0 )
@@ -1516,8 +1492,8 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
case 4:
{
double radialA = m_start.Distance( aPosition );
double radialB = m_end.Distance( aPosition );
double radialA = GetLineLength( m_start, aPosition );
double radialB = GetLineLength( m_end, aPosition );
radius = ( radialA + radialB ) / 2.0;
}
break;
@@ -1530,9 +1506,9 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
// Calculate center based on start, end, and radius
//
// Let 'l' be the length of the chord and 'm' the middle point of the chord
double l = m_start.Distance( m_end );
double l = GetLineLength( m_start, m_end );
VECTOR2D m = ( m_start + m_end ) / 2;
double sqRadDiff = ( radius * radius ) - ( l * l ) / 4.0;
double sqRadDiff = sq( radius ) - sq( l / 2 );
// Calculate 'd', the vector from the chord midpoint to the center
VECTOR2D d;
@@ -1571,7 +1547,7 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
case 4:
// Pick the one closer to the mouse position
m_arcCenter = c1.Distance( aPosition ) < c2.Distance( aPosition ) ? c1 : c2;
m_arcCenter = GetLineLength( c1, aPosition ) < GetLineLength( c2, aPosition ) ? c1 : c2;
break;
}
}
@@ -1994,15 +1970,6 @@ static struct EDA_SHAPE_DESC
return false;
};
auto isRectangle = []( INSPECTABLE* aItem ) -> bool
{
// Polygons, unlike other shapes, have no meaningful start or end coordinates
if( EDA_SHAPE* shape = dynamic_cast<EDA_SHAPE*>( aItem ) )
return shape->GetShape() == SHAPE_T::RECTANGLE;
return false;
};
const wxString shapeProps = _HKI( "Shape Properties" );
auto shape = new PROPERTY_ENUM<EDA_SHAPE, SHAPE_T>( _HKI( "Shape" ),
@@ -2021,13 +1988,13 @@ static struct EDA_SHAPE_DESC
.SetAvailableFunc( isNotPolygonOrCircle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center X" ),
&EDA_SHAPE::SetCenterX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
&EDA_SHAPE::SetStartX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_X_COORD ),
shapeProps )
.SetAvailableFunc( isCircle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center Y" ),
&EDA_SHAPE::SetCenterY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
&EDA_SHAPE::SetStartY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
shapeProps )
.SetAvailableFunc( isCircle );
@@ -2050,18 +2017,6 @@ static struct EDA_SHAPE_DESC
shapeProps )
.SetAvailableFunc( isNotPolygonOrCircle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Width" ),
&EDA_SHAPE::SetRectangleWidth, &EDA_SHAPE::GetRectangleWidth, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
shapeProps )
.SetAvailableFunc( isRectangle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Height" ),
&EDA_SHAPE::SetRectangleHeight, &EDA_SHAPE::GetRectangleHeight, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
shapeProps )
.SetAvailableFunc( isRectangle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Line Width" ),
&EDA_SHAPE::SetWidth, &EDA_SHAPE::GetWidth, PROPERTY_DISPLAY::PT_SIZE ),
shapeProps );
+17 -26
View File
@@ -542,13 +542,10 @@ EDA_TEXT::GetRenderCache( const KIFONT::FONT* aFont, const wxString& forResolved
}
void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const KIFONT::FONT* aFont,
const EDA_ANGLE& aAngle, const VECTOR2I& aOffset )
void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const EDA_ANGLE& aAngle )
{
m_render_cache_text = aResolvedText;
m_render_cache_font = aFont;
m_render_cache_angle = aAngle;
m_render_cache_offset = aOffset;
m_render_cache.clear();
}
@@ -556,7 +553,6 @@ void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const KIFONT::FO
void EDA_TEXT::AddRenderCacheGlyph( const SHAPE_POLY_SET& aPoly )
{
m_render_cache.emplace_back( std::make_unique<KIFONT::OUTLINE_GLYPH>( aPoly ) );
static_cast<KIFONT::OUTLINE_GLYPH*>( m_render_cache.back().get() )->CacheTriangulation();
}
@@ -1087,9 +1083,16 @@ bool EDA_TEXT::ValidateHyperlink( const wxString& aURL )
if( aURL.IsEmpty() || IsGotoPageHref( aURL ) )
return true;
// Limit valid urls to file, http and https for now. Note wxURL doesn't support https
wxURI uri;
return( uri.Create( aURL ) && uri.HasScheme() );
if( uri.Create( aURL ) && uri.HasScheme() )
{
const wxString& scheme = uri.GetScheme();
return scheme == wxT( "file" ) || scheme == wxT( "http" ) || scheme == wxT( "https" );
}
return false;
}
double EDA_TEXT::Levenshtein( const EDA_TEXT& aOther ) const
@@ -1178,26 +1181,14 @@ static struct EDA_TEXT_DESC
{
EDA_TEXT_DESC()
{
// These are defined in SCH_FIELD as well but initialization order is
// not defined, so this needs to be conditional. Defining in both
// places leads to duplicate symbols.
auto& h_inst = ENUM_MAP<GR_TEXT_H_ALIGN_T>::Instance();
if( h_inst.Choices().GetCount() == 0)
{
h_inst.Map( GR_TEXT_H_ALIGN_LEFT, _( "Left" ) );
h_inst.Map( GR_TEXT_H_ALIGN_CENTER, _( "Center" ) );
h_inst.Map( GR_TEXT_H_ALIGN_RIGHT, _( "Right" ) );
}
auto& v_inst = ENUM_MAP<GR_TEXT_V_ALIGN_T>::Instance();
if( v_inst.Choices().GetCount() == 0)
{
v_inst.Map( GR_TEXT_V_ALIGN_TOP, _( "Top" ) );
v_inst.Map( GR_TEXT_V_ALIGN_CENTER, _( "Center" ) );
v_inst.Map( GR_TEXT_V_ALIGN_BOTTOM, _( "Bottom" ) );
}
ENUM_MAP<GR_TEXT_H_ALIGN_T>::Instance()
.Map( GR_TEXT_H_ALIGN_LEFT, _HKI( "Left" ) )
.Map( GR_TEXT_H_ALIGN_CENTER, _HKI( "Center" ) )
.Map( GR_TEXT_H_ALIGN_RIGHT, _HKI( "Right" ) );
ENUM_MAP<GR_TEXT_V_ALIGN_T>::Instance()
.Map( GR_TEXT_V_ALIGN_TOP, _HKI( "Top" ) )
.Map( GR_TEXT_V_ALIGN_CENTER, _HKI( "Center" ) )
.Map( GR_TEXT_V_ALIGN_BOTTOM, _HKI( "Bottom" ) );
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
REGISTER_TYPE( EDA_TEXT );
+7 -4
View File
@@ -335,10 +335,6 @@ wxString EDA_UNIT_UTILS::UI::StringFromValue( const EDA_IU_SCALE& aIuScale, EDA_
format = is_eeschema ? wxT( "%.6f" ) : wxT( "%.8f" );
break;
case EDA_UNITS::DEGREES:
format = wxT( "%.4f" );
break;
default:
format = wxT( "%.10f" );
break;
@@ -468,6 +464,13 @@ wxString EDA_UNIT_UTILS::UI::MessageTextFromValue( const EDA_IU_SCALE& aIuScale,
}
text.Printf( format, value );
removeTrailingZeros( text );
if( value != 0.0 && ( text == wxS( "0" ) || text == wxS( "-0" ) ) )
{
text.Printf( wxS( "%.10f" ), value );
removeTrailingZeros( text );
}
if( aAddUnitsText )
text += EDA_UNIT_UTILS::GetText( aUnits, aType );
+2 -4
View File
@@ -259,7 +259,6 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphs( BOX2I* aBBox, std::vector<std::unique_pt
struct GLYPH_CACHE_KEY {
FT_Face face;
hb_codepoint_t codepoint;
double scaler;
bool fakeItalic;
bool fakeBold;
bool mirror;
@@ -267,7 +266,7 @@ struct GLYPH_CACHE_KEY {
bool operator==(const GLYPH_CACHE_KEY& rhs ) const
{
return face == rhs.face && codepoint == rhs.codepoint && scaler == rhs.scaler
return face == rhs.face && codepoint == rhs.codepoint
&& fakeItalic == rhs.fakeItalic && fakeBold == rhs.fakeBold
&& mirror == rhs.mirror && angle == rhs.angle;
}
@@ -281,7 +280,6 @@ namespace std
std::size_t operator()( const GLYPH_CACHE_KEY& k ) const
{
return hash<const void*>()( k.face ) ^ hash<unsigned>()( k.codepoint )
^ hash<double>()( k.scaler )
^ hash<int>()( k.fakeItalic ) ^ hash<int>()( k.fakeBold )
^ hash<int>()( k.mirror ) ^ hash<int>()( k.angle.AsTenthsOfADegree() );
}
@@ -341,7 +339,7 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphsUnlocked( BOX2I* aBBox,
if( aGlyphs )
{
GLYPH_CACHE_KEY key = { face, glyphInfo[i].codepoint, scaler, m_fakeItal, m_fakeBold,
GLYPH_CACHE_KEY key = { face, glyphInfo[i].codepoint, m_fakeItal, m_fakeBold,
aMirror, aAngle };
GLYPH_DATA& glyphData = s_glyphCache[ key ];
+7 -3
View File
@@ -320,7 +320,10 @@ void FP_LIB_TABLE::PrefetchLib( const wxString& aNickname )
const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool aCheckIfEnabled )
{
FP_LIB_TABLE_ROW* row = static_cast<FP_LIB_TABLE_ROW*>( findRow( aNickname, aCheckIfEnabled ) );
// Do not optimize this code. Is done this way specifically to fix a runtime
// error with clang 4.0.1.
LIB_TABLE_ROW* ltrow = findRow( aNickname, aCheckIfEnabled );
FP_LIB_TABLE_ROW* row = dynamic_cast< FP_LIB_TABLE_ROW* >( ltrow );
if( !row )
{
@@ -330,8 +333,9 @@ const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool a
THROW_IO_ERROR( msg );
}
// We've been 'lazy' up until now, but it cannot be deferred any longer; instantiate a
// PCB_IO of the proper kind if it is not already in this FP_LIB_TABLE_ROW.
// We've been 'lazy' up until now, but it cannot be deferred any longer,
// instantiate a PCB_IO of the proper kind if it is not already in this
// FP_LIB_TABLE_ROW.
if( !row->plugin )
row->setPlugin( PCB_IO_MGR::PluginFind( row->type ) );
-8
View File
@@ -647,14 +647,6 @@ bool CAMERA::Zoom_T1( float aFactor )
}
void CAMERA::RotateScreen( float aAngleInRadians )
{
glm::mat4 matrix = GetRotationMatrix();
SetRotationMatrix( glm::rotate( matrix, aAngleInRadians, GetDir() ) );
updateRotationMatrix();
}
void CAMERA::RotateX( float aAngleInRadians )
{
m_rotate_aux.x += aAngleInRadians;
+61 -97
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
* Copyright (C) 2012-2024 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2012-2023 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2017-2018 CERN
*
* @author Maciej Suminski <maciej.suminski@cern.ch>
@@ -29,7 +29,6 @@
#include <wx/image.h>
#include <wx/log.h>
#include <wx/rawbmp.h>
#include <gal/cairo/cairo_gal.h>
#include <gal/cairo/cairo_compositor.h>
@@ -191,7 +190,7 @@ static double roundp( double x )
const VECTOR2D CAIRO_GAL_BASE::roundp( const VECTOR2D& v )
{
if( m_lineWidthIsOdd )
if( m_lineWidthIsOdd && m_isStrokeEnabled )
return VECTOR2D( ::roundp( v.x ), ::roundp( v.y ) );
else
return VECTOR2D( floor( v.x + 0.5 ), floor( v.y + 0.5 ) );
@@ -353,18 +352,13 @@ void CAIRO_GAL_BASE::DrawArc( const VECTOR2D& aCenterPoint, double aRadius,
double r = xform( aRadius );
// Adjust center and radius slightly to better match the rounding of endpoints.
VECTOR2D mid = roundp( xform( aCenterPoint ) );
// N.B. This is backwards. We set this because we want to adjust the center
// point that changes both endpoints. In the worst case, this is twice as far.
// We cannot adjust radius or center based on the other because this causes the
// whole arc to change position/size
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
RotatePoint( startPointS, -EDA_ANGLE( startAngle, RADIANS_T ) );
RotatePoint( endPointS, -EDA_ANGLE( endAngle, RADIANS_T ) );
VECTOR2D refStart = roundp( xform( aCenterPoint ) + startPointS );
VECTOR2D refEnd = roundp( xform( aCenterPoint ) + endPointS );
r = ( ( refStart - mid ).EuclideanNorm() + ( refEnd - mid ).EuclideanNorm() ) / 2.0;
auto mid = roundp( xform( aCenterPoint ) );
cairo_set_line_width( m_currentContext, m_lineWidthInPixels );
cairo_new_sub_path( m_currentContext );
@@ -409,7 +403,13 @@ void CAIRO_GAL_BASE::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadiu
double r = xform( aRadius );
VECTOR2D mid = xform( aCenterPoint );
// N.B. This is backwards. We set this because we want to adjust the center
// point that changes both endpoints. In the worst case, this is twice as far.
// We cannot adjust radius or center based on the other because this causes the
// whole arc to change position/size
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
VECTOR2D mid = roundp( xform( aCenterPoint ) );
double width = xform( aWidth / 2.0 );
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
@@ -583,9 +583,6 @@ void CAIRO_GAL_BASE::DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend )
void CAIRO_GAL_BASE::ResizeScreen( int aWidth, int aHeight )
{
m_screenSize = VECTOR2I( aWidth, aHeight );
m_bitmapSize = VECTOR2I( std::ceil( m_screenSize.x * getScalingFactor() ),
std::ceil( m_screenSize.y * getScalingFactor() ) );
}
@@ -597,9 +594,9 @@ void CAIRO_GAL_BASE::Flush()
void CAIRO_GAL_BASE::ClearScreen()
{
cairo_set_source_rgb( m_context, m_clearColor.r, m_clearColor.g, m_clearColor.b );
cairo_rectangle( m_context, 0.0, 0.0, m_bitmapSize.x, m_bitmapSize.y );
cairo_fill( m_context );
cairo_set_source_rgb( m_currentContext, m_clearColor.r, m_clearColor.g, m_clearColor.b );
cairo_rectangle( m_currentContext, 0.0, 0.0, m_screenSize.x, m_screenSize.y );
cairo_fill( m_currentContext );
}
@@ -1024,15 +1021,15 @@ void CAIRO_GAL_BASE::resetContext()
m_imageSurfaces.clear();
ClearScreen();
// Compute the world <-> screen transformations
ComputeWorldScreenMatrix();
double sf = getScalingFactor();
cairo_matrix_init( &m_cairoWorldScreenMatrix,
m_worldScreenMatrix.m_data[0][0] * sf, m_worldScreenMatrix.m_data[1][0] * sf,
m_worldScreenMatrix.m_data[0][1] * sf, m_worldScreenMatrix.m_data[1][1] * sf,
m_worldScreenMatrix.m_data[0][2] * sf, m_worldScreenMatrix.m_data[1][2] * sf );
cairo_matrix_init( &m_cairoWorldScreenMatrix, m_worldScreenMatrix.m_data[0][0],
m_worldScreenMatrix.m_data[1][0], m_worldScreenMatrix.m_data[0][1],
m_worldScreenMatrix.m_data[1][1], m_worldScreenMatrix.m_data[0][2],
m_worldScreenMatrix.m_data[1][2] );
// we work in screen-space coordinates and do the transforms outside.
cairo_identity_matrix( m_context );
@@ -1340,10 +1337,8 @@ CAIRO_GAL::CAIRO_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
m_currentTarget = TARGET_NONCACHED;
SetTarget( TARGET_NONCACHED );
SetBackgroundStyle( wxBG_STYLE_PAINT );
m_bitmapBuffer = nullptr;
m_wxBitmap = nullptr;
m_wxOutput = nullptr;
m_parentWindow = aParent;
m_mouseListener = aMouseListener;
@@ -1378,10 +1373,11 @@ CAIRO_GAL::CAIRO_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) );
#endif
Bind( wxEVT_GESTURE_ZOOM, &CAIRO_GAL::skipGestureEvent, this );
Bind( wxEVT_GESTURE_PAN, &CAIRO_GAL::skipGestureEvent, this );
SetSize( aParent->GetClientSize() );
m_screenSize = ToVECTOR2I( aParent->GetClientSize() );
// Allocate memory for pixel storage
allocateBitmaps();
m_isInitialized = false;
}
@@ -1417,44 +1413,45 @@ void CAIRO_GAL::EndDrawing()
// Now translate the raw context data from the format stored
// by cairo into a format understood by wxImage.
int height = m_bitmapSize.y;
int height = m_screenSize.y;
int stride = m_stride;
unsigned char* srcRow = m_bitmapBuffer;
wxNativePixelData dstData( *m_wxBitmap );
wxNativePixelData::Iterator di( dstData );
unsigned char* dst = m_wxOutput;
for( int y = 0; y < height; y++ )
{
wxNativePixelData::Iterator rowStart = di;
for( int x = 0; x < stride; x += 4, ++di )
for( int x = 0; x < stride; x += 4 )
{
const unsigned char* src = srcRow + x;
#if defined( __BYTE_ORDER__ ) && ( __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ )
// XRGB
di.Red() = src[1];
di.Green() = src[2];
di.Blue() = src[3];
dst[0] = src[1];
dst[1] = src[2];
dst[2] = src[3];
#else
// BGRX
di.Red() = src[2];
di.Green() = src[1];
di.Blue() = src[0];
dst[0] = src[2];
dst[1] = src[1];
dst[2] = src[0];
#endif
dst += 3;
}
srcRow += stride;
di = rowStart;
di.OffsetY( dstData, 1 );
}
deinitSurface();
wxImage img( m_wxBufferWidth, m_screenSize.y, m_wxOutput, true );
wxBitmap bmp( img );
wxMemoryDC mdc( bmp );
wxClientDC clientDC( this );
Refresh(); // Trigger repaint
// Now it is the time to blit the mouse cursor
blitCursor( mdc );
clientDC.Blit( 0, 0, m_screenSize.x, m_screenSize.y, &mdc, 0, 0, wxCOPY );
deinitSurface();
}
@@ -1475,7 +1472,7 @@ void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight )
allocateBitmaps();
if( m_validCompositor )
m_compositor->Resize( m_bitmapSize.x, m_bitmapSize.y );
m_compositor->Resize( aWidth, aHeight );
m_validCompositor = false;
@@ -1566,7 +1563,7 @@ void CAIRO_GAL::initSurface()
return;
m_surface = cairo_image_surface_create_for_data( m_bitmapBuffer, GAL_FORMAT, m_wxBufferWidth,
m_bitmapSize.y, m_stride );
m_screenSize.y, m_stride );
m_context = cairo_create( m_surface );
@@ -1597,18 +1594,17 @@ void CAIRO_GAL::deinitSurface()
void CAIRO_GAL::allocateBitmaps()
{
m_wxBufferWidth = m_bitmapSize.x;
m_wxBufferWidth = m_screenSize.x;
// Create buffer, use the system independent Cairo context backend
m_stride = cairo_format_stride_for_width( GAL_FORMAT, m_wxBufferWidth );
m_bufferSize = m_stride * m_bitmapSize.y;
m_bufferSize = m_stride * m_screenSize.y;
wxASSERT( m_bitmapBuffer == nullptr );
m_bitmapBuffer = new unsigned char[m_bufferSize];
wxASSERT( m_wxBitmap == nullptr );
m_wxBitmap = new wxBitmap( m_wxBufferWidth, m_bitmapSize.y, 24 );
m_wxBitmap->SetScaleFactor( getScalingFactor() );
wxASSERT( m_wxOutput == nullptr );
m_wxOutput = new unsigned char[m_wxBufferWidth * 3 * m_screenSize.y];
}
@@ -1617,8 +1613,8 @@ void CAIRO_GAL::deleteBitmaps()
delete[] m_bitmapBuffer;
m_bitmapBuffer = nullptr;
delete m_wxBitmap;
m_wxBitmap = nullptr;
delete[] m_wxOutput;
m_wxOutput = nullptr;
}
@@ -1626,7 +1622,7 @@ void CAIRO_GAL::setCompositor()
{
// Recreate the compositor with the new Cairo context
m_compositor.reset( new CAIRO_COMPOSITOR( &m_currentContext ) );
m_compositor->Resize( m_bitmapSize.x, m_bitmapSize.y );
m_compositor->Resize( m_screenSize.x, m_screenSize.y );
m_compositor->SetAntialiasingMode( m_options.cairo_antialiasing_mode );
// Prepare buffers
@@ -1640,22 +1636,7 @@ void CAIRO_GAL::setCompositor()
void CAIRO_GAL::onPaint( wxPaintEvent& aEvent )
{
// We should have the rendered image in m_wxBitmap after EDA_DRAW_PANEL_GAL::onPaint
if( !m_wxBitmap )
{
wxLogDebug( "CAIRO_GAL::onPaint null output bitmap buffer" );
return;
}
{
// Now it is the time to blit the mouse cursor
wxMemoryDC mdc( *m_wxBitmap );
blitCursor( mdc );
}
wxPaintDC paintDC( this );
paintDC.DrawBitmap( *m_wxBitmap, 0, 0 );
PostPaint( aEvent );
}
@@ -1667,14 +1648,6 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent )
}
void CAIRO_GAL::skipGestureEvent( wxGestureEvent& aEvent )
{
// Post the gesture event to the event listener registered in constructor, if any
if( m_mouseListener )
wxPostEvent( m_mouseListener, aEvent );
}
bool CAIRO_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
{
bool refresh = false;
@@ -1699,22 +1672,13 @@ bool CAIRO_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
}
double CAIRO_GAL::getScalingFactor()
{
return GetContentScaleFactor();
};
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor )
{
// Store the current cursor type and get the wxCursor for it
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
if( !GAL::SetNativeCursorStyle( aCursor ) )
return false;
if( aHiDPI )
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
else
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
// Update the cursor in the wx control
wxWindow::SetCursor( m_currentwxCursor );
+51 -259
View File
@@ -44,76 +44,85 @@
#include <cursors/cursor-subtract.xpm>
#include <cursors/cursor-text.xpm>
#include <cursors/cursor-xor.xpm>
#include <cursors/cursor-zoom-in.xpm>
#include <cursors/cursor-zoom.xpm>
#include <cursors/cursor-zoom-out.xpm>
#include <cursors/cursor_tune.xpm>
#include <cursors/voltage_probe.xpm>
#include <cursors/current_probe.xpm>
// HiDPI cursor files
#include <cursors/cursor-add64.xpm>
#include <cursors/cursor-component64.xpm>
#include <cursors/cursor-eraser64.xpm>
#include <cursors/cursor-label-global64.xpm>
#include <cursors/cursor-label-hier64.xpm>
#include <cursors/cursor-label-net64.xpm>
#include <cursors/cursor-line-bus64.xpm>
#include <cursors/cursor-line-graphic64.xpm>
#include <cursors/cursor-line-wire64.xpm>
#include <cursors/cursor-line-wire-add64.xpm>
#include <cursors/cursor-measure64.xpm>
#include <cursors/cursor-pencil64.xpm>
#include <cursors/cursor-select-lasso64.xpm>
#include <cursors/cursor-select-window64.xpm>
#include <cursors/cursor-subtract64.xpm>
#include <cursors/cursor-text64.xpm>
#include <cursors/cursor-xor64.xpm>
#include <cursors/cursor-zoom-in64.xpm>
#include <cursors/cursor-zoom-out64.xpm>
#include <cursors/cursor_tune64.xpm>
#include <cursors/voltage_probe64.xpm>
#include <cursors/current_probe64.xpm>
// Under MSW, the standard cursor is white on black. Elsewhere it is black on white
#ifdef __WINDOWS__
#include <cursors/cursor-place.xpm>
#include <cursors/cursor-place64.xpm>
#include <cursors/cursor-select-m.xpm>
#include <cursors/cursor-select-m64.xpm>
#else
#include <cursors/cursor-place-black.xpm>
#include <cursors/cursor-place-black64.xpm>
#include <cursors/cursor-select-m-black.xpm>
#include <cursors/cursor-select-m-black64.xpm>
#endif
#include <wx/bitmap.h>
#include <wx/debug.h>
static const unsigned char voltage_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
0x00, 0x30, 0x06, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x80, 0x07, 0x08, 0x00,
0xc0, 0x07, 0x18, 0x00, 0xe0, 0x07, 0x30, 0x00, 0xf0, 0x03, 0x60, 0x00, 0xf8, 0x01, 0x00, 0x00,
0xfc, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
0x0f, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static const unsigned char current_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x60, 0x06, 0x00,
0x00, 0x30, 0x0c, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x80, 0x0f, 0x18, 0x00,
0xc0, 0x0f, 0x30, 0x80, 0xe1, 0x07, 0x60, 0x80, 0xf1, 0x03, 0x00, 0x80, 0xf9, 0x01, 0x00, 0x80,
0xfd, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
0x0f, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xc6, 0x01, 0x00, 0x00, 0x83,
0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xfc,
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00 };
static const unsigned char cursor_tune[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00,
0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50,
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0a,
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
static const unsigned char cursor_tune_mask[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f,
0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07,
0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00,
0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
0x00, 0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00,
0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
0x0e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
{
KICURSOR::VOLTAGE_PROBE,
voltage_probe,
voltage_probe,
nullptr,
nullptr,
voltage_probe_xpm,
{ 32, 32 },
{ 1, 31 },
},
{
KICURSOR::CURRENT_PROBE,
current_probe,
current_probe,
nullptr,
nullptr,
current_probe_xpm,
{ 32, 32 },
{ 4, 27 },
},
{
KICURSOR::TUNE,
cursor_tune,
cursor_tune_mask,
nullptr,
nullptr,
cursor_tune_xpm,
{ 32, 32 },
{ 1, 30 },
},
@@ -189,7 +198,7 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
KICURSOR::ZOOM_IN,
nullptr,
nullptr,
cursor_zoom_in_xpm,
cursor_zoom_xpm,
{ 32, 32 },
{ 6, 6 },
},
@@ -296,209 +305,6 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
};
static const std::vector<CURSOR_STORE::CURSOR_DEF> hidpi_cursors = {
{
KICURSOR::VOLTAGE_PROBE,
nullptr,
nullptr,
voltage_probe64_xpm,
{ 64, 64 },
{ 1, 62 },
},
{
KICURSOR::CURRENT_PROBE,
nullptr,
nullptr,
current_probe64_xpm,
{ 64, 64 },
{ 8, 54 },
},
{
KICURSOR::TUNE,
nullptr,
nullptr,
cursor_tune64_xpm,
{ 64, 64 },
{ 2, 60 },
},
{
KICURSOR::PENCIL,
nullptr,
nullptr,
cursor_pencil64_xpm,
{ 64, 64 },
{ 8, 54 },
},
{
KICURSOR::MOVING,
nullptr,
nullptr,
#ifdef __WINDOWS__
cursor_select_m64_xpm,
#else
cursor_select_m_black64_xpm,
#endif
{ 64, 64 },
{ 2, 2 },
},
{
KICURSOR::REMOVE,
nullptr,
nullptr,
cursor_eraser64_xpm,
{ 64, 64 },
{ 8, 8 },
},
{
KICURSOR::TEXT,
nullptr,
nullptr,
cursor_text64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::MEASURE,
nullptr,
nullptr,
cursor_measure64_xpm,
{ 64, 64 },
{ 8, 8 },
},
{
KICURSOR::ADD,
nullptr,
nullptr,
cursor_add64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::SUBTRACT,
nullptr,
nullptr,
cursor_subtract64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::XOR,
nullptr,
nullptr,
cursor_xor64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::ZOOM_IN,
nullptr,
nullptr,
cursor_zoom_in64_xpm,
{ 64, 64 },
{ 12, 12 },
},
{
KICURSOR::ZOOM_OUT,
nullptr,
nullptr,
cursor_zoom_out64_xpm,
{ 64, 64 },
{ 12, 12 },
},
{
KICURSOR::LABEL_NET,
nullptr,
nullptr,
cursor_label_net64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::LABEL_GLOBAL,
nullptr,
nullptr,
cursor_label_global64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::COMPONENT,
nullptr,
nullptr,
cursor_component64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::SELECT_LASSO,
nullptr,
nullptr,
cursor_select_lasso64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::SELECT_WINDOW,
nullptr,
nullptr,
cursor_select_window64_xpm,
{ 64, 64 },
{ 14, 20 },
},
{
KICURSOR::LINE_BUS,
nullptr,
nullptr,
cursor_line_bus64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LINE_WIRE,
nullptr,
nullptr,
cursor_line_wire64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LINE_WIRE_ADD,
nullptr,
nullptr,
cursor_line_wire_add64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LINE_GRAPHIC,
nullptr,
nullptr,
cursor_line_graphic64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LABEL_HIER,
nullptr,
nullptr,
cursor_label_hier64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::PLACE,
nullptr,
nullptr,
#ifdef __WINDOWS__
cursor_place64_xpm,
#else
cursor_place_black64_xpm,
#endif
{ 64, 64 },
{ 2, 2 },
},
};
/**
* Construct a cursor for the given definition.
*
@@ -587,8 +393,8 @@ const wxCursor& CURSOR_STORE::Get( KICURSOR aIdKey ) const
const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
{
wxStockCursor stock = GetStockCursor( aCursorType );
wxStockCursor stock =
GetStockCursor( aCursorType );
if( stock != wxCURSOR_MAX )
{
return wxCursor( stock );
@@ -599,20 +405,6 @@ const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
}
const wxCursor CURSOR_STORE::GetHiDPICursor( KICURSOR aCursorType )
{
wxStockCursor stock = GetStockCursor( aCursorType );
if( stock != wxCURSOR_MAX )
{
return wxCursor( stock );
}
static CURSOR_STORE store( hidpi_cursors );
return store.Get( aCursorType );
}
wxStockCursor CURSOR_STORE::GetStockCursor( KICURSOR aCursorType )
{
wxStockCursor stockCursor;
+2 -2
View File
@@ -81,7 +81,7 @@ GAL::GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions ) :
SetCursorEnabled( false );
// Initialize the native widget to an arrow cursor
SetNativeCursorStyle( KICURSOR::ARROW, false );
SetNativeCursorStyle( KICURSOR::ARROW );
// Initialize text properties
ResetTextAttributes();
@@ -277,7 +277,7 @@ void GAL::BitmapText( const wxString& aText, const VECTOR2I& aPosition, const ED
}
bool GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
bool GAL::SetNativeCursorStyle( KICURSOR aCursor )
{
if( m_currentNativeCursor == aCursor )
return false;
+9 -2
View File
@@ -34,7 +34,8 @@ HIDPI_GL_CANVAS::HIDPI_GL_CANVAS( const KIGFX::VC_SETTINGS& aSettings, wxWindow*
const wxPoint& aPos, const wxSize& aSize, long aStyle,
const wxString& aName, const wxPalette& aPalette ) :
wxGLCanvas( aParent, aGLAttribs, aId, aPos, aSize, aStyle, aName, aPalette ),
m_settings( aSettings )
m_settings( aSettings ),
m_scale_factor( DPI_SCALING::GetDefaultScaleFactor() )
{
}
@@ -63,7 +64,13 @@ wxPoint HIDPI_GL_CANVAS::GetNativePosition( const wxPoint& aPoint ) const
}
void HIDPI_GL_CANVAS::SetScaleFactor( double aNewScaleFactor )
{
m_scale_factor = aNewScaleFactor;
}
double HIDPI_GL_CANVAS::GetScaleFactor() const
{
return GetContentScaleFactor();
return m_scale_factor;
}
+9 -13
View File
@@ -113,30 +113,26 @@ void GPU_CACHED_MANAGER::BeginDrawing()
}
void GPU_CACHED_MANAGER::DrawIndices( const VERTEX_ITEM* aItem )
void GPU_CACHED_MANAGER::DrawIndices( const VERTEX_ITEM *aItem )
{
// Hot path: don't use wxASSERT
assert( m_isDrawing );
wxASSERT( m_isDrawing );
unsigned int offset = aItem->GetOffset();
unsigned int size = aItem->GetSize();
if( size == 0 )
return;
if( size <= 1000 )
{
m_totalNormal += size;
m_vranges.emplace_back( offset, offset + size - 1, false );
m_curVrangeSize += size;
}
else
if( size > 1000 )
{
m_totalHuge += size;
m_vranges.emplace_back( offset, offset + size - 1, true );
m_indexBufSize = std::max( m_curVrangeSize, m_indexBufSize );
m_curVrangeSize = 0;
}
else if ( size > 0 )
{
m_totalNormal += size;
m_vranges.emplace_back( offset, offset + size - 1, false );
m_curVrangeSize += size;
}
}
+11 -22
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
* Copyright (C) 2012-2024 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2012-2023 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2013-2017 CERN
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
@@ -33,7 +33,6 @@
#endif
#include <advanced_config.h>
#include <build_version.h>
#include <gal/opengl/opengl_gal.h>
#include <gal/opengl/utils.h>
#include <gal/definitions.h>
@@ -391,9 +390,6 @@ OPENGL_GAL::OPENGL_GAL( const KIGFX::VC_SETTINGS& aVcSettings, GAL_DISPLAY_OPTIO
Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) );
#endif
Bind( wxEVT_GESTURE_ZOOM, &OPENGL_GAL::skipGestureEvent, this );
Bind( wxEVT_GESTURE_PAN, &OPENGL_GAL::skipGestureEvent, this );
SetSize( aParent->GetClientSize() );
m_screenSize = ToVECTOR2I( GetNativePixelSize() );
@@ -518,6 +514,13 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
refresh = true;
}
if( m_options.m_scaleFactor != GetScaleFactor() )
{
SetScaleFactor( m_options.m_scaleFactor );
m_gridLineWidth = m_options.m_scaleFactor * ( m_options.m_gridLineWidth + 0.25 );
refresh = true;
}
if( super::updatedGalDisplayOptions( aOptions ) || refresh )
{
Refresh();
@@ -2146,16 +2149,13 @@ void OPENGL_GAL::EndDiffLayer()
}
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor )
{
// Store the current cursor type and get the wxCursor for it
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
if( !GAL::SetNativeCursorStyle( aCursor ) )
return false;
if( aHiDPI )
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
else
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
// Update the cursor in the wx control
HIDPI_GL_CANVAS::SetCursor( m_currentwxCursor );
@@ -2623,14 +2623,6 @@ void OPENGL_GAL::skipMouseEvent( wxMouseEvent& aEvent )
}
void OPENGL_GAL::skipGestureEvent( wxGestureEvent& aEvent )
{
// Post the gesture event to the event listener registered in constructor, if any
if( m_mouseListener )
wxPostEvent( m_mouseListener, aEvent );
}
void OPENGL_GAL::blitCursor()
{
if( !IsCursorEnabled() )
@@ -2702,9 +2694,6 @@ void OPENGL_GAL::init()
#endif // KICAD_USE_EGL
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
if( GLEW_OK != err )
throw std::runtime_error( (const char*) glewGetErrorString( err ) );
+7 -12
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2016-2017 CERN
* Copyright (C) 2021, 2024 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
*
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
@@ -170,18 +170,13 @@ static void GLAPIENTRY debugMsgCallback( GLenum aSource, GLenum aType, GLuint aI
{
switch( aSeverity )
{
case GL_DEBUG_SEVERITY_HIGH:
wxLogTrace( traceGalOpenGlError, wxS( "OpenGL ERROR: %s" ), aMessage );
break;
case GL_DEBUG_SEVERITY_MEDIUM:
wxLogTrace( traceGalOpenGlError, wxS( "OpenGL WARNING: %s" ), aMessage );
break;
case GL_DEBUG_SEVERITY_LOW:
wxLogTrace( traceGalOpenGlError, wxS( "OpenGL INFO: %s" ), aMessage );
break;
case GL_DEBUG_SEVERITY_NOTIFICATION:
return;
case GL_DEBUG_SEVERITY_HIGH: wxLogDebug( "OpenGL ERROR: " ); break;
case GL_DEBUG_SEVERITY_MEDIUM: wxLogDebug( "OpenGL WARNING: " ); break;
case GL_DEBUG_SEVERITY_LOW: wxLogDebug( "OpenGL INFO: " ); break;
case GL_DEBUG_SEVERITY_NOTIFICATION: return;
}
wxLogDebug( "%s\n", aMessage );
}
+3 -13
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013-2016 CERN
* Copyright (C) 2021, 2024 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
*
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
@@ -38,15 +38,6 @@
#include <confirm.h>
#include <wx/log.h>
/**
* Flag to enable #VERTEX_MANAGER debugging output.
*
* @ingroup trace_env_vars
*/
static const wxChar traceVertexManager[] = wxT( "KICAD_VERTEX_MANAGER" );
using namespace KIGFX;
VERTEX_MANAGER::VERTEX_MANAGER( bool aCached ) :
@@ -82,7 +73,7 @@ bool VERTEX_MANAGER::Reserve( unsigned int aSize )
return true;
if( m_reservedSpace != 0 || m_reserved )
wxLogTrace( traceVertexManager, wxS( "Did not use all previous vertices allocated" ) );
wxLogDebug( wxT( "Did not use all previous vertices allocated" ) );
// flag to avoid hanging by calling DisplayError too many times:
static bool show_err = true;
@@ -182,7 +173,7 @@ void VERTEX_MANAGER::SetItem( VERTEX_ITEM& aItem ) const
void VERTEX_MANAGER::FinishItem() const
{
if( m_reservedSpace != 0 || m_reserved )
wxLogTrace( traceVertexManager, wxS( "Did not use all previous vertices allocated" ) );
wxLogDebug( wxT( "Did not use all previous vertices allocated" ) );
m_container->FinishItem();
}
@@ -304,7 +295,6 @@ void VERTEX_MANAGER::putVertex( VERTEX& aTarget, GLfloat aX, GLfloat aY, GLfloat
}
}
void VERTEX_MANAGER::EnableDepthTest( bool aEnabled )
{
m_gpu->EnableDepthTest( aEnabled );
-1
View File
@@ -23,7 +23,6 @@
#include "git_add_to_index_handler.h"
#include <iterator>
#include <wx/string.h>
#include <wx/log.h>

Some files were not shown because too many files have changed in this diff Show More