Browse Source

Inline static bool Fp/3Dmode members to remember panel layout

Layout is remembered for Schematic/Symbol Editors and Footprint Chooser frames until KiCad restarts

Also Added a new button toggle to show/hide the description panel with some new images too


Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17610
pull/18/head
aris-kimi 5 months ago
committed by Seth Hillbrand
parent
commit
0cf866d4fb
  1. 8
      common/bitmap_info.cpp
  2. 8
      common/tool/common_tools.cpp
  3. 2
      include/bitmaps/bitmaps_list.h
  4. 90
      pcbnew/footprint_chooser_frame.cpp
  5. 8
      pcbnew/footprint_chooser_frame.h
  6. 3
      pcbnew/tools/pcb_grid_helper.cpp
  7. 16
      pcbnew/widgets/panel_footprint_chooser.cpp
  8. 5
      pcbnew/widgets/panel_footprint_chooser.h
  9. 2
      resources/bitmaps_png/CMakeLists.txt
  10. BIN
      resources/bitmaps_png/png/text_visibility_16.png
  11. BIN
      resources/bitmaps_png/png/text_visibility_32.png
  12. BIN
      resources/bitmaps_png/png/text_visibility_dark_16.png
  13. BIN
      resources/bitmaps_png/png/text_visibility_dark_32.png
  14. BIN
      resources/bitmaps_png/png/text_visibility_off_16.png
  15. BIN
      resources/bitmaps_png/png/text_visibility_off_32.png
  16. BIN
      resources/bitmaps_png/png/text_visibility_off_dark_16.png
  17. BIN
      resources/bitmaps_png/png/text_visibility_off_dark_32.png
  18. 133
      resources/bitmaps_png/sources/dark/text_visibility.svg
  19. 140
      resources/bitmaps_png/sources/dark/text_visibility_off.svg
  20. 134
      resources/bitmaps_png/sources/light/text_visibility.svg
  21. 142
      resources/bitmaps_png/sources/light/text_visibility_off.svg

8
common/bitmap_info.cpp

@ -102,6 +102,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_visibility].emplace_back( BITMAPS::text_visibility, wxT( "text_visibility_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_visibility_off].emplace_back( BITMAPS::text_visibility_off, wxT( "text_visibility_off_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_16.png" ), 16, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_16.png" ), 16, wxT( "light" ) );
@ -185,6 +187,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_visibility].emplace_back( BITMAPS::text_visibility, wxT( "text_visibility_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_visibility_off].emplace_back( BITMAPS::text_visibility_off, wxT( "text_visibility_off_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_dark_16.png" ), 16, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_dark_16.png" ), 16, wxT( "dark" ) );
@ -268,6 +272,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_visibility].emplace_back( BITMAPS::text_visibility, wxT( "text_visibility_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_visibility_off].emplace_back( BITMAPS::text_visibility_off, wxT( "text_visibility_off_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_32.png" ), 32, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_32.png" ), 32, wxT( "light" ) );
@ -351,6 +357,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_visibility].emplace_back( BITMAPS::text_visibility, wxT( "text_visibility_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_visibility_off].emplace_back( BITMAPS::text_visibility_off, wxT( "text_visibility_off_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_dark_32.png" ), 32, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_dark_32.png" ), 32, wxT( "dark" ) );

8
common/tool/common_tools.cpp

