mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Make various menu button presentations consistent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20783 Fixes https://gitlab.com/kicad/code/kicad/-/issues/20774
This commit is contained in:
parent
34e49758d0
commit
90e17ecabd
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include <widgets/lib_tree.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <widgets/bitmap_button.h>
|
||||
#include <core/kicad_algo.h>
|
||||
#include <macros.h>
|
||||
#include <bitmaps.h>
|
||||
@ -37,6 +37,7 @@
|
||||
#include <wx/settings.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/srchctrl.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/popupwin.h>
|
||||
|
||||
#include <eda_doc.h> // for GetAssociatedDocument()
|
||||
@ -86,11 +87,14 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, const wxString& aRecentSearchesKey, LIB_T
|
||||
|
||||
m_debounceTimer = new wxTimer( this );
|
||||
|
||||
search_sizer->Add( m_query_ctrl, 1, wxEXPAND | wxRIGHT, 5 );
|
||||
search_sizer->Add( m_query_ctrl, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
|
||||
|
||||
m_sort_ctrl = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition,
|
||||
wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
m_sort_ctrl->SetBitmap( KiBitmapBundle( BITMAPS::small_sort_desc ) );
|
||||
wxStaticLine* separator = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
||||
search_sizer->Add( separator, 0, wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
m_sort_ctrl = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition,
|
||||
wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
m_sort_ctrl->SetBitmap( KiBitmapBundle( BITMAPS::config ) );
|
||||
m_sort_ctrl->Bind( wxEVT_LEFT_DOWN,
|
||||
[&]( wxMouseEvent& aEvent )
|
||||
{
|
||||
@ -132,10 +136,9 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, const wxString& aRecentSearchesKey, LIB_T
|
||||
} );
|
||||
|
||||
m_sort_ctrl->Bind( wxEVT_CHAR_HOOK, &LIB_TREE::onTreeCharHook, this );
|
||||
search_sizer->Add( m_sort_ctrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
search_sizer->Add( m_sort_ctrl, 0, wxEXPAND, 5 );
|
||||
|
||||
sizer->Add( search_sizer, 0, wxEXPAND | wxBOTTOM, 5 );
|
||||
sizer->Add( search_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
m_query_ctrl->Bind( wxEVT_TEXT, &LIB_TREE::onQueryText, this );
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <bitmaps.h>
|
||||
#include <kiway.h>
|
||||
#include <widgets/search_pane_tab.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <widgets/bitmap_button.h>
|
||||
|
||||
|
||||
#define ID_TOGGLE_ZOOM_TO_SELECTION 14000
|
||||
|
@ -5,7 +5,7 @@
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "widgets/std_bitmap_button.h"
|
||||
#include "widgets/bitmap_button.h"
|
||||
|
||||
#include "search_pane_base.h"
|
||||
|
||||
@ -23,13 +23,13 @@ SEARCH_PANE_BASE::SEARCH_PANE_BASE( wxWindow* parent, wxWindowID id, const wxPoi
|
||||
m_searchCtrl1->ShowSearchButton( true );
|
||||
#endif
|
||||
m_searchCtrl1->ShowCancelButton( false );
|
||||
bSizer2->Add( m_searchCtrl1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 );
|
||||
bSizer2->Add( m_searchCtrl1, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 4 );
|
||||
|
||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
||||
bSizer2->Add( m_staticline1, 0, wxEXPAND|wxALL, 5 );
|
||||
bSizer2->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
m_menuButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bSizer2->Add( m_menuButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
|
||||
m_menuButton = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bSizer2->Add( m_menuButton, 0, wxALIGN_CENTER_VERTICAL, 2 );
|
||||
|
||||
|
||||
m_sizerOuter->Add( bSizer2, 0, wxEXPAND, 5 );
|
||||
|
@ -72,8 +72,8 @@
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||
<property name="border">4</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxSearchCtrl" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
@ -139,8 +139,8 @@
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
@ -198,8 +198,8 @@
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||
<property name="border">2</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
@ -236,7 +236,7 @@
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">MyButton</property>
|
||||
<property name="label">menu</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
@ -259,7 +259,7 @@
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||
<property name="subclass">BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class STD_BITMAP_BUTTON;
|
||||
class BITMAP_BUTTON;
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/srchctrl.h>
|
||||
@ -41,7 +41,7 @@ class SEARCH_PANE_BASE : public wxPanel
|
||||
wxBoxSizer* m_sizerOuter;
|
||||
wxSearchCtrl* m_searchCtrl1;
|
||||
wxStaticLine* m_staticline1;
|
||||
STD_BITMAP_BUTTON* m_menuButton;
|
||||
BITMAP_BUTTON* m_menuButton;
|
||||
wxNotebook* m_notebook;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
@ -256,7 +256,7 @@ protected:
|
||||
wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> m_adapter;
|
||||
|
||||
wxSearchCtrl* m_query_ctrl;
|
||||
STD_BITMAP_BUTTON* m_sort_ctrl;
|
||||
BITMAP_BUTTON* m_sort_ctrl;
|
||||
WX_DATAVIEWCTRL* m_tree_ctrl;
|
||||
HTML_WINDOW* m_details_ctrl;
|
||||
wxTimer* m_debounceTimer;
|
||||
|
@ -346,18 +346,18 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
.CloseButton( false ) );
|
||||
|
||||
m_auimgr.AddPane( m_designBlocksPane, EDA_PANE().Name( DesignBlocksPaneName() )
|
||||
.Right().Layer( 5 )
|
||||
.Caption( _( "Design Blocks" ) )
|
||||
.CaptionVisible( true )
|
||||
.PaneBorder( true )
|
||||
.TopDockable( false )
|
||||
.BottomDockable( false )
|
||||
.CloseButton( true )
|
||||
.MinSize( FromDIP( wxSize( 240, 60 ) ) )
|
||||
.BestSize( FromDIP( wxSize( 300, 200 ) ) )
|
||||
.FloatingSize( FromDIP( wxSize( 800, 600 ) ) )
|
||||
.FloatingPosition( FromDIP( wxPoint( 50, 200 ) ) )
|
||||
.Show( true ) );
|
||||
.Right().Layer( 5 )
|
||||
.Caption( _( "Design Blocks" ) )
|
||||
.CaptionVisible( true )
|
||||
.PaneBorder( true )
|
||||
.TopDockable( false )
|
||||
.BottomDockable( false )
|
||||
.CloseButton( true )
|
||||
.MinSize( FromDIP( wxSize( 240, 60 ) ) )
|
||||
.BestSize( FromDIP( wxSize( 300, 200 ) ) )
|
||||
.FloatingSize( FromDIP( wxSize( 800, 600 ) ) )
|
||||
.FloatingPosition( FromDIP( wxPoint( 50, 200 ) ) )
|
||||
.Show( true ) );
|
||||
|
||||
m_auimgr.AddPane( m_propertiesPanel, EDA_PANE().Name( PropertiesPaneName() )
|
||||
.Left().Layer( 5 )
|
||||
@ -371,15 +371,14 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( wxS( "DrawFrame" ) )
|
||||
.Center() );
|
||||
|
||||
m_auimgr.AddPane( m_netInspectorPanel, EDA_PANE()
|
||||
.Name( NetInspectorPanelName() )
|
||||
.Bottom()
|
||||
.Caption( _( "Net Inspector" ) )
|
||||
.PaneBorder( false )
|
||||
.MinSize( FromDIP( wxSize( 240, 60 ) ) )
|
||||
.BestSize( FromDIP( wxSize( 300, 200 ) ) )
|
||||
.FloatingSize( wxSize( 300, 200 ) )
|
||||
.CloseButton( true ) );
|
||||
m_auimgr.AddPane( m_netInspectorPanel, EDA_PANE().Name( NetInspectorPanelName() )
|
||||
.Bottom()
|
||||
.Caption( _( "Net Inspector" ) )
|
||||
.PaneBorder( false )
|
||||
.MinSize( FromDIP( wxSize( 240, 60 ) ) )
|
||||
.BestSize( FromDIP( wxSize( 300, 200 ) ) )
|
||||
.FloatingSize( wxSize( 300, 200 ) )
|
||||
.CloseButton( true ) );
|
||||
|
||||
m_auimgr.AddPane( m_searchPane, EDA_PANE().Name( SearchPaneName() )
|
||||
.Bottom()
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <eda_base_frame.h>
|
||||
|
||||
#include <widgets/ui_common.h>
|
||||
#include <wx/statline.h>
|
||||
|
||||
NET_INSPECTOR_PANEL::NET_INSPECTOR_PANEL( wxWindow* parent, EDA_BASE_FRAME* aFrame, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size, long style,
|
||||
@ -33,25 +34,27 @@ NET_INSPECTOR_PANEL::NET_INSPECTOR_PANEL( wxWindow* parent, EDA_BASE_FRAME* aFra
|
||||
m_sizerOuter->SetFlexibleDirection( wxBOTH );
|
||||
m_sizerOuter->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_searchCtrl = new wxSearchCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
||||
wxDefaultSize, 0 );
|
||||
m_searchCtrl = new wxSearchCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
#ifndef __WXMAC__
|
||||
m_searchCtrl->ShowSearchButton( true );
|
||||
#endif
|
||||
m_searchCtrl->ShowCancelButton( false );
|
||||
m_searchCtrl->SetDescriptiveText( _( "Filter" ) );
|
||||
m_sizerOuter->Add( m_searchCtrl, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
|
||||
m_sizerOuter->Add( m_searchCtrl, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ),
|
||||
wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 2 );
|
||||
|
||||
wxStaticLine* separator = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
||||
m_sizerOuter->Add( separator, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 3 );
|
||||
|
||||
m_configureBtn = new BITMAP_BUTTON( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_configureBtn->SetToolTip( _( "Configure netlist inspector" ) );
|
||||
m_configureBtn->SetBitmap( KiBitmapBundle( BITMAPS::options_generic_16 ) );
|
||||
m_configureBtn->SetBitmap( KiBitmapBundle( BITMAPS::config ) );
|
||||
m_configureBtn->SetPadding( 2 );
|
||||
m_sizerOuter->Add( m_configureBtn, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), 0, 5 );
|
||||
m_sizerOuter->Add( m_configureBtn, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
|
||||
|
||||
m_netsList = new wxDataViewCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
wxDV_MULTIPLE );
|
||||
m_netsList = new wxDataViewCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_MULTIPLE );
|
||||
m_netsList->SetFont( KIUI::GetDockedPaneFont( this ) );
|
||||
m_sizerOuter->Add( m_netsList, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
|
||||
m_sizerOuter->Add( m_netsList, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxEXPAND, 5 );
|
||||
|
||||
m_sizerOuter->AddGrowableCol( 0 );
|
||||
m_sizerOuter->AddGrowableRow( 1 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user