mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Move canvas selection to common
Makes all canvases obey the same rendering parameter. Also keeps the canvas selection with the anti-alias selection, which makes logical sense. Reduce the antialias selection to a single choice rather than two different choices for different canvases
This commit is contained in:
parent
7f46f2a8d1
commit
66f37beff7
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include <advanced_config.h>
|
#include <advanced_config.h>
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
|
#include <class_draw_panel_gal.h>
|
||||||
#include <dialog_shim.h>
|
#include <dialog_shim.h>
|
||||||
#include <dpi_scaling_common.h>
|
#include <dpi_scaling_common.h>
|
||||||
#include <kiface_base.h>
|
#include <kiface_base.h>
|
||||||
@ -168,8 +169,12 @@ bool PANEL_COMMON_SETTINGS::TransferDataFromWindow()
|
|||||||
commonSettings->m_System.file_history_size = m_fileHistorySize->GetValue();
|
commonSettings->m_System.file_history_size = m_fileHistorySize->GetValue();
|
||||||
commonSettings->m_System.clear_3d_cache_interval = m_Clear3DCacheFilesOlder->GetValue();
|
commonSettings->m_System.clear_3d_cache_interval = m_Clear3DCacheFilesOlder->GetValue();
|
||||||
|
|
||||||
commonSettings->m_Graphics.opengl_aa_mode = m_antialiasing->GetSelection();
|
commonSettings->m_Graphics.aa_mode = m_antialiasing->GetSelection();
|
||||||
commonSettings->m_Graphics.cairo_aa_mode = m_antialiasingFallback->GetSelection();
|
|
||||||
|
if( m_rbAccelerated->GetValue() )
|
||||||
|
commonSettings->m_Graphics.canvas_type = EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL;
|
||||||
|
else
|
||||||
|
commonSettings->m_Graphics.canvas_type = EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO;
|
||||||
|
|
||||||
if( m_canvasScaleCtrl )
|
if( m_canvasScaleCtrl )
|
||||||
{
|
{
|
||||||
@ -255,8 +260,12 @@ void PANEL_COMMON_SETTINGS::applySettingsToPanel( COMMON_SETTINGS& aSettings )
|
|||||||
|
|
||||||
m_fileHistorySize->SetValue( aSettings.m_System.file_history_size );
|
m_fileHistorySize->SetValue( aSettings.m_System.file_history_size );
|
||||||
|
|
||||||
m_antialiasing->SetSelection( aSettings.m_Graphics.opengl_aa_mode );
|
m_antialiasing->SetSelection( aSettings.m_Graphics.aa_mode );
|
||||||
m_antialiasingFallback->SetSelection( aSettings.m_Graphics.cairo_aa_mode );
|
|
||||||
|
if( aSettings.m_Graphics.canvas_type == EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL )
|
||||||
|
m_rbAccelerated->SetValue( true );
|
||||||
|
else
|
||||||
|
m_rbFallback->SetValue( true );
|
||||||
|
|
||||||
m_Clear3DCacheFilesOlder->SetValue( aSettings.m_System.clear_3d_cache_interval );
|
m_Clear3DCacheFilesOlder->SetValue( aSettings.m_System.clear_3d_cache_interval );
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -19,47 +19,55 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||||||
wxBoxSizer* bLeftSizer;
|
wxBoxSizer* bLeftSizer;
|
||||||
bLeftSizer = new wxBoxSizer( wxVERTICAL );
|
bLeftSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_staticText20 = new wxStaticText( this, wxID_ANY, _("Antialiasing"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticText20 = new wxStaticText( this, wxID_ANY, _("Rendering Engine"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText20->Wrap( -1 );
|
m_staticText20->Wrap( -1 );
|
||||||
bLeftSizer->Add( m_staticText20, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
|
bLeftSizer->Add( m_staticText20, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
|
||||||
|
|
||||||
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
bLeftSizer->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
|
bLeftSizer->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
|
||||||
|
|
||||||
wxBoxSizer* bAntialiasingSizer;
|
|
||||||
bAntialiasingSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
wxGridBagSizer* gbSizer11;
|
wxGridBagSizer* gbSizer11;
|
||||||
gbSizer11 = new wxGridBagSizer( 6, 4 );
|
gbSizer11 = new wxGridBagSizer( 2, 4 );
|
||||||
gbSizer11->SetFlexibleDirection( wxBOTH );
|
gbSizer11->SetFlexibleDirection( wxBOTH );
|
||||||
gbSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
gbSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
gbSizer11->SetEmptyCellSize( wxSize( -1,2 ) );
|
gbSizer11->SetEmptyCellSize( wxSize( -1,2 ) );
|
||||||
|
|
||||||
wxStaticText* antialiasingLabel;
|
wxStaticText* antialiasingLabel;
|
||||||
antialiasingLabel = new wxStaticText( this, wxID_ANY, _("Accelerated graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
|
antialiasingLabel = new wxStaticText( this, wxID_ANY, _("Antialiasing:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
antialiasingLabel->Wrap( -1 );
|
antialiasingLabel->Wrap( -1 );
|
||||||
gbSizer11->Add( antialiasingLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
gbSizer11->Add( antialiasingLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||||
|
|
||||||
wxString m_antialiasingChoices[] = { _("No Antialiasing"), _("Fast Antialiasing"), _("High Quality Antialiasing") };
|
wxString m_antialiasingChoices[] = { _("No Antialiasing"), _("Fast Antialiasing"), _("High Quality Antialiasing") };
|
||||||
int m_antialiasingNChoices = sizeof( m_antialiasingChoices ) / sizeof( wxString );
|
int m_antialiasingNChoices = sizeof( m_antialiasingChoices ) / sizeof( wxString );
|
||||||
m_antialiasing = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_antialiasingNChoices, m_antialiasingChoices, 0 );
|
m_antialiasing = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_antialiasingNChoices, m_antialiasingChoices, 0 );
|
||||||
m_antialiasing->SetSelection( 0 );
|
m_antialiasing->SetSelection( 0 );
|
||||||
gbSizer11->Add( m_antialiasing, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
|
gbSizer11->Add( m_antialiasing, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
|
||||||
|
|
||||||
m_antialiasingFallbackLabel = new wxStaticText( this, wxID_ANY, _("Fallback graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxFlexGridSizer* fgSizer1;
|
||||||
m_antialiasingFallbackLabel->Wrap( -1 );
|
fgSizer1 = new wxFlexGridSizer( 0, 1, 4, 0 );
|
||||||
gbSizer11->Add( m_antialiasingFallbackLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
fgSizer1->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
wxString m_antialiasingFallbackChoices[] = { _("No Antialiasing"), _("Fast Antialiasing"), _("High Quality Antialiasing") };
|
m_rbAccelerated = new wxRadioButton( this, wxID_ANY, _("Accelerated Graphics"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||||
int m_antialiasingFallbackNChoices = sizeof( m_antialiasingFallbackChoices ) / sizeof( wxString );
|
m_rbAccelerated->SetToolTip( _("Hardware-accelerated graphics (recommended)") );
|
||||||
m_antialiasingFallback = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_antialiasingFallbackNChoices, m_antialiasingFallbackChoices, 0 );
|
|
||||||
m_antialiasingFallback->SetSelection( 0 );
|
fgSizer1->Add( m_rbAccelerated, 0, wxLEFT, 5 );
|
||||||
gbSizer11->Add( m_antialiasingFallback, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
|
|
||||||
|
m_rbFallback = new wxRadioButton( this, wxID_ANY, _("Fallback Graphics"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_rbFallback->SetToolTip( _("Software graphics (for computers which do not support KiCad's hardware acceleration requirements)") );
|
||||||
|
|
||||||
|
fgSizer1->Add( m_rbFallback, 0, wxLEFT|wxTOP, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
gbSizer11->Add( fgSizer1, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 0 );
|
||||||
|
|
||||||
|
|
||||||
gbSizer11->AddGrowableCol( 1 );
|
gbSizer11->AddGrowableCol( 1 );
|
||||||
|
|
||||||
bAntialiasingSizer->Add( gbSizer11, 0, wxTOP|wxBOTTOM, 5 );
|
bLeftSizer->Add( gbSizer11, 0, wxLEFT, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bAntialiasingSizer;
|
||||||
|
bAntialiasingSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
|
||||||
bLeftSizer->Add( bAntialiasingSizer, 0, wxTOP|wxLEFT|wxEXPAND, 5 );
|
bLeftSizer->Add( bAntialiasingSizer, 0, wxTOP|wxLEFT|wxEXPAND, 5 );
|
||||||
@ -112,7 +120,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||||||
wxBoxSizer* bSizer8;
|
wxBoxSizer* bSizer8;
|
||||||
bSizer8 = new wxBoxSizer( wxVERTICAL );
|
bSizer8 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_defaultPDFViewer = new wxRadioButton( this, wxID_ANY, _("System default PDF viewer"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_defaultPDFViewer = new wxRadioButton( this, wxID_ANY, _("System default PDF viewer"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||||
bSizer8->Add( m_defaultPDFViewer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
bSizer8->Add( m_defaultPDFViewer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Antialiasing</property>
|
<property name="label">Rendering Engine</property>
|
||||||
<property name="markup">0</property>
|
<property name="markup">0</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
@ -192,18 +192,9 @@
|
|||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxTOP|wxLEFT|wxEXPAND</property>
|
<property name="flag">wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="false">
|
<object class="wxGridBagSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
|
||||||
<property name="name">bAntialiasingSizer</property>
|
|
||||||
<property name="orient">wxVERTICAL</property>
|
|
||||||
<property name="permission">none</property>
|
|
||||||
<object class="sizeritem" expanded="false">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxTOP|wxBOTTOM</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxGridBagSizer" expanded="false">
|
|
||||||
<property name="empty_cell_size">-1,2</property>
|
<property name="empty_cell_size">-1,2</property>
|
||||||
<property name="flexible_direction">wxBOTH</property>
|
<property name="flexible_direction">wxBOTH</property>
|
||||||
<property name="growablecols">1</property>
|
<property name="growablecols">1</property>
|
||||||
@ -213,13 +204,13 @@
|
|||||||
<property name="name">gbSizer11</property>
|
<property name="name">gbSizer11</property>
|
||||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<property name="vgap">6</property>
|
<property name="vgap">2</property>
|
||||||
<object class="gbsizeritem" expanded="false">
|
<object class="gbsizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="colspan">1</property>
|
<property name="colspan">1</property>
|
||||||
<property name="column">0</property>
|
<property name="column">0</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||||
<property name="row">0</property>
|
<property name="row">2</property>
|
||||||
<property name="rowspan">1</property>
|
<property name="rowspan">1</property>
|
||||||
<object class="wxStaticText" expanded="false">
|
<object class="wxStaticText" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
@ -250,7 +241,7 @@
|
|||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Accelerated graphics:</property>
|
<property name="label">Antialiasing:</property>
|
||||||
<property name="markup">0</property>
|
<property name="markup">0</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
@ -279,12 +270,12 @@
|
|||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="gbsizeritem" expanded="false">
|
<object class="gbsizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="colspan">2</property>
|
<property name="colspan">1</property>
|
||||||
<property name="column">1</property>
|
<property name="column">1</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT</property>
|
<property name="flag">wxALL</property>
|
||||||
<property name="row">0</property>
|
<property name="row">2</property>
|
||||||
<property name="rowspan">1</property>
|
<property name="rowspan">1</property>
|
||||||
<object class="wxChoice" expanded="false">
|
<object class="wxChoice" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
@ -347,79 +338,30 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="gbsizeritem" expanded="false">
|
<object class="gbsizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">0</property>
|
||||||
<property name="colspan">1</property>
|
<property name="colspan">1</property>
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
|
||||||
<property name="row">1</property>
|
|
||||||
<property name="rowspan">1</property>
|
|
||||||
<object class="wxStaticText" expanded="false">
|
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer">0</property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position">0</property>
|
|
||||||
<property name="aui_row">0</property>
|
|
||||||
<property name="best_size"></property>
|
|
||||||
<property name="bg"></property>
|
|
||||||
<property name="caption"></property>
|
|
||||||
<property name="caption_visible">1</property>
|
|
||||||
<property name="center_pane">0</property>
|
|
||||||
<property name="close_button">1</property>
|
|
||||||
<property name="context_help"></property>
|
|
||||||
<property name="context_menu">1</property>
|
|
||||||
<property name="default_pane">0</property>
|
|
||||||
<property name="dock">Dock</property>
|
|
||||||
<property name="dock_fixed">0</property>
|
|
||||||
<property name="docking">Left</property>
|
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="floatable">1</property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</property>
|
|
||||||
<property name="label">Fallback graphics:</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_antialiasingFallbackLabel</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="gbsizeritem" expanded="false">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="colspan">2</property>
|
|
||||||
<property name="column">1</property>
|
<property name="column">1</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="row">1</property>
|
<property name="row">0</property>
|
||||||
<property name="rowspan">1</property>
|
<property name="rowspan">1</property>
|
||||||
<object class="wxChoice" expanded="false">
|
<object class="wxFlexGridSizer" expanded="true">
|
||||||
|
<property name="cols">1</property>
|
||||||
|
<property name="flexible_direction">wxBOTH</property>
|
||||||
|
<property name="growablecols"></property>
|
||||||
|
<property name="growablerows"></property>
|
||||||
|
<property name="hgap">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">fgSizer1</property>
|
||||||
|
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<property name="rows">0</property>
|
||||||
|
<property name="vgap">4</property>
|
||||||
|
<object class="sizeritem" expanded="true">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxRadioButton" expanded="true">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
@ -433,7 +375,6 @@
|
|||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="choices">"No Antialiasing" "Fast Antialiasing" "High Quality Antialiasing"</property>
|
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
@ -449,6 +390,7 @@
|
|||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">Accelerated Graphics</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
@ -456,7 +398,7 @@
|
|||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_antialiasingFallback</property>
|
<property name="name">m_rbAccelerated</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
@ -464,17 +406,82 @@
|
|||||||
<property name="pin_button">1</property>
|
<property name="pin_button">1</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="resize">Resizable</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="selection">0</property>
|
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style"></property>
|
<property name="style">wxRB_GROUP</property>
|
||||||
<property name="subclass">; forward_declare</property>
|
<property name="subclass">; ; forward_declare</property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip">Hardware-accelerated graphics (recommended)</property>
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type"></property>
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></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="true">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxLEFT|wxTOP</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxRadioButton" expanded="true">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer">0</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position">0</property>
|
||||||
|
<property name="aui_row">0</property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="drag_accept_files">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">Fallback Graphics</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_rbFallback</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">Software graphics (for computers which do not support KiCad's hardware acceleration requirements)</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_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
@ -484,6 +491,17 @@
|
|||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem" expanded="true">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxTOP|wxLEFT|wxEXPAND</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBoxSizer" expanded="true">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bAntialiasingSizer</property>
|
||||||
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag"></property>
|
<property name="flag"></property>
|
||||||
@ -1045,7 +1063,7 @@
|
|||||||
<property name="resize">Resizable</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style"></property>
|
<property name="style">wxRB_GROUP</property>
|
||||||
<property name="subclass">; forward_declare</property>
|
<property name="subclass">; forward_declare</property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
@ -1066,7 +1084,7 @@
|
|||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxBOTTOM|wxRIGHT|wxEXPAND</property>
|
<property name="flag">wxBOTTOM|wxRIGHT|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="false">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizer7</property>
|
<property name="name">bSizer7</property>
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -21,15 +21,15 @@ class STD_BITMAP_BUTTON;
|
|||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/statline.h>
|
#include <wx/statline.h>
|
||||||
#include <wx/choice.h>
|
#include <wx/choice.h>
|
||||||
#include <wx/gbsizer.h>
|
#include <wx/radiobut.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/gbsizer.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/bmpbuttn.h>
|
#include <wx/bmpbuttn.h>
|
||||||
#include <wx/bitmap.h>
|
#include <wx/bitmap.h>
|
||||||
#include <wx/image.h>
|
#include <wx/image.h>
|
||||||
#include <wx/icon.h>
|
#include <wx/icon.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/radiobut.h>
|
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
#include <wx/spinctrl.h>
|
#include <wx/spinctrl.h>
|
||||||
#include <wx/panel.h>
|
#include <wx/panel.h>
|
||||||
@ -47,8 +47,8 @@ class PANEL_COMMON_SETTINGS_BASE : public RESETTABLE_PANEL
|
|||||||
wxStaticText* m_staticText20;
|
wxStaticText* m_staticText20;
|
||||||
wxStaticLine* m_staticline3;
|
wxStaticLine* m_staticline3;
|
||||||
wxChoice* m_antialiasing;
|
wxChoice* m_antialiasing;
|
||||||
wxStaticText* m_antialiasingFallbackLabel;
|
wxRadioButton* m_rbAccelerated;
|
||||||
wxChoice* m_antialiasingFallback;
|
wxRadioButton* m_rbFallback;
|
||||||
wxStaticText* m_staticText21;
|
wxStaticText* m_staticText21;
|
||||||
wxStaticLine* m_staticline2;
|
wxStaticLine* m_staticline2;
|
||||||
wxTextCtrl* m_textEditorPath;
|
wxTextCtrl* m_textEditorPath;
|
||||||
|
@ -919,7 +919,7 @@ void EDA_DRAW_FRAME::SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EDA_DRAW_PANEL_GAL::GAL_TYPE EDA_DRAW_FRAME::loadCanvasTypeSetting( APP_SETTINGS_BASE* aCfg )
|
EDA_DRAW_PANEL_GAL::GAL_TYPE EDA_DRAW_FRAME::loadCanvasTypeSetting()
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// Cairo renderer doesn't handle Retina displays so there's really only one game
|
// Cairo renderer doesn't handle Retina displays so there's really only one game
|
||||||
@ -928,7 +928,7 @@ EDA_DRAW_PANEL_GAL::GAL_TYPE EDA_DRAW_FRAME::loadCanvasTypeSetting( APP_SETTING
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE;
|
EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE;
|
||||||
APP_SETTINGS_BASE* cfg = aCfg ? aCfg : Kiface().KifaceSettings();
|
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
|
||||||
|
|
||||||
if( cfg )
|
if( cfg )
|
||||||
canvasType = static_cast<EDA_DRAW_PANEL_GAL::GAL_TYPE>( cfg->m_Graphics.canvas_type );
|
canvasType = static_cast<EDA_DRAW_PANEL_GAL::GAL_TYPE>( cfg->m_Graphics.canvas_type );
|
||||||
@ -990,7 +990,7 @@ bool EDA_DRAW_FRAME::saveCanvasTypeSetting( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( APP_SETTINGS_BASE* cfg = Kiface().KifaceSettings() )
|
if( COMMON_SETTINGS* cfg = Pgm().GetCommonSettings() )
|
||||||
cfg->m_Graphics.canvas_type = static_cast<int>( aCanvasType );
|
cfg->m_Graphics.canvas_type = static_cast<int>( aCanvasType );
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -60,12 +60,12 @@ void CAIRO_COMPOSITOR::Initialize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CAIRO_COMPOSITOR::SetAntialiasingMode( CAIRO_ANTIALIASING_MODE aMode )
|
void CAIRO_COMPOSITOR::SetAntialiasingMode( GAL_ANTIALIASING_MODE aMode )
|
||||||
{
|
{
|
||||||
switch( aMode )
|
switch( aMode )
|
||||||
{
|
{
|
||||||
case CAIRO_ANTIALIASING_MODE::FAST: m_currentAntialiasingMode = CAIRO_ANTIALIAS_FAST; break;
|
case GAL_ANTIALIASING_MODE::AA_FAST: m_currentAntialiasingMode = CAIRO_ANTIALIAS_FAST; break;
|
||||||
case CAIRO_ANTIALIASING_MODE::GOOD: m_currentAntialiasingMode = CAIRO_ANTIALIAS_GOOD; break;
|
case GAL_ANTIALIASING_MODE::AA_HIGHQUALITY: m_currentAntialiasingMode = CAIRO_ANTIALIAS_GOOD; break;
|
||||||
default: m_currentAntialiasingMode = CAIRO_ANTIALIAS_NONE;
|
default: m_currentAntialiasingMode = CAIRO_ANTIALIAS_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1631,7 +1631,7 @@ void CAIRO_GAL::setCompositor()
|
|||||||
// Recreate the compositor with the new Cairo context
|
// Recreate the compositor with the new Cairo context
|
||||||
m_compositor.reset( new CAIRO_COMPOSITOR( &m_currentContext ) );
|
m_compositor.reset( new CAIRO_COMPOSITOR( &m_currentContext ) );
|
||||||
m_compositor->Resize( m_screenSize.x, m_screenSize.y );
|
m_compositor->Resize( m_screenSize.x, m_screenSize.y );
|
||||||
m_compositor->SetAntialiasingMode( m_options.cairo_antialiasing_mode );
|
m_compositor->SetAntialiasingMode( m_options.antialiasing_mode );
|
||||||
|
|
||||||
// Prepare buffers
|
// Prepare buffers
|
||||||
m_mainBuffer = m_compositor->CreateBuffer();
|
m_mainBuffer = m_compositor->CreateBuffer();
|
||||||
@ -1669,9 +1669,9 @@ bool CAIRO_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
|||||||
bool refresh = false;
|
bool refresh = false;
|
||||||
|
|
||||||
if( m_validCompositor &&
|
if( m_validCompositor &&
|
||||||
aOptions.cairo_antialiasing_mode != m_compositor->GetAntialiasingMode() )
|
aOptions.antialiasing_mode != m_compositor->GetAntialiasingMode() )
|
||||||
{
|
{
|
||||||
m_compositor->SetAntialiasingMode( m_options.cairo_antialiasing_mode );
|
m_compositor->SetAntialiasingMode( m_options.antialiasing_mode );
|
||||||
m_validCompositor = false;
|
m_validCompositor = false;
|
||||||
deinitSurface();
|
deinitSurface();
|
||||||
|
|
||||||
|
@ -44,8 +44,7 @@ static const wxChar* traceGalDispOpts = wxT( "KICAD_GAL_DISPLAY_OPTIONS" );
|
|||||||
|
|
||||||
|
|
||||||
GAL_DISPLAY_OPTIONS::GAL_DISPLAY_OPTIONS()
|
GAL_DISPLAY_OPTIONS::GAL_DISPLAY_OPTIONS()
|
||||||
: gl_antialiasing_mode( OPENGL_ANTIALIASING_MODE::NONE ),
|
: antialiasing_mode( GAL_ANTIALIASING_MODE::AA_NONE ),
|
||||||
cairo_antialiasing_mode( CAIRO_ANTIALIASING_MODE::NONE ),
|
|
||||||
m_gridStyle( GRID_STYLE::DOTS ),
|
m_gridStyle( GRID_STYLE::DOTS ),
|
||||||
m_gridSnapping( GRID_SNAPPING::ALWAYS ),
|
m_gridSnapping( GRID_SNAPPING::ALWAYS ),
|
||||||
m_gridLineWidth( 1.0 ),
|
m_gridLineWidth( 1.0 ),
|
||||||
|
@ -49,7 +49,7 @@ OPENGL_COMPOSITOR::OPENGL_COMPOSITOR() :
|
|||||||
m_mainFbo( 0 ),
|
m_mainFbo( 0 ),
|
||||||
m_depthBuffer( 0 ),
|
m_depthBuffer( 0 ),
|
||||||
m_curFbo( DIRECT_RENDERING ),
|
m_curFbo( DIRECT_RENDERING ),
|
||||||
m_currentAntialiasingMode( OPENGL_ANTIALIASING_MODE::NONE )
|
m_currentAntialiasingMode( GAL_ANTIALIASING_MODE::AA_NONE )
|
||||||
{
|
{
|
||||||
m_antialiasing = std::make_unique<ANTIALIASING_NONE>( this );
|
m_antialiasing = std::make_unique<ANTIALIASING_NONE>( this );
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ OPENGL_COMPOSITOR::~OPENGL_COMPOSITOR()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OPENGL_COMPOSITOR::SetAntialiasingMode( OPENGL_ANTIALIASING_MODE aMode )
|
void OPENGL_COMPOSITOR::SetAntialiasingMode( GAL_ANTIALIASING_MODE aMode )
|
||||||
{
|
{
|
||||||
m_currentAntialiasingMode = aMode;
|
m_currentAntialiasingMode = aMode;
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ void OPENGL_COMPOSITOR::SetAntialiasingMode( OPENGL_ANTIALIASING_MODE aMode )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OPENGL_ANTIALIASING_MODE OPENGL_COMPOSITOR::GetAntialiasingMode() const
|
GAL_ANTIALIASING_MODE OPENGL_COMPOSITOR::GetAntialiasingMode() const
|
||||||
{
|
{
|
||||||
return m_currentAntialiasingMode;
|
return m_currentAntialiasingMode;
|
||||||
}
|
}
|
||||||
@ -94,10 +94,10 @@ void OPENGL_COMPOSITOR::Initialize()
|
|||||||
|
|
||||||
switch( m_currentAntialiasingMode )
|
switch( m_currentAntialiasingMode )
|
||||||
{
|
{
|
||||||
case OPENGL_ANTIALIASING_MODE::SMAA:
|
case GAL_ANTIALIASING_MODE::AA_FAST:
|
||||||
m_antialiasing = std::make_unique<ANTIALIASING_SMAA>( this );
|
m_antialiasing = std::make_unique<ANTIALIASING_SMAA>( this );
|
||||||
break;
|
break;
|
||||||
case OPENGL_ANTIALIASING_MODE::SUPERSAMPLING:
|
case GAL_ANTIALIASING_MODE::AA_HIGHQUALITY:
|
||||||
m_antialiasing = std::make_unique<ANTIALIASING_SUPERSAMPLING>( this );
|
m_antialiasing = std::make_unique<ANTIALIASING_SUPERSAMPLING>( this );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -406,7 +406,7 @@ int OPENGL_COMPOSITOR::GetAntialiasSupersamplingFactor() const
|
|||||||
{
|
{
|
||||||
switch ( m_currentAntialiasingMode )
|
switch ( m_currentAntialiasingMode )
|
||||||
{
|
{
|
||||||
case OPENGL_ANTIALIASING_MODE::SUPERSAMPLING: return 2;
|
case GAL_ANTIALIASING_MODE::AA_HIGHQUALITY: return 2;
|
||||||
default: return 1;
|
default: return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -415,7 +415,7 @@ VECTOR2D OPENGL_COMPOSITOR::GetAntialiasRenderingOffset() const
|
|||||||
{
|
{
|
||||||
switch( m_currentAntialiasingMode )
|
switch( m_currentAntialiasingMode )
|
||||||
{
|
{
|
||||||
case OPENGL_ANTIALIASING_MODE::SUPERSAMPLING: return VECTOR2D( 0.5, -0.5 );
|
case GAL_ANTIALIASING_MODE::AA_HIGHQUALITY: return VECTOR2D( 0.5, -0.5 );
|
||||||
default: return VECTOR2D( 0, 0 );
|
default: return VECTOR2D( 0, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -348,7 +348,7 @@ OPENGL_GAL::OPENGL_GAL( const KIGFX::VC_SETTINGS& aVcSettings, GAL_DISPLAY_OPTIO
|
|||||||
m_bitmapCache = std::make_unique<GL_BITMAP_CACHE>();
|
m_bitmapCache = std::make_unique<GL_BITMAP_CACHE>();
|
||||||
|
|
||||||
m_compositor = new OPENGL_COMPOSITOR;
|
m_compositor = new OPENGL_COMPOSITOR;
|
||||||
m_compositor->SetAntialiasingMode( m_options.gl_antialiasing_mode );
|
m_compositor->SetAntialiasingMode( m_options.antialiasing_mode );
|
||||||
|
|
||||||
// Initialize the flags
|
// Initialize the flags
|
||||||
m_isFramebufferInitialized = false;
|
m_isFramebufferInitialized = false;
|
||||||
@ -510,9 +510,9 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
|||||||
|
|
||||||
bool refresh = false;
|
bool refresh = false;
|
||||||
|
|
||||||
if( m_options.gl_antialiasing_mode != m_compositor->GetAntialiasingMode() )
|
if( m_options.antialiasing_mode != m_compositor->GetAntialiasingMode() )
|
||||||
{
|
{
|
||||||
m_compositor->SetAntialiasingMode( m_options.gl_antialiasing_mode );
|
m_compositor->SetAntialiasingMode( m_options.antialiasing_mode );
|
||||||
m_isFramebufferInitialized = false;
|
m_isFramebufferInitialized = false;
|
||||||
refresh = true;
|
refresh = true;
|
||||||
}
|
}
|
||||||
|
@ -82,11 +82,8 @@ void GAL_DISPLAY_OPTIONS_IMPL::ReadCommonConfig( COMMON_SETTINGS& aSettings, wxW
|
|||||||
{
|
{
|
||||||
wxLogTrace( traceGalDispOpts, wxS( "Reading common config" ) );
|
wxLogTrace( traceGalDispOpts, wxS( "Reading common config" ) );
|
||||||
|
|
||||||
gl_antialiasing_mode =
|
antialiasing_mode =
|
||||||
static_cast<KIGFX::OPENGL_ANTIALIASING_MODE>( aSettings.m_Graphics.opengl_aa_mode );
|
static_cast<KIGFX::GAL_ANTIALIASING_MODE>( aSettings.m_Graphics.aa_mode );
|
||||||
|
|
||||||
cairo_antialiasing_mode =
|
|
||||||
static_cast<KIGFX::CAIRO_ANTIALIASING_MODE>( aSettings.m_Graphics.cairo_aa_mode );
|
|
||||||
|
|
||||||
m_dpi = DPI_SCALING_COMMON( &aSettings, aWindow );
|
m_dpi = DPI_SCALING_COMMON( &aSettings, aWindow );
|
||||||
UpdateScaleFactor();
|
UpdateScaleFactor();
|
||||||
|
@ -47,9 +47,6 @@ APP_SETTINGS_BASE::APP_SETTINGS_BASE( const std::string& aFilename, int aSchemaV
|
|||||||
m_CustomToolbars( false ),
|
m_CustomToolbars( false ),
|
||||||
m_appSettingsSchemaVersion( aSchemaVersion )
|
m_appSettingsSchemaVersion( aSchemaVersion )
|
||||||
{
|
{
|
||||||
// Make Coverity happy:
|
|
||||||
m_Graphics.canvas_type = EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL;
|
|
||||||
|
|
||||||
// Build parameters list:
|
// Build parameters list:
|
||||||
m_params.emplace_back(
|
m_params.emplace_back(
|
||||||
new PARAM<int>( "find_replace.match_mode", &m_FindReplace.match_mode, 0 ) );
|
new PARAM<int>( "find_replace.match_mode", &m_FindReplace.match_mode, 0 ) );
|
||||||
@ -124,10 +121,6 @@ APP_SETTINGS_BASE::APP_SETTINGS_BASE( const std::string& aFilename, int aSchemaV
|
|||||||
},
|
},
|
||||||
{} ) );
|
{} ) );
|
||||||
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "graphics.canvas_type",
|
|
||||||
&m_Graphics.canvas_type, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<float>( "graphics.highlight_factor",
|
m_params.emplace_back( new PARAM<float>( "graphics.highlight_factor",
|
||||||
&m_Graphics.highlight_factor, 0.5f, 0.0, 1.0f ) );
|
&m_Graphics.highlight_factor, 0.5f, 0.0, 1.0f ) );
|
||||||
|
|
||||||
@ -296,8 +289,6 @@ bool APP_SETTINGS_BASE::MigrateFromLegacy( wxConfigBase* aCfg )
|
|||||||
|
|
||||||
migrateFindReplace( aCfg );
|
migrateFindReplace( aCfg );
|
||||||
|
|
||||||
ret &= fromLegacy<int>( aCfg, "canvas_type", "graphics.canvas_type" );
|
|
||||||
|
|
||||||
ret &= fromLegacy<int>( aCfg, "P22LIB_TREE_MODEL_ADAPTERSelectorColumnWidth",
|
ret &= fromLegacy<int>( aCfg, "P22LIB_TREE_MODEL_ADAPTERSelectorColumnWidth",
|
||||||
"lib_tree.column_width" );
|
"lib_tree.column_width" );
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include <class_draw_panel_gal.h>
|
||||||
#include <env_vars.h>
|
#include <env_vars.h>
|
||||||
#include <paths.h>
|
#include <paths.h>
|
||||||
#include <search_stack.h>
|
#include <search_stack.h>
|
||||||
@ -286,11 +287,11 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
|
|||||||
&m_Input.drag_right, MOUSE_DRAG_ACTION::PAN, MOUSE_DRAG_ACTION::SELECT,
|
&m_Input.drag_right, MOUSE_DRAG_ACTION::PAN, MOUSE_DRAG_ACTION::SELECT,
|
||||||
MOUSE_DRAG_ACTION::NONE ) );
|
MOUSE_DRAG_ACTION::NONE ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "graphics.opengl_antialiasing_mode",
|
m_params.emplace_back( new PARAM<int>( "graphics.canvas_type",
|
||||||
&m_Graphics.opengl_aa_mode, 2, 0, 2 ) );
|
&m_Graphics.canvas_type, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "graphics.cairo_antialiasing_mode",
|
m_params.emplace_back( new PARAM<int>( "graphics.antialiasing_mode",
|
||||||
&m_Graphics.cairo_aa_mode, 0, 0, 2 ) );
|
&m_Graphics.aa_mode, 2, 0, 2 ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "system.autosave_interval",
|
m_params.emplace_back( new PARAM<int>( "system.autosave_interval",
|
||||||
&m_System.autosave_interval, 600 ) );
|
&m_System.autosave_interval, 600 ) );
|
||||||
|
@ -86,15 +86,6 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, APP_SETTINGS_BASE* aApp
|
|||||||
|
|
||||||
bool GAL_OPTIONS_PANEL::TransferDataToWindow()
|
bool GAL_OPTIONS_PANEL::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
#ifndef __WXMAC__
|
|
||||||
auto canvasType = static_cast<EDA_DRAW_PANEL_GAL::GAL_TYPE>( m_cfg->m_Graphics.canvas_type );
|
|
||||||
|
|
||||||
if( canvasType == EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL )
|
|
||||||
m_rbAccelerated->SetValue( true );
|
|
||||||
else
|
|
||||||
m_rbFallback->SetValue( true );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_gridSnapOptions->SetSelection( m_cfg->m_Window.grid.snap );
|
m_gridSnapOptions->SetSelection( m_cfg->m_Window.grid.snap );
|
||||||
|
|
||||||
if( m_cfg->m_Window.grid.style == 0 )
|
if( m_cfg->m_Window.grid.style == 0 )
|
||||||
@ -136,12 +127,6 @@ bool GAL_OPTIONS_PANEL::TransferDataFromWindow()
|
|||||||
m_cfg->m_Window.cursor.fullscreen_cursor = m_rbFullWindowCrosshairs->GetValue();
|
m_cfg->m_Window.cursor.fullscreen_cursor = m_rbFullWindowCrosshairs->GetValue();
|
||||||
m_cfg->m_Window.cursor.always_show_cursor = m_forceCursorDisplay->GetValue();
|
m_cfg->m_Window.cursor.always_show_cursor = m_forceCursorDisplay->GetValue();
|
||||||
|
|
||||||
#ifndef __WXMAC__
|
|
||||||
m_cfg->m_Graphics.canvas_type = m_rbAccelerated->GetValue() ?
|
|
||||||
EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL :
|
|
||||||
EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -14,36 +14,6 @@ GAL_OPTIONS_PANEL_BASE::GAL_OPTIONS_PANEL_BASE( wxWindow* parent, wxWindowID id,
|
|||||||
wxBoxSizer* mainSizer;
|
wxBoxSizer* mainSizer;
|
||||||
mainSizer = new wxBoxSizer( wxVERTICAL );
|
mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_renderingSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
m_staticText9 = new wxStaticText( this, wxID_ANY, _("Rendering Engine"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticText9->Wrap( -1 );
|
|
||||||
m_renderingSizer->Add( m_staticText9, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
|
|
||||||
|
|
||||||
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
|
||||||
m_renderingSizer->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
|
|
||||||
|
|
||||||
wxFlexGridSizer* fgSizer2;
|
|
||||||
fgSizer2 = new wxFlexGridSizer( 0, 1, 4, 0 );
|
|
||||||
fgSizer2->SetFlexibleDirection( wxBOTH );
|
|
||||||
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
|
||||||
|
|
||||||
m_rbAccelerated = new wxRadioButton( this, wxID_ANY, _("Accelerated graphics"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
|
||||||
m_rbAccelerated->SetToolTip( _("Hardware-accelerated graphics (recommended)") );
|
|
||||||
|
|
||||||
fgSizer2->Add( m_rbAccelerated, 0, wxTOP|wxLEFT, 5 );
|
|
||||||
|
|
||||||
m_rbFallback = new wxRadioButton( this, wxID_ANY, _("Fallback graphics"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_rbFallback->SetToolTip( _("Software graphics (for computers which do not support KiCad's hardware acceleration requirements)") );
|
|
||||||
|
|
||||||
fgSizer2->Add( m_rbFallback, 0, wxLEFT, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
m_renderingSizer->Add( fgSizer2, 0, wxEXPAND|wxALL, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
mainSizer->Add( m_renderingSizer, 0, wxEXPAND|wxBOTTOM, 5 );
|
|
||||||
|
|
||||||
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Grid Display"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Grid Display"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText1->Wrap( -1 );
|
m_staticText1->Wrap( -1 );
|
||||||
mainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
|
mainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
|
||||||
|
@ -60,286 +60,6 @@
|
|||||||
<property name="name">mainSizer</property>
|
<property name="name">mainSizer</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="true">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxEXPAND|wxBOTTOM</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxBoxSizer" expanded="true">
|
|
||||||
<property name="minimum_size"></property>
|
|
||||||
<property name="name">m_renderingSizer</property>
|
|
||||||
<property name="orient">wxVERTICAL</property>
|
|
||||||
<property name="permission">protected</property>
|
|
||||||
<object class="sizeritem" expanded="true">
|
|
||||||
<property name="border">13</property>
|
|
||||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxStaticText" expanded="true">
|
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer">0</property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position">0</property>
|
|
||||||
<property name="aui_row">0</property>
|
|
||||||
<property name="best_size"></property>
|
|
||||||
<property name="bg"></property>
|
|
||||||
<property name="caption"></property>
|
|
||||||
<property name="caption_visible">1</property>
|
|
||||||
<property name="center_pane">0</property>
|
|
||||||
<property name="close_button">1</property>
|
|
||||||
<property name="context_help"></property>
|
|
||||||
<property name="context_menu">1</property>
|
|
||||||
<property name="default_pane">0</property>
|
|
||||||
<property name="dock">Dock</property>
|
|
||||||
<property name="dock_fixed">0</property>
|
|
||||||
<property name="docking">Left</property>
|
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="floatable">1</property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</property>
|
|
||||||
<property name="label">Rendering Engine</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_staticText9</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="true">
|
|
||||||
<property name="border">2</property>
|
|
||||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxStaticLine" expanded="true">
|
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer">0</property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position">0</property>
|
|
||||||
<property name="aui_row">0</property>
|
|
||||||
<property name="best_size"></property>
|
|
||||||
<property name="bg"></property>
|
|
||||||
<property name="caption"></property>
|
|
||||||
<property name="caption_visible">1</property>
|
|
||||||
<property name="center_pane">0</property>
|
|
||||||
<property name="close_button">1</property>
|
|
||||||
<property name="context_help"></property>
|
|
||||||
<property name="context_menu">1</property>
|
|
||||||
<property name="default_pane">0</property>
|
|
||||||
<property name="dock">Dock</property>
|
|
||||||
<property name="dock_fixed">0</property>
|
|
||||||
<property name="docking">Left</property>
|
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="floatable">1</property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</property>
|
|
||||||
<property name="max_size"></property>
|
|
||||||
<property name="maximize_button">0</property>
|
|
||||||
<property name="maximum_size"></property>
|
|
||||||
<property name="min_size"></property>
|
|
||||||
<property name="minimize_button">0</property>
|
|
||||||
<property name="minimum_size"></property>
|
|
||||||
<property name="moveable">1</property>
|
|
||||||
<property name="name">m_staticline3</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">wxLI_HORIZONTAL</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>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="true">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxEXPAND|wxALL</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxFlexGridSizer" expanded="true">
|
|
||||||
<property name="cols">1</property>
|
|
||||||
<property name="flexible_direction">wxBOTH</property>
|
|
||||||
<property name="growablecols"></property>
|
|
||||||
<property name="growablerows"></property>
|
|
||||||
<property name="hgap">0</property>
|
|
||||||
<property name="minimum_size"></property>
|
|
||||||
<property name="name">fgSizer2</property>
|
|
||||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
|
||||||
<property name="permission">none</property>
|
|
||||||
<property name="rows">0</property>
|
|
||||||
<property name="vgap">4</property>
|
|
||||||
<object class="sizeritem" expanded="true">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxTOP|wxLEFT</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxRadioButton" expanded="true">
|
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer">0</property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position">0</property>
|
|
||||||
<property name="aui_row">0</property>
|
|
||||||
<property name="best_size"></property>
|
|
||||||
<property name="bg"></property>
|
|
||||||
<property name="caption"></property>
|
|
||||||
<property name="caption_visible">1</property>
|
|
||||||
<property name="center_pane">0</property>
|
|
||||||
<property name="close_button">1</property>
|
|
||||||
<property name="context_help"></property>
|
|
||||||
<property name="context_menu">1</property>
|
|
||||||
<property name="default_pane">0</property>
|
|
||||||
<property name="dock">Dock</property>
|
|
||||||
<property name="dock_fixed">0</property>
|
|
||||||
<property name="docking">Left</property>
|
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="floatable">1</property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</property>
|
|
||||||
<property name="label">Accelerated graphics</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_rbAccelerated</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">wxRB_GROUP</property>
|
|
||||||
<property name="subclass">; ; forward_declare</property>
|
|
||||||
<property name="toolbar_pane">0</property>
|
|
||||||
<property name="tooltip">Hardware-accelerated graphics (recommended)</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="true">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxLEFT</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxRadioButton" expanded="true">
|
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer">0</property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position">0</property>
|
|
||||||
<property name="aui_row">0</property>
|
|
||||||
<property name="best_size"></property>
|
|
||||||
<property name="bg"></property>
|
|
||||||
<property name="caption"></property>
|
|
||||||
<property name="caption_visible">1</property>
|
|
||||||
<property name="center_pane">0</property>
|
|
||||||
<property name="close_button">1</property>
|
|
||||||
<property name="context_help"></property>
|
|
||||||
<property name="context_menu">1</property>
|
|
||||||
<property name="default_pane">0</property>
|
|
||||||
<property name="dock">Dock</property>
|
|
||||||
<property name="dock_fixed">0</property>
|
|
||||||
<property name="docking">Left</property>
|
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="floatable">1</property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</property>
|
|
||||||
<property name="label">Fallback graphics</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_rbFallback</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">Software graphics (for computers which do not support KiCad's hardware acceleration requirements)</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>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">13</property>
|
<property name="border">13</property>
|
||||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -35,11 +35,6 @@ class GAL_OPTIONS_PANEL_BASE : public wxPanel
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxBoxSizer* m_renderingSizer;
|
|
||||||
wxStaticText* m_staticText9;
|
|
||||||
wxStaticLine* m_staticline3;
|
|
||||||
wxRadioButton* m_rbAccelerated;
|
|
||||||
wxRadioButton* m_rbFallback;
|
|
||||||
wxStaticText* m_staticText1;
|
wxStaticText* m_staticText1;
|
||||||
wxStaticLine* m_staticline1;
|
wxStaticLine* m_staticline1;
|
||||||
wxStaticText* m_gridStyleLabel;
|
wxStaticText* m_gridStyleLabel;
|
||||||
|
@ -94,7 +94,7 @@ PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS( wxWindow* aParent
|
|||||||
m_galDisplayOptions.ReadConfig( *common_settings, app_settings->m_Window, this );
|
m_galDisplayOptions.ReadConfig( *common_settings, app_settings->m_Window, this );
|
||||||
m_galDisplayOptions.m_forceDisplayCursor = false;
|
m_galDisplayOptions.m_forceDisplayCursor = false;
|
||||||
|
|
||||||
m_galType = static_cast<EDA_DRAW_PANEL_GAL::GAL_TYPE>( app_settings->m_Graphics.canvas_type );
|
m_galType = static_cast<EDA_DRAW_PANEL_GAL::GAL_TYPE>( common_settings->m_Graphics.canvas_type );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ bool SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen, wxDC* aDC, bool aForPrinting
|
|||||||
wxDC* dc = aDC;
|
wxDC* dc = aDC;
|
||||||
m_view = m_parent->GetCanvas()->GetView();
|
m_view = m_parent->GetCanvas()->GetView();
|
||||||
KIGFX::GAL_DISPLAY_OPTIONS options;
|
KIGFX::GAL_DISPLAY_OPTIONS options;
|
||||||
options.cairo_antialiasing_mode = KIGFX::CAIRO_ANTIALIASING_MODE::GOOD;
|
options.antialiasing_mode = KIGFX::GAL_ANTIALIASING_MODE::AA_HIGHQUALITY;
|
||||||
std::unique_ptr<KIGFX::GAL_PRINT> galPrint = KIGFX::GAL_PRINT::Create( options, dc );
|
std::unique_ptr<KIGFX::GAL_PRINT> galPrint = KIGFX::GAL_PRINT::Create( options, dc );
|
||||||
KIGFX::GAL* gal = galPrint->GetGAL();
|
KIGFX::GAL* gal = galPrint->GetGAL();
|
||||||
KIGFX::PRINT_CONTEXT* printCtx = galPrint->GetPrintCtx();
|
KIGFX::PRINT_CONTEXT* printCtx = galPrint->GetPrintCtx();
|
||||||
|
@ -400,8 +400,8 @@ wxPanel* PANEL_SYMBOL_CHOOSER::constructRightPanel( wxWindow* aParent )
|
|||||||
|
|
||||||
if( m_frame->GetCanvas() )
|
if( m_frame->GetCanvas() )
|
||||||
backend = m_frame->GetCanvas()->GetBackend();
|
backend = m_frame->GetCanvas()->GetBackend();
|
||||||
else if( EESCHEMA_SETTINGS* cfg = GetAppSettings<EESCHEMA_SETTINGS>( "eeschema" ) )
|
else if( COMMON_SETTINGS* cfg = Pgm().GetCommonSettings() )
|
||||||
backend = (EDA_DRAW_PANEL_GAL::GAL_TYPE) cfg->m_Graphics.canvas_type;
|
backend = static_cast<EDA_DRAW_PANEL_GAL::GAL_TYPE>( cfg->m_Graphics.canvas_type );
|
||||||
|
|
||||||
wxPanel* panel = new wxPanel( aParent );
|
wxPanel* panel = new wxPanel( aParent );
|
||||||
wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
@ -557,7 +557,7 @@ protected:
|
|||||||
* @param aCfg is the APP_SETTINGS_BASE config storing the canvas type.
|
* @param aCfg is the APP_SETTINGS_BASE config storing the canvas type.
|
||||||
* If nullptr (default) the KifaceSettings() will be used
|
* If nullptr (default) the KifaceSettings() will be used
|
||||||
*/
|
*/
|
||||||
EDA_DRAW_PANEL_GAL::GAL_TYPE loadCanvasTypeSetting( APP_SETTINGS_BASE* aCfg = nullptr );
|
EDA_DRAW_PANEL_GAL::GAL_TYPE loadCanvasTypeSetting();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store the canvas type in the application settings.
|
* Store the canvas type in the application settings.
|
||||||
|
@ -86,17 +86,17 @@ public:
|
|||||||
/// @copydoc COMPOSITOR::Present()
|
/// @copydoc COMPOSITOR::Present()
|
||||||
virtual void Present() override;
|
virtual void Present() override;
|
||||||
|
|
||||||
void SetAntialiasingMode( CAIRO_ANTIALIASING_MODE aMode ); // clears all buffers
|
void SetAntialiasingMode( GAL_ANTIALIASING_MODE aMode ); // clears all buffers
|
||||||
CAIRO_ANTIALIASING_MODE GetAntialiasingMode() const
|
GAL_ANTIALIASING_MODE GetAntialiasingMode() const
|
||||||
{
|
{
|
||||||
switch( m_currentAntialiasingMode )
|
switch( m_currentAntialiasingMode )
|
||||||
{
|
{
|
||||||
case CAIRO_ANTIALIAS_FAST:
|
case CAIRO_ANTIALIAS_FAST:
|
||||||
return CAIRO_ANTIALIASING_MODE::FAST;
|
return GAL_ANTIALIASING_MODE::AA_FAST;
|
||||||
case CAIRO_ANTIALIAS_GOOD:
|
case CAIRO_ANTIALIAS_GOOD:
|
||||||
return CAIRO_ANTIALIASING_MODE::GOOD;
|
return GAL_ANTIALIASING_MODE::AA_HIGHQUALITY;
|
||||||
default:
|
default:
|
||||||
return CAIRO_ANTIALIASING_MODE::NONE;
|
return GAL_ANTIALIASING_MODE::AA_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,18 +50,11 @@ namespace KIGFX
|
|||||||
SMALL_CROSS ///< Use small cross instead of dots for the grid
|
SMALL_CROSS ///< Use small cross instead of dots for the grid
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class OPENGL_ANTIALIASING_MODE
|
enum class GAL_ANTIALIASING_MODE
|
||||||
{
|
{
|
||||||
NONE,
|
AA_NONE,
|
||||||
SMAA,
|
AA_FAST,
|
||||||
SUPERSAMPLING,
|
AA_HIGHQUALITY,
|
||||||
};
|
|
||||||
|
|
||||||
enum class CAIRO_ANTIALIASING_MODE
|
|
||||||
{
|
|
||||||
NONE,
|
|
||||||
FAST,
|
|
||||||
GOOD,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class GRID_SNAPPING
|
enum class GRID_SNAPPING
|
||||||
@ -91,9 +84,7 @@ namespace KIGFX
|
|||||||
virtual ~GAL_DISPLAY_OPTIONS()
|
virtual ~GAL_DISPLAY_OPTIONS()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
OPENGL_ANTIALIASING_MODE gl_antialiasing_mode;
|
GAL_ANTIALIASING_MODE antialiasing_mode;
|
||||||
|
|
||||||
CAIRO_ANTIALIASING_MODE cairo_antialiasing_mode;
|
|
||||||
|
|
||||||
///< The grid style to draw the grid in
|
///< The grid style to draw the grid in
|
||||||
KIGFX::GRID_STYLE m_gridStyle;
|
KIGFX::GRID_STYLE m_gridStyle;
|
||||||
|
@ -90,8 +90,8 @@ public:
|
|||||||
void DrawBuffer( unsigned int aSourceHandle, unsigned int aDestHandle );
|
void DrawBuffer( unsigned int aSourceHandle, unsigned int aDestHandle );
|
||||||
unsigned int CreateBuffer( VECTOR2I aDimensions );
|
unsigned int CreateBuffer( VECTOR2I aDimensions );
|
||||||
|
|
||||||
void SetAntialiasingMode( OPENGL_ANTIALIASING_MODE aMode ); // clears all buffers
|
void SetAntialiasingMode( GAL_ANTIALIASING_MODE aMode ); // clears all buffers
|
||||||
OPENGL_ANTIALIASING_MODE GetAntialiasingMode() const;
|
GAL_ANTIALIASING_MODE GetAntialiasingMode() const;
|
||||||
|
|
||||||
int GetAntialiasSupersamplingFactor() const;
|
int GetAntialiasSupersamplingFactor() const;
|
||||||
VECTOR2D GetAntialiasRenderingOffset() const;
|
VECTOR2D GetAntialiasRenderingOffset() const;
|
||||||
@ -131,7 +131,7 @@ protected:
|
|||||||
/// Store the used FBO name in case there was more than one compositor used
|
/// Store the used FBO name in case there was more than one compositor used
|
||||||
GLuint m_curFbo;
|
GLuint m_curFbo;
|
||||||
|
|
||||||
OPENGL_ANTIALIASING_MODE m_currentAntialiasingMode;
|
GAL_ANTIALIASING_MODE m_currentAntialiasingMode;
|
||||||
std::unique_ptr<OPENGL_PRESENTOR> m_antialiasing;
|
std::unique_ptr<OPENGL_PRESENTOR> m_antialiasing;
|
||||||
};
|
};
|
||||||
} // namespace KIGFX
|
} // namespace KIGFX
|
||||||
|
@ -136,7 +136,6 @@ public:
|
|||||||
|
|
||||||
struct GRAPHICS
|
struct GRAPHICS
|
||||||
{
|
{
|
||||||
int canvas_type;
|
|
||||||
float highlight_factor; ///< How much to brighten highlighted objects by.
|
float highlight_factor; ///< How much to brighten highlighted objects by.
|
||||||
float select_factor; ///< How much to brighten selected objects by.
|
float select_factor; ///< How much to brighten selected objects by.
|
||||||
};
|
};
|
||||||
|
@ -106,8 +106,8 @@ public:
|
|||||||
|
|
||||||
struct GRAPHICS
|
struct GRAPHICS
|
||||||
{
|
{
|
||||||
int cairo_aa_mode;
|
int canvas_type; ///< EDA_DRAW_PANEL_GAL::GAL_TYPE_* value, see gal_options_panel.cpp
|
||||||
int opengl_aa_mode;
|
int aa_mode;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SESSION
|
struct SESSION
|
||||||
|
@ -125,7 +125,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||||||
SetIcons( icon_bundle );
|
SetIcons( icon_bundle );
|
||||||
|
|
||||||
// Create GAL canvas
|
// Create GAL canvas
|
||||||
m_canvasType = loadCanvasTypeSetting( GetSettings() );
|
m_canvasType = loadCanvasTypeSetting();
|
||||||
|
|
||||||
PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_frameSize,
|
PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_frameSize,
|
||||||
GetGalDisplayOptions(), m_canvasType );
|
GetGalDisplayOptions(), m_canvasType );
|
||||||
@ -740,7 +740,7 @@ void FOOTPRINT_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
|||||||
void FOOTPRINT_EDIT_FRAME::resolveCanvasType()
|
void FOOTPRINT_EDIT_FRAME::resolveCanvasType()
|
||||||
{
|
{
|
||||||
// Load canvas type from the FOOTPRINT_EDITOR_SETTINGS:
|
// Load canvas type from the FOOTPRINT_EDITOR_SETTINGS:
|
||||||
m_canvasType = loadCanvasTypeSetting( GetSettings() );
|
m_canvasType = loadCanvasTypeSetting();
|
||||||
|
|
||||||
// If we had an OpenGL failure this session, use the fallback GAL but don't update the
|
// If we had an OpenGL failure this session, use the fallback GAL but don't update the
|
||||||
// user preference silently:
|
// user preference silently:
|
||||||
|
@ -241,13 +241,13 @@ FOOTPRINT_PREVIEW_PANEL* FOOTPRINT_PREVIEW_PANEL::New( KIWAY* aKiway, wxWindow*
|
|||||||
UNITS_PROVIDER* aUnitsProvider )
|
UNITS_PROVIDER* aUnitsProvider )
|
||||||
{
|
{
|
||||||
PCBNEW_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" );
|
PCBNEW_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" );
|
||||||
|
COMMON_SETTINGS* commonSettings = Pgm().GetCommonSettings();
|
||||||
std::unique_ptr<GAL_DISPLAY_OPTIONS_IMPL> gal_opts;
|
std::unique_ptr<GAL_DISPLAY_OPTIONS_IMPL> gal_opts;
|
||||||
|
|
||||||
gal_opts = std::make_unique<GAL_DISPLAY_OPTIONS_IMPL>();
|
gal_opts = std::make_unique<GAL_DISPLAY_OPTIONS_IMPL>();
|
||||||
gal_opts->ReadConfig( *Pgm().GetCommonSettings(), cfg->m_Window, aParent );
|
gal_opts->ReadConfig( *commonSettings, cfg->m_Window, aParent );
|
||||||
|
|
||||||
auto galType = static_cast<EDA_DRAW_PANEL_GAL::GAL_TYPE>( cfg->m_Graphics.canvas_type );
|
auto galType = static_cast<EDA_DRAW_PANEL_GAL::GAL_TYPE>( commonSettings->m_Graphics.canvas_type );
|
||||||
FOOTPRINT_PREVIEW_PANEL* panel = new FOOTPRINT_PREVIEW_PANEL( aKiway, aParent, aUnitsProvider,
|
FOOTPRINT_PREVIEW_PANEL* panel = new FOOTPRINT_PREVIEW_PANEL( aKiway, aParent, aUnitsProvider,
|
||||||
std::move( gal_opts ), galType );
|
std::move( gal_opts ), galType );
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ void PCB_TEST_FRAME_BASE::SetSelectableItemTypes( const std::vector<KICAD_T> aTy
|
|||||||
void PCB_TEST_FRAME_BASE::createView( wxWindow *aParent, PCB_DRAW_PANEL_GAL::GAL_TYPE aGalType )
|
void PCB_TEST_FRAME_BASE::createView( wxWindow *aParent, PCB_DRAW_PANEL_GAL::GAL_TYPE aGalType )
|
||||||
{
|
{
|
||||||
// SUPERSAMPLING_X4;
|
// SUPERSAMPLING_X4;
|
||||||
m_displayOptions.gl_antialiasing_mode = KIGFX::OPENGL_ANTIALIASING_MODE::NONE;
|
m_displayOptions.antialiasing_mode = KIGFX::GAL_ANTIALIASING_MODE::AA_NONE;
|
||||||
|
|
||||||
DPI_SCALING_COMMON dpi( Pgm().GetCommonSettings(), aParent );
|
DPI_SCALING_COMMON dpi( Pgm().GetCommonSettings(), aParent );
|
||||||
m_displayOptions.m_scaleFactor = dpi.GetScaleFactor();
|
m_displayOptions.m_scaleFactor = dpi.GetScaleFactor();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user