@ -460,6 +460,12 @@ int COMMON_TOOLS::doZoomToPreset( int idx, bool aCenterOnCursor )
{ {
std::vector<double>& zoomList = m_toolMgr->GetSettings()->m_Window.zoom_factors; std::vector<double>& zoomList = m_toolMgr->GetSettings()->m_Window.zoom_factors;
if( zoomList.empty() ) // When called from footprint chooser, zoomList is empty for some reason
zoomList = m_frame->config()->m_Window.zoom_factors;
// or: zoomList = Kiface().KifaceSettings()->m_Window.zoom_factors;
wxCHECK( !zoomList.empty(), 0 ); // To avoid a crash lower on scale from Fp Chooser panel
if( idx == 0 ) // Zoom Auto if( idx == 0 ) // Zoom Auto
{ {
TOOL_EVENT dummy; TOOL_EVENT dummy;
@ -801,5 +807,3 @@ void COMMON_TOOLS::setTransitions()
Go( &COMMON_TOOLS::ToggleCursorStyle, ACTIONS::toggleCursorStyle.MakeEvent() ); Go( &COMMON_TOOLS::ToggleCursorStyle, ACTIONS::toggleCursorStyle.MakeEvent() );
Go( &COMMON_TOOLS::ToggleBoundingBoxes, ACTIONS::toggleBoundingBoxes.MakeEvent() ); Go( &COMMON_TOOLS::ToggleBoundingBoxes, ACTIONS::toggleBoundingBoxes.MakeEvent() );
} }

2
include/bitmaps/bitmaps_list.h

@ -616,6 +616,8 @@ enum class BITMAPS : unsigned int
text_valign_top, text_valign_top,
text_valign_center, text_valign_center,
text_valign_bottom, text_valign_bottom,
text_visibility,
text_visibility_off,
text_horizontal, text_horizontal,
text_vertical, text_vertical,
text_bold, text_bold,

90
pcbnew/footprint_chooser_frame.cpp

@ -29,6 +29,7 @@
#include <board.h> #include <board.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/splitter.h>
#include <kiplatform/ui.h> #include <kiplatform/ui.h>
#include <lset.h> #include <lset.h>
#include <widgets/panel_footprint_chooser.h> #include <widgets/panel_footprint_chooser.h>
@ -99,11 +100,9 @@ FOOTPRINT_CHOOSER_FRAME::FOOTPRINT_CHOOSER_FRAME( KIWAY* aKiway, wxWindow* aPare
{ {
SetModal( true ); SetModal( true );
m_showFpMode = true;
m_show3DMode = false;
m_messagePanel->Hide(); m_messagePanel->Hide();
wxPanel* bottomPanel = new wxPanel( this );
m_bottomPanel = new wxPanel( this );
wxBoxSizer* bottomSizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bottomSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* frameSizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* frameSizer = new wxBoxSizer( wxVERTICAL );
@ -134,39 +133,46 @@ FOOTPRINT_CHOOSER_FRAME::FOOTPRINT_CHOOSER_FRAME( KIWAY* aKiway, wxWindow* aPare
GetBoard()->SetBoardUse( BOARD_USE::FPHOLDER ); GetBoard()->SetBoardUse( BOARD_USE::FPHOLDER );
build3DCanvas(); // must be called after creating m_chooserPanel build3DCanvas(); // must be called after creating m_chooserPanel
m_preview3DCanvas->Show( !m_showFpMode );
m_preview3DCanvas->Show( m_show3DMode );
// buttonsSizer contains the BITMAP buttons // buttonsSizer contains the BITMAP buttons
wxBoxSizer* buttonsSizer = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer* buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
buttonsSizer->Add( 0, 0, 1, 0, 5 ); // Add spacer to right-align buttons buttonsSizer->Add( 0, 0, 1, 0, 5 ); // Add spacer to right-align buttons
BITMAP_BUTTON* separator = new BITMAP_BUTTON( bottomPanel, wxID_ANY, wxNullBitmap );
m_toggleDescription = new BITMAP_BUTTON( m_bottomPanel, wxID_ANY, wxNullBitmap );
m_toggleDescription->SetIsRadioButton();
m_toggleDescription->SetBitmap( KiBitmapBundle( BITMAPS::text_visibility_off ) );
m_toggleDescription->Check( m_showDescription );
buttonsSizer->Add( m_toggleDescription, 0, wxRIGHT | wxLEFT | wxALIGN_CENTER_VERTICAL, 1 );
BITMAP_BUTTON* separator = new BITMAP_BUTTON( m_bottomPanel, wxID_ANY, wxNullBitmap );
separator->SetIsSeparator(); separator->SetIsSeparator();
buttonsSizer->Add( separator, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 1 ); buttonsSizer->Add( separator, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 1 );
m_grButton3DView = new BITMAP_BUTTON( bottomPanel, wxID_ANY, wxNullBitmap );
m_grButton3DView = new BITMAP_BUTTON( m_bottomPanel, wxID_ANY, wxNullBitmap );
m_grButton3DView->SetIsRadioButton(); m_grButton3DView->SetIsRadioButton();
m_grButton3DView->SetBitmap( KiBitmapBundle( BITMAPS::shape_3d ) ); m_grButton3DView->SetBitmap( KiBitmapBundle( BITMAPS::shape_3d ) );
m_grButton3DView->Check( !m_showFpMode );
m_grButton3DView->Check( m_show3DMode );
buttonsSizer->Add( m_grButton3DView, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 1 ); buttonsSizer->Add( m_grButton3DView, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 1 );
m_grButtonFpView = new BITMAP_BUTTON( bottomPanel, wxID_ANY, wxNullBitmap );
m_grButtonFpView = new BITMAP_BUTTON( m_bottomPanel, wxID_ANY, wxNullBitmap );
m_grButtonFpView->SetIsRadioButton(); m_grButtonFpView->SetIsRadioButton();
m_grButtonFpView->SetBitmap( KiBitmapBundle( BITMAPS::module ) ); m_grButtonFpView->SetBitmap( KiBitmapBundle( BITMAPS::module ) );
m_grButtonFpView->Check( m_showFpMode ); m_grButtonFpView->Check( m_showFpMode );
buttonsSizer->Add( m_grButtonFpView, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 1 ); buttonsSizer->Add( m_grButtonFpView, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 1 );
separator = new BITMAP_BUTTON( bottomPanel, wxID_ANY, wxNullBitmap );
separator = new BITMAP_BUTTON( m_bottomPanel, wxID_ANY, wxNullBitmap );
separator->SetIsSeparator(); separator->SetIsSeparator();
buttonsSizer->Add( separator, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 1 ); buttonsSizer->Add( separator, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 1 );
m_show3DViewer = new wxCheckBox( bottomPanel, wxID_ANY, _( "Show 3D viewer in own window" ) );
m_show3DViewer = new wxCheckBox( m_bottomPanel, wxID_ANY, _( "Show 3D viewer in own window" ) );
buttonsSizer->Add( m_show3DViewer, 0, wxALL | wxALIGN_CENTER_VERTICAL, 3 ); buttonsSizer->Add( m_show3DViewer, 0, wxALL | wxALIGN_CENTER_VERTICAL, 3 );
wxStdDialogButtonSizer* sdbSizer = new wxStdDialogButtonSizer(); wxStdDialogButtonSizer* sdbSizer = new wxStdDialogButtonSizer();
wxButton* okButton = new wxButton( bottomPanel, wxID_OK );
wxButton* cancelButton = new wxButton( bottomPanel, wxID_CANCEL );
wxButton* okButton = new wxButton( m_bottomPanel, wxID_OK );
wxButton* cancelButton = new wxButton( m_bottomPanel, wxID_CANCEL );
sdbSizer->AddButton( okButton ); sdbSizer->AddButton( okButton );
sdbSizer->AddButton( cancelButton ); sdbSizer->AddButton( cancelButton );
@ -176,8 +182,8 @@ FOOTPRINT_CHOOSER_FRAME::FOOTPRINT_CHOOSER_FRAME( KIWAY* aKiway, wxWindow* aPare
buttonsSizer->Add( sdbSizer, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5 ); buttonsSizer->Add( sdbSizer, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5 );
bottomSizer->Add( buttonsSizer, 0, wxEXPAND, 5 ); bottomSizer->Add( buttonsSizer, 0, wxEXPAND, 5 );
bottomPanel->SetSizer( bottomSizer );
frameSizer->Add( bottomPanel, 0, wxEXPAND );
m_bottomPanel->SetSizer( bottomSizer );
frameSizer->Add( m_bottomPanel, 0, wxEXPAND );
SetSizer( frameSizer ); SetSizer( frameSizer );
@ -187,6 +193,15 @@ FOOTPRINT_CHOOSER_FRAME::FOOTPRINT_CHOOSER_FRAME( KIWAY* aKiway, wxWindow* aPare
Layout(); Layout();
m_chooserPanel->FinishSetup(); m_chooserPanel->FinishSetup();
if( !m_showDescription )
{
m_chooserPanel->GetVerticalSpliter()->SetMinimumPaneSize( 0 );
m_chooserPanel->GetVerticalSpliter()->GetWindow2()->Hide();
m_chooserPanel->GetVerticalSpliter()->SetSashInvisible();
m_toggleDescription->SetBitmap( KiBitmapBundle( BITMAPS::text_visibility ) );
}
// Create the manager and dispatcher & route draw panel events to the dispatcher // Create the manager and dispatcher & route draw panel events to the dispatcher
m_toolManager = new TOOL_MANAGER; m_toolManager = new TOOL_MANAGER;
m_toolManager->SetEnvironment( GetBoard(), GetCanvas()->GetView(), m_toolManager->SetEnvironment( GetBoard(), GetCanvas()->GetView(),
@ -207,8 +222,14 @@ FOOTPRINT_CHOOSER_FRAME::FOOTPRINT_CHOOSER_FRAME( KIWAY* aKiway, wxWindow* aPare
m_toolManager->InitTools(); m_toolManager->InitTools();
setupUIConditions(); setupUIConditions();
updatePanelsVisibility();
// clang-format off
// Connect Events // Connect Events
m_toggleDescription->Connect( wxEVT_COMMAND_BUTTON_CLICKED ,
wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::toggleBottomSplit ),
nullptr,this );
m_grButton3DView->Connect( wxEVT_COMMAND_BUTTON_CLICKED , m_grButton3DView->Connect( wxEVT_COMMAND_BUTTON_CLICKED ,
wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::on3DviewReq ), wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::on3DviewReq ),
nullptr, this ); nullptr, this );
@ -223,6 +244,7 @@ FOOTPRINT_CHOOSER_FRAME::FOOTPRINT_CHOOSER_FRAME( KIWAY* aKiway, wxWindow* aPare
Connect( FP_SELECTION_EVENT, // custom event fired by a PANEL_FOOTPRINT_CHOOSER Connect( FP_SELECTION_EVENT, // custom event fired by a PANEL_FOOTPRINT_CHOOSER
wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::onFpChanged ), nullptr, this ); wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::onFpChanged ), nullptr, this );
// clang-format on
// Needed on Linux to fix the position of widgets in bottomPanel // Needed on Linux to fix the position of widgets in bottomPanel
PostSizeEvent(); PostSizeEvent();
@ -242,7 +264,12 @@ FOOTPRINT_CHOOSER_FRAME::~FOOTPRINT_CHOOSER_FRAME()
// Disconnect board, which is owned by FOOTPRINT_PREVIEW_PANEL. // Disconnect board, which is owned by FOOTPRINT_PREVIEW_PANEL.
m_pcb = nullptr; m_pcb = nullptr;
// clang-format off
// Disconnect Events // Disconnect Events
m_toggleDescription->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED,
wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::toggleBottomSplit ),
nullptr, this );
m_grButton3DView->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, m_grButton3DView->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED,
wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::on3DviewReq ), wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::on3DviewReq ),
nullptr, this ); nullptr, this );
@ -256,6 +283,7 @@ FOOTPRINT_CHOOSER_FRAME::~FOOTPRINT_CHOOSER_FRAME()
Disconnect( FP_SELECTION_EVENT, Disconnect( FP_SELECTION_EVENT,
wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::onFpChanged ), nullptr, this ); wxCommandEventHandler( FOOTPRINT_CHOOSER_FRAME::onFpChanged ), nullptr, this );
// clang-format on
if( PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( Kiface().KifaceSettings() ) ) if( PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( Kiface().KifaceSettings() ) )
{ {
@ -665,6 +693,40 @@ void FOOTPRINT_CHOOSER_FRAME::build3DCanvas()
} }
void FOOTPRINT_CHOOSER_FRAME::toggleBottomSplit( wxCommandEvent& event )
{
m_showDescription = !m_showDescription;
m_toggleDescription->Check( m_showDescription );
m_chooserPanel->GetDetailsPanel()->Show( m_showDescription );
if( !m_showDescription )
{
m_chooserPanel->GetVerticalSpliter()->SetMinimumPaneSize( GetSize().GetHeight() );
m_chooserPanel->GetVerticalSpliter()->SetSashPosition(
GetSize().GetHeight() + m_chooserPanel->GetDetailsPanel()->GetSize().GetHeight() );
m_chooserPanel->GetVerticalSpliter()->GetWindow2()->Hide();
m_chooserPanel->GetVerticalSpliter()->SetSashInvisible();
m_toggleDescription->SetBitmap( KiBitmapBundle( BITMAPS::text_visibility ) );
}
else
{
m_chooserPanel->GetVerticalSpliter()->SetMinimumPaneSize( 80 );
m_chooserPanel->GetVerticalSpliter()->GetWindow2()->Show();
m_chooserPanel->GetVerticalSpliter()->SetSashInvisible( false );
m_toggleDescription->SetBitmap( KiBitmapBundle( BITMAPS::text_visibility_off ) );
}
m_chooserPanel->GetVerticalSpliter()->UpdateSize();
m_chooserPanel->Layout();
m_chooserPanel->Refresh();
}
void FOOTPRINT_CHOOSER_FRAME::on3DviewReq( wxCommandEvent& event ) void FOOTPRINT_CHOOSER_FRAME::on3DviewReq( wxCommandEvent& event )
{ {
if( m_show3DMode == true ) if( m_show3DMode == true )

8
pcbnew/footprint_chooser_frame.h

@ -95,6 +95,7 @@ private:
WINDOW_SETTINGS* GetWindowSettings( APP_SETTINGS_BASE* aCfg ) override; WINDOW_SETTINGS* GetWindowSettings( APP_SETTINGS_BASE* aCfg ) override;
COLOR_SETTINGS* GetColorSettings( bool aForceRefresh ) const override; COLOR_SETTINGS* GetColorSettings( bool aForceRefresh ) const override;
void toggleBottomSplit( wxCommandEvent& event );
void on3DviewReq( wxCommandEvent& event ); void on3DviewReq( wxCommandEvent& event );
void onFpViewReq( wxCommandEvent& event ); void onFpViewReq( wxCommandEvent& event );
void onExternalViewer3DEnable( wxCommandEvent& aEvent ); void onExternalViewer3DEnable( wxCommandEvent& aEvent );
@ -121,8 +122,10 @@ private:
private: private:
PANEL_FOOTPRINT_CHOOSER* m_chooserPanel; PANEL_FOOTPRINT_CHOOSER* m_chooserPanel;
bool m_showFpMode; // True to show the footprint
bool m_show3DMode; // True to show the 3D model
wxPanel* m_bottomPanel;
inline static bool m_showDescription = true; // Init true to show the m_details panel
inline static bool m_showFpMode = true; // Init true to show the footprint
inline static bool m_show3DMode = false; // Init false to hide the 3D model
wxCheckBox* m_filterByPinCount; wxCheckBox* m_filterByPinCount;
wxCheckBox* m_filterByFPFilters; wxCheckBox* m_filterByFPFilters;
wxCheckBox* m_show3DViewer; wxCheckBox* m_show3DViewer;
@ -131,6 +134,7 @@ private:
EDA_3D_CANVAS* m_preview3DCanvas; EDA_3D_CANVAS* m_preview3DCanvas;
CAMERA& m_currentCamera; CAMERA& m_currentCamera;
TRACK_BALL m_trackBallCamera; TRACK_BALL m_trackBallCamera;
BITMAP_BUTTON* m_toggleDescription;
BITMAP_BUTTON* m_grButtonFpView; BITMAP_BUTTON* m_grButtonFpView;
BITMAP_BUTTON* m_grButton3DView; BITMAP_BUTTON* m_grButton3DView;

3
pcbnew/tools/pcb_grid_helper.cpp

@ -69,7 +69,7 @@ std::optional<INTERSECTABLE_GEOM> GetBoardIntersectable( const BOARD_ITEM& aItem
{ {
case PCB_SHAPE_T: case PCB_SHAPE_T:
{ {
const PCB_SHAPE& shape = static_cast<const PCB_SHAPE&>( aItem );
PCB_SHAPE shape = static_cast<const PCB_SHAPE&>( aItem );
switch( shape.GetShape() ) switch( shape.GetShape() )
{ {
@ -1770,6 +1770,7 @@ PCB_GRID_HELPER::ANCHOR* PCB_GRID_HELPER::nearestAnchor( const VECTOR2I& aPos, i
for( ANCHOR* const anchor : anchorsAtMinDistance ) for( ANCHOR* const anchor : anchorsAtMinDistance )
{ {
ecoord distToNearestItem = std::numeric_limits<ecoord>::max(); ecoord distToNearestItem = std::numeric_limits<ecoord>::max();
for( EDA_ITEM* const item : anchor->items ) for( EDA_ITEM* const item : anchor->items )
{ {
if( !item ) if( !item )

16
pcbnew/widgets/panel_footprint_chooser.cpp

@ -121,19 +121,19 @@ PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER( PCB_BASE_FRAME* aFrame, wxTopL
m_vsplitter->SetExtraStyle( wxWS_EX_TRANSIENT ); m_vsplitter->SetExtraStyle( wxWS_EX_TRANSIENT );
m_hsplitter->SetExtraStyle( wxWS_EX_TRANSIENT ); m_hsplitter->SetExtraStyle( wxWS_EX_TRANSIENT );
auto detailsPanel = new wxPanel( m_vsplitter );
m_detailsPanel = new wxPanel( m_vsplitter );
auto detailsSizer = new wxBoxSizer( wxVERTICAL ); auto detailsSizer = new wxBoxSizer( wxVERTICAL );
detailsPanel->SetSizer( detailsSizer );
m_detailsPanel->SetSizer( detailsSizer );
m_details = new HTML_WINDOW( detailsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize );
m_details = new HTML_WINDOW( m_detailsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize );
detailsSizer->Add( m_details, 1, wxEXPAND, 5 ); detailsSizer->Add( m_details, 1, wxEXPAND, 5 );
detailsPanel->Layout();
detailsSizer->Fit( detailsPanel );
m_detailsPanel->Layout();
detailsSizer->Fit( m_detailsPanel );
m_vsplitter->SetSashGravity( 0.5 ); m_vsplitter->SetSashGravity( 0.5 );
// Ensure the splitted areas are always shown (i.e. 0 size not allowed)
// Ensure splitted areas are always shown (i.e. 0 size not allowed) when m_detailsPanel is shown
m_vsplitter->SetMinimumPaneSize( 80 ); // arbitrary value but reasonable min size m_vsplitter->SetMinimumPaneSize( 80 ); // arbitrary value but reasonable min size
m_vsplitter->SplitHorizontally( m_hsplitter, detailsPanel );
m_vsplitter->SplitHorizontally( m_hsplitter, m_detailsPanel );
sizer->Add( m_vsplitter, 1, wxEXPAND, 5 ); sizer->Add( m_vsplitter, 1, wxEXPAND, 5 );
@ -414,5 +414,3 @@ void PANEL_FOOTPRINT_CHOOSER::OnDetailsCharHook( wxKeyEvent& e )
e.Skip(); e.Skip();
} }
} }

5
pcbnew/widgets/panel_footprint_chooser.h

@ -79,6 +79,10 @@ public:
FOOTPRINT_PREVIEW_WIDGET* GetViewerPanel() const { return m_preview_ctrl; } FOOTPRINT_PREVIEW_WIDGET* GetViewerPanel() const { return m_preview_ctrl; }
wxSplitterWindow* GetVerticalSpliter() const { return m_vsplitter; }
wxPanel* GetDetailsPanel() const { return m_detailsPanel; }
protected: protected:
static constexpr int DblClickDelay = 100; // milliseconds static constexpr int DblClickDelay = 100; // milliseconds
@ -109,6 +113,7 @@ public:
const FOOTPRINT* m_CurrFootprint; const FOOTPRINT* m_CurrFootprint;
protected: protected:
wxPanel* m_detailsPanel;
wxTimer* m_dbl_click_timer; wxTimer* m_dbl_click_timer;
wxTimer* m_open_libs_timer; wxTimer* m_open_libs_timer;
wxSplitterWindow* m_hsplitter; wxSplitterWindow* m_hsplitter;

2
resources/bitmaps_png/CMakeLists.txt

@ -143,6 +143,8 @@ set( BMAPS_SMALL
text_valign_top text_valign_top
text_valign_center text_valign_center
text_valign_bottom text_valign_bottom
text_visibility
text_visibility_off
text_bold text_bold
text_italic text_italic
text_mirrored text_mirrored

BIN
resources/bitmaps_png/png/text_visibility_16.png

After

Width: 16  |  Height: 16  |  Size: 499 B

BIN
resources/bitmaps_png/png/text_visibility_32.png

After

Width: 32  |  Height: 32  |  Size: 953 B

BIN
resources/bitmaps_png/png/text_visibility_dark_16.png

After

Width: 16  |  Height: 16  |  Size: 543 B

BIN
resources/bitmaps_png/png/text_visibility_dark_32.png

After

Width: 32  |  Height: 32  |  Size: 1.0 KiB

BIN
resources/bitmaps_png/png/text_visibility_off_16.png

After

Width: 16  |  Height: 16  |  Size: 375 B

BIN
resources/bitmaps_png/png/text_visibility_off_32.png

After

Width: 32  |  Height: 32  |  Size: 710 B

BIN
resources/bitmaps_png/png/text_visibility_off_dark_16.png

After

Width: 16  |  Height: 16  |  Size: 581 B

BIN
resources/bitmaps_png/png/text_visibility_off_dark_32.png

After

Width: 32  |  Height: 32  |  Size: 994 B

133
resources/bitmaps_png/sources/dark/text_visibility.svg

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
id="Слой_1"
data-name="Слой 1"
viewBox="0 0 24 24"
version="1.1"
sodipodi:docname="text_visibility.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1003"
id="namedview30"
showgrid="true"
inkscape:zoom="16.265564"
inkscape:cx="3.4428563"
inkscape:cy="13.03367"
inkscape:window-x="1600"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:document-rotation="0"
inkscape:current-layer="Слой_1"
inkscape:showpageshadow="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid_kicad"
spacingx="0.5"
spacingy="0.5"
color="#9999ff"
opacity="0.13"
empspacing="2" />
</sodipodi:namedview>
<metadata
id="metadata43">
<rdf:RDF>
<cc:Work
rdf:about="">
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>text_sketch</dc:title>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<defs
id="defs160041">
<style
id="style160039">.cls-1{fill:#DED3DD;}.cls-2{fill:#42B8EB;}.cls-3{fill:#8f8f8f;}</style>
</defs>
<title
id="title160043">text_sketch</title>
<circle
class="cls-1"
cx="12"
cy="12"
id="circle27619"
style="fill:#404040;fill-opacity:1;stroke-width:0.833333"
r="10" />
<path
class="cls-1"
d="M 21.2556,3.2141 H 14.0028 V 9.94 L 9.9972,13.8114 V 3.2141 H 2.7444 V 0 h 18.5112 z"
id="path160045" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:36.6532px;line-height:1.25;font-family:sans-serif;fill:#ded3dd;fill-opacity:1;stroke:none;stroke-width:1.52722"
x="0.83780843"
y="23.999969"
id="text863"><tspan
sodipodi:role="line"
id="tspan861"
x="0.83780843"
y="23.999969"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36.6532px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, ';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#ded3dd;stroke-width:1.52722">T</tspan></text>
<line
class="cls-3"
x1="0.5"
y1="23.5"
x2="23.5"
y2="0.5"
id="line158655"
style="fill:none;stroke:#DED3DD;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
class="cls-2"
d="m 20.100501,11.999999 c 0,0 -3.62675,4.403251 -8.100501,4.403251 -4.473749,0 -8.1004994,-4.403251 -8.1004994,-4.403251 0,0 3.6267504,-4.403416 8.1004994,-4.403416 4.473751,0 8.100501,4.403416 8.100501,4.403416 z"
id="path27621"
style="fill:#ded3dd;fill-opacity:1;stroke-width:0.833333" />
<circle
class="cls-1"
cx="12"
cy="12"
id="circle27623"
style="fill:#404040;fill-opacity:1;stroke-width:0.833333"
r="2.9971669" />
<path
class="cls-2"
d="M 13.868501,11.999999 A 1.8684166,1.8684166 0 1 1 12,10.129917 a 1.8692499,1.8692499 0 0 1 1.868501,1.870082 z"
id="path27625"
style="fill:#ded3dd;fill-opacity:1;stroke-width:0.833333" />
</svg>

140
resources/bitmaps_png/sources/dark/text_visibility_off.svg

@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
id="Слой_1"
data-name="Слой 1"
viewBox="0 0 24 24"
version="1.1"
sodipodi:docname="text_visibility_off.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1560"
inkscape:window-height="863"
id="namedview30"
showgrid="true"
inkscape:zoom="16.265564"
inkscape:cx="3.4428563"
inkscape:cy="13.03367"
inkscape:window-x="40"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:document-rotation="0"
inkscape:current-layer="Слой_1"
inkscape:showpageshadow="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid_kicad"
spacingx="0.5"
spacingy="0.5"
color="#9999ff"
opacity="0.13"
empspacing="2" />
</sodipodi:namedview>
<metadata
id="metadata43">
<rdf:RDF>
<cc:Work
rdf:about="">
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>text_sketch</dc:title>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<defs
id="defs160041">
<style
id="style160039">.cls-1{fill:#DED3DD;}.cls-2{fill:#42B8EB;}.cls-3{fill:#8f8f8f;}</style>
</defs>
<title
id="title160043">text_sketch</title>
<circle
class="cls-1"
cx="12"
cy="12"
r="10"
id="circle27637"
style="fill:#404040;fill-opacity:1;stroke-width:0.833333" />
<path
class="cls-1"
d="M 21.2556,3.2141 H 14.0028 V 9.94 L 9.9972,13.8114 V 3.2141 H 2.7444 V 0 h 18.5112 z"
id="path160045" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:36.6532px;line-height:1.25;font-family:sans-serif;fill:#ded3dd;fill-opacity:1;stroke:none;stroke-width:1.52722"
x="0.83780843"
y="23.999969"
id="text863"><tspan
sodipodi:role="line"
id="tspan861"
x="0.83780843"
y="23.999969"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36.6532px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, ';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#ded3dd;stroke-width:1.52722">T</tspan></text>
<path
class="cls-2"
d="m 20.100497,12 c 0,0 -3.62675,4.40325 -8.1005,4.40325 C 7.526248,16.40325 3.8994981,12 3.8994981,12 c 0,0 3.6267499,-4.403417 8.1004989,-4.403417 4.47375,0 8.1005,4.403417 8.1005,4.403417 z"
id="path27639"
style="fill:#848484;fill-opacity:1;stroke-width:0.833333" />
<path
class="cls-1"
d="m 9.338081,13.380167 a 2.9985833,2.9985833 0 0 1 4.337666,-3.867834 c 0.79725,0.539167 -3.838583,4.83025 -4.337666,3.867834 z"
id="path27641"
style="fill:#404040;fill-opacity:1;stroke-width:0.833333" />
<rect
class="cls-1"
x="-6.7036033"
y="15.509354"
width="12.887166"
height="2.8555"
transform="rotate(-44.974)"
id="rect27643"
style="fill:#404040;fill-opacity:1;stroke-width:0.833333" />
<line
class="cls-3"
x1="0.5"
y1="23.5"
x2="23.5"
y2="0.5"
id="line158655"
style="fill:none;stroke:#DED3DD;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
class="cls-3"
d="M 6.2444981,17.7185 A 0.89291667,0.89291667 0 0 1 5.6131653,16.1935 L 16.161247,5.6351664 a 0.893636,0.893636 0 1 1 1.26275,1.2648333 L 6.8759153,17.457583 A 0.889,0.889 0 0 1 6.2444981,17.7185 Z"
id="path27645"
style="fill:#848484;fill-opacity:1;stroke-width:0.833333" />
</svg>

134
resources/bitmaps_png/sources/light/text_visibility.svg

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
id="Слой_1"
data-name="Слой 1"
viewBox="0 0 24 24"
version="1.1"
sodipodi:docname="text_visibility.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1560"
inkscape:window-height="863"
id="namedview30"
showgrid="true"
inkscape:zoom="16.265564"
inkscape:cx="3.4428563"
inkscape:cy="13.03367"
inkscape:window-x="40"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:document-rotation="0"
inkscape:current-layer="Слой_1"
inkscape:showpageshadow="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid_kicad"
spacingx="0.5"
spacingy="0.5"
color="#9999ff"
opacity="0.13"
empspacing="2" />
</sodipodi:namedview>
<metadata
id="metadata43">
<rdf:RDF>
<cc:Work
rdf:about="">
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>text_sketch</dc:title>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<defs
id="defs160041">
<style
id="style160039">.cls-1{fill:#DED3DD;}.cls-2{fill:#42B8EB;}.cls-3{fill:#8f8f8f;}</style>
</defs>
<title
id="title160043">text_sketch</title>
<path
class="cls-1"
d="M 21.2556,3.2141 H 14.0028 V 9.94 L 9.9972,13.8114 V 3.2141 H 2.7444 V 0 h 18.5112 z"
id="path160045"
style="fill:#545454;fill-opacity:1" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:36.6532px;line-height:1.25;font-family:sans-serif;fill:#545454;fill-opacity:1;stroke:none;stroke-width:1.52722"
x="0.83780843"
y="23.999969"
id="text863"><tspan
sodipodi:role="line"
id="tspan861"
x="0.83780843"
y="23.999969"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36.6532px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, ';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#545454;stroke-width:1.52722;fill-opacity:1">T</tspan></text>
<circle
class="cls-1"
cx="12"
cy="12"
id="circle27619"
style="fill:#545454;fill-opacity:1;stroke:#b9b9b9;stroke-width:0.64;stroke-opacity:1"
r="7.6800003" />
<line
class="cls-3"
x1="0.5"
y1="23.5"
x2="23.5"
y2="0.5"
id="line158655"
style="fill:none;stroke:#545454;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
class="cls-2"
d="m 18.221184,11.999999 c 0,0 -2.785344,3.381697 -6.221184,3.381697 -3.4358395,0 -6.2211838,-3.381697 -6.2211838,-3.381697 0,0 2.7853443,-3.3818235 6.2211838,-3.3818235 3.43584,0 6.221184,3.3818235 6.221184,3.3818235 z"
id="path27621"
style="fill:#ded3dd;fill-opacity:1;stroke-width:0.64" />
<circle
class="cls-1"
cx="12"
cy="12"
id="circle27623"
style="fill:#404040;fill-opacity:1;stroke-width:0.64"
r="2.3018241" />
<path
class="cls-2"
d="M 13.868501,11.999999 A 1.8684166,1.8684166 0 1 1 12,10.129917 a 1.8692499,1.8692499 0 0 1 1.868501,1.870082 z"
id="path27625"
style="fill:#ded3dd;fill-opacity:1;stroke-width:0.833333" />
</svg>

142
resources/bitmaps_png/sources/light/text_visibility_off.svg

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
id="Слой_1"
data-name="Слой 1"
viewBox="0 0 24 24"
version="1.1"
sodipodi:docname="text_visibility_off.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1003"
id="namedview30"
showgrid="true"
inkscape:zoom="16.265564"
inkscape:cx="3.4428563"
inkscape:cy="13.03367"
inkscape:window-x="1600"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:document-rotation="0"
inkscape:current-layer="Слой_1"
inkscape:showpageshadow="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid_kicad"
spacingx="0.5"
spacingy="0.5"
color="#9999ff"
opacity="0.13"
empspacing="2" />
</sodipodi:namedview>
<metadata
id="metadata43">
<rdf:RDF>
<cc:Work
rdf:about="">
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>text_sketch</dc:title>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<defs
id="defs160041">
<style
id="style160039">.cls-1{fill:#DED3DD;}.cls-2{fill:#42B8EB;}.cls-3{fill:#8f8f8f;}</style>
</defs>
<title
id="title160043">text_sketch</title>
<path
class="cls-1"
d="M 21.2556,3.2141 H 14.0028 V 9.94 L 9.9972,13.8114 V 3.2141 H 2.7444 V 0 h 18.5112 z"
id="path160045"
style="fill:#333333;fill-opacity:1" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:36.6532px;line-height:1.25;font-family:sans-serif;fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.52722"
x="0.83780843"
y="23.999969"
id="text863"><tspan
sodipodi:role="line"
id="tspan861"
x="0.83780843"
y="23.999969"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36.6532px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, ';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#333333;stroke-width:1.52722;fill-opacity:1">T</tspan></text>
<line
class="cls-3"
x1="0.5"
y1="23.5"
x2="23.5"
y2="0.5"
id="line158655"
style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<ellipse
class="cls-1"
cx="12"
cy="12"
id="circle27637"
style="fill:#b9b9b9;fill-opacity:1;stroke:#545454;stroke-width:0.64;stroke-opacity:1"
rx="7.6800003"
ry="7.6799998" />
<path
class="cls-2"
d="m 18.221181,12 c 0,0 -2.785344,3.381696 -6.221183,3.381696 C 8.5641582,15.381696 5.7788142,12 5.7788142,12 c 0,0 2.785344,-3.3818246 6.2211838,-3.3818246 C 15.435837,8.6181754 18.221181,12 18.221181,12 Z"
id="path27639"
style="fill:#f5f5f5;fill-opacity:1;stroke-width:0.64" />
<path
class="cls-1"
d="m 9.955646,13.059968 a 2.302912,2.3029119 0 0 1 3.331327,-2.970497 c 0.612288,0.414081 -2.948031,3.709632 -3.331327,2.970497 z"
id="path27641"
style="fill:#b9b9b9;fill-opacity:1;stroke-width:0.64" />
<rect
class="cls-1"
x="-3.6002963"
y="16.185017"
width="6.9281406"
height="1.5351168"
transform="rotate(-44.973999)"
id="rect27643"
style="fill:#b9b9b9;fill-opacity:1;stroke-width:0.448" />
<path
class="cls-3"
d="M 6.8019747,17.008997 A 0.79585544,0.79588715 0 0 1 6.2392687,15.649713 L 15.640759,6.2387076 a 0.79649658,0.79652832 0 1 1 1.125487,1.1273891 l -9.40149,9.4103353 a 0.79236452,0.79239609 0 0 1 -0.5627813,0.232565 z"
id="path27645"
style="fill:#545454;fill-opacity:1;stroke-width:0.742625;stroke-dasharray:none" />
</svg>
Loading…
Cancel
Save