ADDED: Icon scaling for toolbars only
Unlike the old "icon scale" (that actually scaled all bitmaps) this one actually changes the toolbar size while making use of the new bitmap bundle functionality Add more resolutions for all tool icon bitmaps Wouldn't want Mark's eyes to bleed
|
@ -146,8 +146,9 @@ wxBitmapBundle BITMAP_STORE::GetDisabledBitmapBundle( BITMAPS aBitmapId )
|
|||
if( info.theme != m_theme )
|
||||
continue;
|
||||
|
||||
bmps.push_back( wxBitmap( getImage( info.id, info.height ) )
|
||||
.ConvertToDisabled( KIPLATFORM::UI::IsDarkTheme() ? 70 : 255 ) );
|
||||
wxBitmap bmp( getImage( info.id, info.height )
|
||||
.ConvertToDisabled( KIPLATFORM::UI::IsDarkTheme() ? 70 : 255 ) );
|
||||
bmps.push_back( bmp );
|
||||
}
|
||||
|
||||
return wxBitmapBundle::FromBitmaps( bmps );
|
||||
|
|
|
@ -178,6 +178,13 @@ bool PANEL_COMMON_SETTINGS::TransferDataFromWindow()
|
|||
else if( m_rbIconThemeAuto->GetValue() )
|
||||
commonSettings->m_Appearance.icon_theme = ICON_THEME::AUTO;
|
||||
|
||||
if( m_rbIconSizeSmall->GetValue() )
|
||||
commonSettings->m_Appearance.toolbar_icon_size = 16;
|
||||
else if( m_rbIconSizeNormal->GetValue() )
|
||||
commonSettings->m_Appearance.toolbar_icon_size = 24;
|
||||
else if( m_rbIconSizeLarge->GetValue() )
|
||||
commonSettings->m_Appearance.toolbar_icon_size = 32;
|
||||
|
||||
commonSettings->m_Appearance.use_icons_in_menus = m_checkBoxIconsInMenus->GetValue();
|
||||
commonSettings->m_Appearance.apply_icon_scale_to_fonts = m_scaleFonts->GetValue();
|
||||
|
||||
|
@ -259,6 +266,13 @@ void PANEL_COMMON_SETTINGS::applySettingsToPanel( COMMON_SETTINGS& aSettings )
|
|||
case ICON_THEME::AUTO: m_rbIconThemeAuto->SetValue( true ); break;
|
||||
}
|
||||
|
||||
switch( aSettings.m_Appearance.toolbar_icon_size )
|
||||
{
|
||||
case 16: m_rbIconSizeSmall->SetValue( true ); break;
|
||||
case 24: m_rbIconSizeNormal->SetValue( true ); break;
|
||||
case 32: m_rbIconSizeLarge->SetValue( true ); break;
|
||||
}
|
||||
|
||||
m_checkBoxIconsInMenus->SetValue( aSettings.m_Appearance.use_icons_in_menus );
|
||||
m_scaleFonts->SetValue( aSettings.m_Appearance.apply_icon_scale_to_fonts );
|
||||
|
||||
|
|
|
@ -188,6 +188,31 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
|
||||
bUserInterfaceSizer->Add( bSizerIconsTheme, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerToolbarSize;
|
||||
bSizerToolbarSize = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_stToolbarIconSize = new wxStaticText( this, wxID_ANY, _("Toolbar icon size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_stToolbarIconSize->Wrap( -1 );
|
||||
bSizerToolbarSize->Add( m_stToolbarIconSize, 0, wxALL, 5 );
|
||||
|
||||
m_rbIconSizeSmall = new wxRadioButton( this, wxID_ANY, _("Small"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_rbIconSizeSmall->SetToolTip( _("Use compact icons in the toolbars") );
|
||||
|
||||
bSizerToolbarSize->Add( m_rbIconSizeSmall, 0, wxALL, 5 );
|
||||
|
||||
m_rbIconSizeNormal = new wxRadioButton( this, wxID_ANY, _("Normal"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_rbIconSizeNormal->SetToolTip( _("Use the default KiCad icon size in the toolbars") );
|
||||
|
||||
bSizerToolbarSize->Add( m_rbIconSizeNormal, 0, wxALL, 5 );
|
||||
|
||||
m_rbIconSizeLarge = new wxRadioButton( this, wxID_ANY, _("Large"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_rbIconSizeLarge->SetToolTip( _("Use larger icons in the toolbars") );
|
||||
|
||||
bSizerToolbarSize->Add( m_rbIconSizeLarge, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bUserInterfaceSizer->Add( bSizerToolbarSize, 0, wxEXPAND, 5 );
|
||||
|
||||
m_gbUserInterface = new wxGridBagSizer( 5, 0 );
|
||||
m_gbUserInterface->SetFlexibleDirection( wxVERTICAL );
|
||||
m_gbUserInterface->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
|
||||
|
|
|
@ -1534,16 +1534,16 @@
|
|||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerIconsTheme</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1600,11 +1600,11 @@
|
|||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioButton" expanded="1">
|
||||
<object class="wxRadioButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1664,11 +1664,11 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioButton" expanded="1">
|
||||
<object class="wxRadioButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1728,11 +1728,11 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioButton" expanded="1">
|
||||
<object class="wxRadioButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -1794,6 +1794,270 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerToolbarSize</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</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">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Toolbar icon size:</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_stToolbarIconSize</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">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioButton" 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">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Small</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_rbIconSizeSmall</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">Use compact icons in the toolbars</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">0</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">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioButton" 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">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Normal</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_rbIconSizeNormal</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">Use the default KiCad icon size in the toolbars</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">0</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">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioButton" 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">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Large</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_rbIconSizeLarge</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">Use larger icons in the toolbars</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">0</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxEXPAND</property>
|
||||
|
|
|
@ -67,6 +67,10 @@ class PANEL_COMMON_SETTINGS_BASE : public RESETTABLE_PANEL
|
|||
wxRadioButton* m_rbIconThemeLight;
|
||||
wxRadioButton* m_rbIconThemeDark;
|
||||
wxRadioButton* m_rbIconThemeAuto;
|
||||
wxStaticText* m_stToolbarIconSize;
|
||||
wxRadioButton* m_rbIconSizeSmall;
|
||||
wxRadioButton* m_rbIconSizeNormal;
|
||||
wxRadioButton* m_rbIconSizeLarge;
|
||||
wxGridBagSizer* m_gbUserInterface;
|
||||
wxStaticText* m_staticTextCanvasScale;
|
||||
wxSpinCtrlDouble* m_canvasScaleCtrl;
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include <settings/settings_manager.h>
|
||||
#include <title_block.h>
|
||||
#include <tool/actions.h>
|
||||
#include <tool/action_toolbar.h>
|
||||
#include <tool/common_tools.h>
|
||||
#include <tool/grid_menu.h>
|
||||
#include <tool/selection_conditions.h>
|
||||
|
@ -91,7 +92,8 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
|||
long aStyle, const wxString& aFrameName,
|
||||
const EDA_IU_SCALE& aIuScale ) :
|
||||
KIWAY_PLAYER( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName, aIuScale ),
|
||||
m_socketServer( nullptr )
|
||||
m_socketServer( nullptr ),
|
||||
m_lastToolbarIconSize( 0 )
|
||||
{
|
||||
m_mainToolBar = nullptr;
|
||||
m_drawToolBar = nullptr;
|
||||
|
@ -343,6 +345,13 @@ void EDA_DRAW_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars
|
|||
GetToolManager()->RunAction( ACTIONS::gridPreset, config()->m_Window.grid.last_size_idx );
|
||||
UpdateGridSelectBox();
|
||||
|
||||
if( m_lastToolbarIconSize == 0
|
||||
|| m_lastToolbarIconSize != settings->m_Appearance.toolbar_icon_size )
|
||||
{
|
||||
OnToolbarSizeChanged();
|
||||
m_lastToolbarIconSize = settings->m_Appearance.toolbar_icon_size;
|
||||
}
|
||||
|
||||
#ifndef __WXMAC__
|
||||
resolveCanvasType();
|
||||
|
||||
|
@ -721,6 +730,8 @@ void EDA_DRAW_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
|||
|
||||
for( const wxString& s : aCfg->m_FindReplace.replace_history )
|
||||
m_replaceStringHistoryList.Add( s );
|
||||
|
||||
m_lastToolbarIconSize = cmnCfg->m_Appearance.toolbar_icon_size;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1148,6 +1159,26 @@ void EDA_DRAW_FRAME::RecreateToolbars()
|
|||
|
||||
if( m_auxiliaryToolBar ) // Additional tools under main toolbar
|
||||
ReCreateAuxiliaryToolbar();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_FRAME::OnToolbarSizeChanged()
|
||||
{
|
||||
if( m_mainToolBar )
|
||||
m_auimgr.GetPane( m_mainToolBar ).MaxSize( m_mainToolBar->GetSize() );
|
||||
|
||||
if( m_drawToolBar )
|
||||
m_auimgr.GetPane( m_drawToolBar ).MaxSize( m_drawToolBar->GetSize() );
|
||||
|
||||
if( m_optionsToolBar )
|
||||
m_auimgr.GetPane( m_optionsToolBar ).MaxSize( m_optionsToolBar->GetSize() );
|
||||
|
||||
if( m_auxiliaryToolBar )
|
||||
m_auimgr.GetPane( m_auxiliaryToolBar ).MaxSize( m_auxiliaryToolBar->GetSize() );
|
||||
|
||||
m_auimgr.Update();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1299,4 +1330,4 @@ bool EDA_DRAW_FRAME::SaveCanvasImageToFile( const wxString& aFileName,
|
|||
|
||||
image.Destroy();
|
||||
return retv;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,6 +102,9 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
|
|||
m_params.emplace_back( new PARAM<int>( "appearance.text_editor_zoom",
|
||||
&m_Appearance.text_editor_zoom, 0 ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<int>( "appearance.toolbar_icon_size",
|
||||
&m_Appearance.toolbar_icon_size, 24, 16, 64 ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "auto_backup.enabled", &m_Backup.enabled, true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "auto_backup.backup_on_autosave",
|
||||
|
|
|
@ -118,8 +118,11 @@ void ACTION_TOOLBAR_PALETTE::AddAction( const TOOL_ACTION& aAction )
|
|||
|
||||
int bmpWidth = normalBmp.GetPreferredBitmapSizeFor( this ).GetWidth();
|
||||
int padding = ( m_buttonSize.GetWidth() - bmpWidth ) / 2;
|
||||
int size = Pgm().GetCommonSettings()->m_Appearance.toolbar_icon_size;
|
||||
wxSize bmSize( size, size );
|
||||
|
||||
BITMAP_BUTTON* button = new BITMAP_BUTTON( m_panel, aAction.GetUIId() );
|
||||
BITMAP_BUTTON* button = new BITMAP_BUTTON( m_panel, aAction.GetUIId(), wxDefaultPosition,
|
||||
bmSize );
|
||||
|
||||
button->SetBitmap( normalBmp );
|
||||
button->SetDisabledBitmap( KiDisabledBitmapBundle( aAction.GetIcon() ) );
|
||||
|
@ -185,6 +188,8 @@ ACTION_TOOLBAR::ACTION_TOOLBAR( EDA_BASE_FRAME* parent, wxWindowID id, const wxP
|
|||
{
|
||||
m_paletteTimer = new wxTimer( this );
|
||||
|
||||
SetArtProvider( new WX_AUI_TOOLBAR_ART );
|
||||
|
||||
Connect( wxEVT_COMMAND_TOOL_CLICKED, wxAuiToolBarEventHandler( ACTION_TOOLBAR::onToolEvent ),
|
||||
nullptr, this );
|
||||
Connect( wxEVT_AUITOOLBAR_RIGHT_CLICK,
|
||||
|
|
|
@ -24,15 +24,71 @@
|
|||
#include <wx/settings.h>
|
||||
|
||||
#include <kiplatform/ui.h>
|
||||
#include <pgm_base.h>
|
||||
#include <settings/common_settings.h>
|
||||
#include <widgets/wx_aui_art_providers.h>
|
||||
|
||||
|
||||
wxSize WX_AUI_TOOLBAR_ART::GetToolSize( wxDC& aDc, wxWindow* aWindow,
|
||||
const wxAuiToolBarItem& aItem )
|
||||
{
|
||||
// Based on the upstream wxWidgets implementation, but simplified for our application
|
||||
int size = Pgm().GetCommonSettings()->m_Appearance.toolbar_icon_size;
|
||||
|
||||
#ifdef __WXMSW__
|
||||
size *= KIPLATFORM::UI::GetContentScaleFactor( aWindow );
|
||||
#endif
|
||||
|
||||
int width = size;
|
||||
int height = size;
|
||||
|
||||
if( m_flags & wxAUI_TB_TEXT )
|
||||
{
|
||||
aDc.SetFont( m_font );
|
||||
int tx, ty;
|
||||
|
||||
if( m_textOrientation == wxAUI_TBTOOL_TEXT_BOTTOM )
|
||||
{
|
||||
aDc.GetTextExtent( wxT( "ABCDHgj" ), &tx, &ty );
|
||||
height += ty;
|
||||
|
||||
if( !aItem.GetLabel().empty() )
|
||||
{
|
||||
aDc.GetTextExtent( aItem.GetLabel(), &tx, &ty );
|
||||
width = wxMax( width, tx + aWindow->FromDIP( 6 ) );
|
||||
}
|
||||
}
|
||||
else if( m_textOrientation == wxAUI_TBTOOL_TEXT_RIGHT && !aItem.GetLabel().empty() )
|
||||
{
|
||||
width += aWindow->FromDIP( 3 ); // space between left border and bitmap
|
||||
width += aWindow->FromDIP( 3 ); // space between bitmap and text
|
||||
|
||||
if( !aItem.GetLabel().empty() )
|
||||
{
|
||||
aDc.GetTextExtent( aItem.GetLabel(), &tx, &ty );
|
||||
width += tx;
|
||||
height = wxMax( height, ty );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( aItem.HasDropDown() )
|
||||
{
|
||||
int dropdownWidth = GetElementSize( wxAUI_TBART_DROPDOWN_SIZE );
|
||||
width += dropdownWidth + aWindow->FromDIP( 4 );
|
||||
}
|
||||
|
||||
return wxSize( width, height );
|
||||
}
|
||||
|
||||
|
||||
void WX_AUI_TOOLBAR_ART::DrawButton( wxDC& aDc, wxWindow* aWindow, const wxAuiToolBarItem& aItem,
|
||||
const wxRect& aRect )
|
||||
{
|
||||
bool darkMode = KIPLATFORM::UI::IsDarkTheme();
|
||||
int textWidth = 0;
|
||||
int textHeight = 0;
|
||||
// Taken from upstream implementation; modified to respect tool size
|
||||
wxSize bmpSize = GetToolSize( aDc, aWindow, aItem );
|
||||
|
||||
int textWidth = 0, textHeight = 0;
|
||||
|
||||
if( m_flags & wxAUI_TB_TEXT )
|
||||
{
|
||||
|
@ -48,71 +104,78 @@ void WX_AUI_TOOLBAR_ART::DrawButton( wxDC& aDc, wxWindow* aWindow, const wxAuiTo
|
|||
int bmpX = 0, bmpY = 0;
|
||||
int textX = 0, textY = 0;
|
||||
|
||||
double scale = KIPLATFORM::UI::GetPixelScaleFactor( aWindow ) ;
|
||||
const wxBitmapBundle& bundle = ( aItem.GetState() & wxAUI_BUTTON_STATE_DISABLED )
|
||||
? aItem.GetDisabledBitmapBundle()
|
||||
: aItem.GetBitmapBundle();
|
||||
wxBitmap bmp = bundle.GetBitmap( bmpSize * scale );
|
||||
|
||||
// wxBitmapBundle::GetBitmap thinks we need this rescaled to match the base size, which we don't
|
||||
if( bmp.IsOk() )
|
||||
bmp.SetScaleFactor( scale );
|
||||
|
||||
if( m_textOrientation == wxAUI_TBTOOL_TEXT_BOTTOM )
|
||||
{
|
||||
bmpX = aRect.x + ( aRect.width / 2 ) - ( aItem.GetBitmap().GetWidth() / 2 );
|
||||
bmpX = aRect.x + ( aRect.width / 2 ) - ( bmpSize.x / 2 );
|
||||
|
||||
bmpY = aRect.y + ( ( aRect.height - textHeight ) / 2 ) -
|
||||
( aItem.GetBitmap().GetHeight() / 2 );
|
||||
bmpY = aRect.y + ( ( aRect.height - textHeight ) / 2 ) - ( bmpSize.y / 2 );
|
||||
|
||||
textX = aRect.x + ( aRect.width / 2 ) - ( textWidth / 2 ) + 1;
|
||||
textY = aRect.y + aRect.height - textHeight - 1;
|
||||
}
|
||||
else if( m_textOrientation == wxAUI_TBTOOL_TEXT_RIGHT )
|
||||
{
|
||||
bmpX = aRect.x + 3;
|
||||
bmpX = aRect.x + aWindow->FromDIP( 3 );
|
||||
|
||||
bmpY = aRect.y + ( aRect.height / 2 ) - ( aItem.GetBitmap().GetHeight() / 2 );
|
||||
bmpY = aRect.y + ( aRect.height / 2 ) - ( bmpSize.y / 2 );
|
||||
|
||||
textX = bmpX + 3 + aItem.GetBitmap().GetWidth();
|
||||
textX = bmpX + aWindow->FromDIP( 3 ) + bmpSize.x;
|
||||
textY = aRect.y + ( aRect.height / 2 ) - ( textHeight / 2 );
|
||||
}
|
||||
|
||||
bool isThemeDark = KIPLATFORM::UI::IsDarkTheme();
|
||||
|
||||
if( !( aItem.GetState() & wxAUI_BUTTON_STATE_DISABLED ) )
|
||||
{
|
||||
if( aItem.GetState() & wxAUI_BUTTON_STATE_PRESSED )
|
||||
{
|
||||
aDc.SetPen( wxPen( m_highlightColour ) );
|
||||
aDc.SetBrush( wxBrush( m_highlightColour.ChangeLightness( darkMode ? 20 : 150 ) ) );
|
||||
aDc.SetBrush( wxBrush( m_highlightColour.ChangeLightness( isThemeDark ? 20 : 150 ) ) );
|
||||
aDc.DrawRectangle( aRect );
|
||||
}
|
||||
else if( ( aItem.GetState() & wxAUI_BUTTON_STATE_HOVER ) || aItem.IsSticky() )
|
||||
{
|
||||
aDc.SetPen( wxPen( m_highlightColour ) );
|
||||
aDc.SetBrush( wxBrush( m_highlightColour.ChangeLightness( darkMode ? 40 : 170 ) ) );
|
||||
aDc.SetBrush( wxBrush( m_highlightColour.ChangeLightness( isThemeDark ? 40 : 170 ) ) );
|
||||
|
||||
// draw an even lighter background for checked aItem hovers (since
|
||||
// draw an even lighter background for checked item hovers (since
|
||||
// the hover background is the same color as the check background)
|
||||
if( aItem.GetState() & wxAUI_BUTTON_STATE_CHECKED )
|
||||
aDc.SetBrush( wxBrush( m_highlightColour.ChangeLightness( darkMode ? 50 : 180 ) ) );
|
||||
aDc.SetBrush(
|
||||
wxBrush( m_highlightColour.ChangeLightness( isThemeDark ? 50 : 180 ) ) );
|
||||
|
||||
aDc.DrawRectangle( aRect );
|
||||
}
|
||||
else if( aItem.GetState() & wxAUI_BUTTON_STATE_CHECKED )
|
||||
{
|
||||
// it's important to put this code in an else statement after the
|
||||
// hover, otherwise hovers won't draw properly for checked aItems
|
||||
// hover, otherwise hovers won't draw properly for checked items
|
||||
aDc.SetPen( wxPen( m_highlightColour ) );
|
||||
aDc.SetBrush( wxBrush( m_highlightColour.ChangeLightness( darkMode ? 40 : 170 ) ) );
|
||||
aDc.SetBrush( wxBrush( m_highlightColour.ChangeLightness( isThemeDark ? 40 : 170 ) ) );
|
||||
aDc.DrawRectangle( aRect );
|
||||
}
|
||||
}
|
||||
|
||||
wxBitmap bmp;
|
||||
|
||||
if( aItem.GetState() & wxAUI_BUTTON_STATE_DISABLED )
|
||||
bmp = aItem.GetDisabledBitmap();
|
||||
else
|
||||
bmp = aItem.GetBitmap();
|
||||
|
||||
if( bmp.IsOk() )
|
||||
aDc.DrawBitmap( bmp, bmpX, bmpY, true );
|
||||
|
||||
// set the aItem's text color based on if it is disabled
|
||||
aDc.SetTextForeground( *wxBLACK );
|
||||
// set the item's text color based on if it is disabled
|
||||
aDc.SetTextForeground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNTEXT ) );
|
||||
|
||||
if( aItem.GetState() & wxAUI_BUTTON_STATE_DISABLED )
|
||||
{
|
||||
aDc.SetTextForeground( wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ) );
|
||||
}
|
||||
|
||||
if( ( m_flags & wxAUI_TB_TEXT ) && !aItem.GetLabel().empty() )
|
||||
{
|
||||
|
|
|
@ -462,6 +462,11 @@ public:
|
|||
*/
|
||||
void RecreateToolbars();
|
||||
|
||||
/**
|
||||
* Update toolbars if desired toolbar icon changed
|
||||
*/
|
||||
void OnToolbarSizeChanged();
|
||||
|
||||
/**
|
||||
* Redraw the menus and what not in current language.
|
||||
*/
|
||||
|
@ -563,6 +568,8 @@ private:
|
|||
|
||||
///< This the frame's interface to setting GAL display options.
|
||||
GAL_DISPLAY_OPTIONS_IMPL m_galDisplayOptions;
|
||||
|
||||
int m_lastToolbarIconSize;
|
||||
};
|
||||
|
||||
#endif // DRAW_FRAME_H_
|
||||
|
|
|
@ -56,6 +56,7 @@ public:
|
|||
bool apply_icon_scale_to_fonts;
|
||||
double hicontrast_dimming_factor;
|
||||
int text_editor_zoom;
|
||||
int toolbar_icon_size;
|
||||
};
|
||||
|
||||
struct AUTO_BACKUP
|
||||
|
|
|
@ -23,11 +23,7 @@
|
|||
#include <wx/aui/auibar.h>
|
||||
#include <wx/aui/dockart.h>
|
||||
|
||||
/**
|
||||
* wxWidgets 3.1 has support for dark mode detection, but 3.0 doesn't.
|
||||
* The main purpose of this replacement art provider is to backport that functionality
|
||||
* so that it is available in Linux systems that will likely be stuck on 3.0 for a while.
|
||||
*/
|
||||
|
||||
class WX_AUI_TOOLBAR_ART : public wxAuiDefaultToolBarArt
|
||||
{
|
||||
public:
|
||||
|
@ -35,12 +31,10 @@ public:
|
|||
|
||||
virtual ~WX_AUI_TOOLBAR_ART() = default;
|
||||
|
||||
wxSize GetToolSize( wxDC& aDc, wxWindow* aWindow, const wxAuiToolBarItem& aItem ) override;
|
||||
|
||||
/**
|
||||
* The same as wxAuiDefaultToolBarArt::DrawButton except with dark-mode awareness based on
|
||||
* BITMAP_BUTTON.
|
||||
*
|
||||
* Unfortunately, wx 3.0 does not provide any hooks that would make it possible to do this in
|
||||
* a way other than just copy/pasting the upstream implementation and modifying it.
|
||||
* Unfortunately we need to re-implement this to actually be able to control the size
|
||||
*/
|
||||
void DrawButton( wxDC& aDc, wxWindow* aWindow, const wxAuiToolBarItem& aItem,
|
||||
const wxRect& aRect ) override;
|
||||
|
|
|
@ -125,7 +125,8 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& titl
|
|||
KICAD_MANAGER_FRAME_NAME, &::Kiway, unityScale ),
|
||||
m_leftWin( nullptr ),
|
||||
m_launcher( nullptr ),
|
||||
m_mainToolBar( nullptr )
|
||||
m_mainToolBar( nullptr ),
|
||||
m_lastToolbarIconSize( 0 )
|
||||
{
|
||||
m_active_project = false;
|
||||
m_leftWinWidth = 250; // Default value
|
||||
|
@ -788,6 +789,15 @@ void KICAD_MANAGER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTex
|
|||
{
|
||||
m_pcm->ReadEnvVar();
|
||||
}
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
if( m_lastToolbarIconSize == 0
|
||||
|| m_lastToolbarIconSize != settings->m_Appearance.toolbar_icon_size )
|
||||
{
|
||||
onToolbarSizeChanged();
|
||||
m_lastToolbarIconSize = settings->m_Appearance.toolbar_icon_size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -986,3 +996,16 @@ void KICAD_MANAGER_FRAME::updatePcmButtonBadge()
|
|||
m_pcmButton->Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void KICAD_MANAGER_FRAME::onToolbarSizeChanged()
|
||||
{
|
||||
// No idea why, but the same mechanism used in EDA_DRAW_FRAME doesn't work here
|
||||
// the only thing that seems to work is to blow it all up and start from scratch.
|
||||
m_auimgr.DetachPane( m_mainToolBar );
|
||||
delete m_mainToolBar;
|
||||
m_mainToolBar = nullptr;
|
||||
RecreateBaseHToolbar();
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Left()
|
||||
.Layer( 2 ) );
|
||||
}
|
||||
|
|
|
@ -174,6 +174,8 @@ protected:
|
|||
|
||||
void doReCreateMenuBar() override;
|
||||
|
||||
void onToolbarSizeChanged();
|
||||
|
||||
private:
|
||||
void setupTools();
|
||||
void setupActions();
|
||||
|
@ -199,6 +201,7 @@ private:
|
|||
PROJECT_TREE_PANE* m_leftWin;
|
||||
PANEL_KICAD_LAUNCHER* m_launcher;
|
||||
ACTION_TOOLBAR* m_mainToolBar;
|
||||
int m_lastToolbarIconSize;
|
||||
|
||||
std::shared_ptr<PLUGIN_CONTENT_MANAGER> m_pcm;
|
||||
BITMAP_BUTTON* m_pcmButton;
|
||||
|
|
|
@ -247,19 +247,25 @@ void KICAD_MANAGER_FRAME::RecreateBaseHToolbar()
|
|||
|
||||
m_mainToolBar->AddScaledSeparator( this );
|
||||
m_mainToolBar->AddTool( ID_SAVE_AND_ZIP_FILES, wxEmptyString,
|
||||
KiScaledBitmap( BITMAPS::zip, this ),
|
||||
_( "Archive all project files" ) );
|
||||
KiBitmapBundle( BITMAPS::zip ),
|
||||
KiDisabledBitmapBundle( BITMAPS::zip ),
|
||||
wxITEM_NORMAL,
|
||||
_( "Archive all project files" ),
|
||||
wxEmptyString, nullptr );
|
||||
|
||||
m_mainToolBar->AddTool( ID_READ_ZIP_ARCHIVE, wxEmptyString,
|
||||
KiScaledBitmap( BITMAPS::unzip, this ),
|
||||
_( "Unarchive project files from zip archive" ) );
|
||||
KiBitmapBundle( BITMAPS::unzip ),
|
||||
KiDisabledBitmapBundle( BITMAPS::unzip ),
|
||||
wxITEM_NORMAL,
|
||||
_( "Unarchive project files from zip archive" ),
|
||||
wxEmptyString, nullptr );
|
||||
|
||||
m_mainToolBar->AddScaledSeparator( this );
|
||||
m_mainToolBar->Add( ACTIONS::zoomRedraw );
|
||||
|
||||
m_mainToolBar->AddScaledSeparator( this );
|
||||
m_mainToolBar->AddTool( ID_BROWSE_IN_FILE_EXPLORER, wxEmptyString,
|
||||
KiScaledBitmap( BITMAPS::directory_browser, this ),
|
||||
KiBitmapBundle( BITMAPS::directory_browser ),
|
||||
#ifdef __APPLE__
|
||||
_( "Reveal project folder in Finder" ) );
|
||||
#else
|
||||
|
@ -267,5 +273,5 @@ void KICAD_MANAGER_FRAME::RecreateBaseHToolbar()
|
|||
#endif
|
||||
|
||||
// Create m_mainToolBar
|
||||
m_mainToolBar->Realize();
|
||||
m_mainToolBar->KiRealize();
|
||||
}
|
||||
|
|
|
@ -71,66 +71,59 @@ void PROJECT_TREE::LoadIcons()
|
|||
delete m_imageList;
|
||||
delete m_statusImageList;
|
||||
|
||||
// icons size is not know (depending on they are built)
|
||||
// so get it:
|
||||
wxSize iconsize;
|
||||
wxBitmap dummy = KiBitmap( BITMAPS::icon_eeschema_24 );
|
||||
iconsize.x = dummy.GetWidth();
|
||||
iconsize.y = dummy.GetHeight();
|
||||
int size = 24;
|
||||
|
||||
// Make an image list containing small icons
|
||||
m_imageList = new wxImageList( iconsize.x, iconsize.y, true,
|
||||
m_imageList = new wxImageList( size, size, true,
|
||||
static_cast<int>( TREE_FILE_TYPE::MAX ) );
|
||||
|
||||
m_imageList->Add( KiBitmap( BITMAPS::project ) ); // TREE_LEGACY_PROJECT
|
||||
m_imageList->Add( KiBitmap( BITMAPS::project_kicad ) ); // TREE_JSON_PROJECT
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_eeschema_24 ) ); // TREE_LEGACY_SCHEMATIC
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_eeschema_24 ) ); // TREE_SEXPR_SCHEMATIC
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_pcbnew_24 ) ); // TREE_LEGACY_PCB
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_pcbnew_24 ) ); // TREE_SEXPR_PCB
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_gerbview_24 ) ); // TREE_GERBER
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_gerber_job ) ); // TREE_GERBER_JOB_FILE (.gbrjob)
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_html ) ); // TREE_HTML
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_pdf ) ); // TREE_PDF
|
||||
m_imageList->Add( KiBitmap( BITMAPS::editor ) ); // TREE_TXT
|
||||
m_imageList->Add( KiBitmap( BITMAPS::editor ) ); // TREE_MD
|
||||
m_imageList->Add( KiBitmap( BITMAPS::netlist ) ); // TREE_NET
|
||||
m_imageList->Add( KiBitmap( BITMAPS::unknown ) ); // TREE_UNKNOWN
|
||||
m_imageList->Add( KiBitmap( BITMAPS::directory ) ); // TREE_DIRECTORY
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_cvpcb_24 ) ); // TREE_CMP_LINK
|
||||
m_imageList->Add( KiBitmap( BITMAPS::tools ) ); // TREE_REPORT
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_pos ) ); // TREE_POS
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_drl ) ); // TREE_DRILL
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_drl ) ); // TREE_DRILL_NC (similar TREE_DRILL)
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_drl ) ); // TREE_DRILL_XNC (similar TREE_DRILL)
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_svg ) ); // TREE_SVG
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_pagelayout_editor_24 ) ); // TREE_PAGE_LAYOUT_DESCR
|
||||
m_imageList->Add( KiBitmap( BITMAPS::module ) ); // TREE_FOOTPRINT_FILE
|
||||
m_imageList->Add( KiBitmap( BITMAPS::library ) ); // TREE_SCHEMATIC_LIBFILE
|
||||
m_imageList->Add( KiBitmap( BITMAPS::library ) ); // TREE_SEXPR_SYMBOL_LIB_FILE
|
||||
m_imageList->Add( KiBitmap( BITMAPS::editor ) ); // DESIGN_RULES
|
||||
m_imageList->Add( KiBitmap( BITMAPS::zip ) ); // ZIP_ARCHIVE
|
||||
m_imageList->Add( KiBitmap( BITMAPS::project, size ) ); // TREE_LEGACY_PROJECT
|
||||
m_imageList->Add( KiBitmap( BITMAPS::project_kicad, size ) ); // TREE_JSON_PROJECT
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_eeschema_24, size ) ); // TREE_LEGACY_SCHEMATIC
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_eeschema_24, size ) ); // TREE_SEXPR_SCHEMATIC
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_pcbnew_24, size ) ); // TREE_LEGACY_PCB
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_pcbnew_24, size ) ); // TREE_SEXPR_PCB
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_gerbview_24, size ) ); // TREE_GERBER
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_gerber_job, size ) ); // TREE_GERBER_JOB_FILE (.gbrjob)
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_html, size ) ); // TREE_HTML
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_pdf, size ) ); // TREE_PDF
|
||||
m_imageList->Add( KiBitmap( BITMAPS::editor, size ) ); // TREE_TXT
|
||||
m_imageList->Add( KiBitmap( BITMAPS::editor, size ) ); // TREE_MD
|
||||
m_imageList->Add( KiBitmap( BITMAPS::netlist, size ) ); // TREE_NET
|
||||
m_imageList->Add( KiBitmap( BITMAPS::unknown, size ) ); // TREE_UNKNOWN
|
||||
m_imageList->Add( KiBitmap( BITMAPS::directory, size ) ); // TREE_DIRECTORY
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_cvpcb_24, size ) ); // TREE_CMP_LINK
|
||||
m_imageList->Add( KiBitmap( BITMAPS::tools, size ) ); // TREE_REPORT
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_pos, size ) ); // TREE_POS
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_drl, size ) ); // TREE_DRILL
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_drl, size ) ); // TREE_DRILL_NC (similar TREE_DRILL)
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_drl, size ) ); // TREE_DRILL_XNC (similar TREE_DRILL)
|
||||
m_imageList->Add( KiBitmap( BITMAPS::file_svg, size ) ); // TREE_SVG
|
||||
m_imageList->Add( KiBitmap( BITMAPS::icon_pagelayout_editor_24, size ) ); // TREE_PAGE_LAYOUT_DESCR
|
||||
m_imageList->Add( KiBitmap( BITMAPS::module, size ) ); // TREE_FOOTPRINT_FILE
|
||||
m_imageList->Add( KiBitmap( BITMAPS::library, size ) ); // TREE_SCHEMATIC_LIBFILE
|
||||
m_imageList->Add( KiBitmap( BITMAPS::library, size ) ); // TREE_SEXPR_SYMBOL_LIB_FILE
|
||||
m_imageList->Add( KiBitmap( BITMAPS::editor, size ) ); // DESIGN_RULES
|
||||
m_imageList->Add( KiBitmap( BITMAPS::zip, size ) ); // ZIP_ARCHIVE
|
||||
|
||||
SetImageList( m_imageList );
|
||||
|
||||
// Make an image list containing small icons
|
||||
dummy = KiBitmap( BITMAPS::git_add );
|
||||
iconsize.x = dummy.GetWidth();
|
||||
iconsize.y = dummy.GetHeight();
|
||||
size = 16;
|
||||
|
||||
wxBitmap blank_bitmap( iconsize.x, iconsize.y );
|
||||
wxBitmap blank_bitmap( size, size );
|
||||
|
||||
m_statusImageList = new wxImageList( iconsize.x, iconsize.y, true,
|
||||
m_statusImageList = new wxImageList( size, size, true,
|
||||
static_cast<int>( KIGIT_COMMON::GIT_STATUS::GIT_STATUS_LAST ) );
|
||||
|
||||
m_statusImageList->Add( blank_bitmap ); // GIT_STATUS_UNTRACKED
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_good_check ) ); // GIT_STATUS_CURRENT
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_modified ) ); // GIT_STATUS_MODIFIED
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_add ) ); // GIT_STATUS_ADDED
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_delete ) ); // GIT_STATUS_DELETED
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_out_of_date ) ); // GIT_STATUS_BEHIND
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_changed_ahead ) );// GIT_STATUS_AHEAD
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_conflict ) ); // GIT_STATUS_CONFLICTED
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_good_check, size ) ); // GIT_STATUS_CURRENT
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_modified, size ) ); // GIT_STATUS_MODIFIED
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_add, size ) ); // GIT_STATUS_ADDED
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_delete, size ) ); // GIT_STATUS_DELETED
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_out_of_date, size ) ); // GIT_STATUS_BEHIND
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_changed_ahead, size ) ); // GIT_STATUS_AHEAD
|
||||
m_statusImageList->Add( KiBitmap( BITMAPS::git_conflict, size ) ); // GIT_STATUS_CONFLICTED
|
||||
|
||||
SetStateImageList( m_statusImageList );
|
||||
|
||||
|
|
|
@ -900,13 +900,14 @@ if( MAINTAIN_PNGS )
|
|||
bitmap_dir( 16 16 "${BMAPS_SMALL}" )
|
||||
bitmap_dir( 32 32 "${BMAPS_SMALL}" ) # 2x HiDPI
|
||||
|
||||
bitmap_dir( 24 24 "${BMAPS_MID}" )
|
||||
bitmap_dir( 48 48 "${BMAPS_MID}" ) # 2x HiDPI
|
||||
bitmap_dir( 24 24 "${BMAPS_MID}" ) # "primary" size first
|
||||
bitmap_dir( 16 16 "${BMAPS_MID}" ) # Small toolbar mode
|
||||
bitmap_dir( 32 32 "${BMAPS_MID}" ) # Large toolbar mode
|
||||
bitmap_dir( 48 48 "${BMAPS_MID}" ) # HiDPI normal size
|
||||
bitmap_dir( 64 64 "${BMAPS_MID}" ) # HiDPI large size
|
||||
|
||||
bitmap_dir( 32 32 "${BMAPS_32}" )
|
||||
|
||||
bitmap_dir( 22 22 "${BMAPS_22}" )
|
||||
|
||||
bitmap_dir( 24 24 "${BMAPS_24}" )
|
||||
|
||||
bitmap_dir( 64 64 "${BMAPS_64}" )
|
||||
|
|
After Width: | Height: | Size: 323 B |
After Width: | Height: | Size: 642 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 418 B |
After Width: | Height: | Size: 805 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 327 B |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 352 B |
After Width: | Height: | Size: 640 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 195 B |
After Width: | Height: | Size: 348 B |
After Width: | Height: | Size: 649 B |
After Width: | Height: | Size: 258 B |
After Width: | Height: | Size: 458 B |
After Width: | Height: | Size: 852 B |
After Width: | Height: | Size: 620 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 614 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 647 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 647 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 150 B |
After Width: | Height: | Size: 228 B |
After Width: | Height: | Size: 350 B |
After Width: | Height: | Size: 151 B |
After Width: | Height: | Size: 230 B |
After Width: | Height: | Size: 356 B |
After Width: | Height: | Size: 177 B |
After Width: | Height: | Size: 301 B |
After Width: | Height: | Size: 541 B |
After Width: | Height: | Size: 182 B |
After Width: | Height: | Size: 307 B |
After Width: | Height: | Size: 548 B |
After Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 478 B |
After Width: | Height: | Size: 902 B |
After Width: | Height: | Size: 321 B |
After Width: | Height: | Size: 689 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 386 B After Width: | Height: | Size: 368 B |
After Width: | Height: | Size: 515 B |
Before Width: | Height: | Size: 745 B After Width: | Height: | Size: 714 B |
After Width: | Height: | Size: 954 B |
After Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 574 B After Width: | Height: | Size: 566 B |
After Width: | Height: | Size: 727 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 243 B |
After Width: | Height: | Size: 425 B |
After Width: | Height: | Size: 755 B |
After Width: | Height: | Size: 336 B |
After Width: | Height: | Size: 544 B |
After Width: | Height: | Size: 960 B |
After Width: | Height: | Size: 381 B |
After Width: | Height: | Size: 796 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 391 B |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 566 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 408 B |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 559 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 523 B |
After Width: | Height: | Size: 1005 B |
After Width: | Height: | Size: 1.9 KiB |