status_popup: Allow VECTOR2I input
Convenience overload for VECTOR2I input to the popup placement. Also adjust the default foreground color to use system coloring
This commit is contained in:
parent
5f4530493a
commit
9ef3997e1e
|
@ -73,6 +73,12 @@ void STATUS_POPUP::Popup( wxWindow* )
|
|||
}
|
||||
|
||||
|
||||
void STATUS_POPUP::Move( const VECTOR2I& aWhere )
|
||||
{
|
||||
SetPosition( wxPoint( aWhere.x, aWhere.y ) );
|
||||
}
|
||||
|
||||
|
||||
void STATUS_POPUP::Move( const wxPoint& aWhere )
|
||||
{
|
||||
SetPosition( aWhere );
|
||||
|
@ -102,6 +108,7 @@ STATUS_TEXT_POPUP::STATUS_TEXT_POPUP( EDA_DRAW_FRAME* aParent ) :
|
|||
STATUS_POPUP( aParent )
|
||||
{
|
||||
m_panel->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNSHADOW ) );
|
||||
m_panel->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNTEXT ) );
|
||||
|
||||
m_statusLine = new wxStaticText( m_panel, wxID_ANY, wxEmptyString ) ;
|
||||
m_topSizer->Add( m_statusLine, 1, wxALL | wxEXPAND, 5 );
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
|
||||
#include <common.h>
|
||||
#include <math/vector2d.h>
|
||||
#include <wx/popupwin.h>
|
||||
|
||||
class EDA_DRAW_FRAME;
|
||||
|
@ -46,6 +47,7 @@ public:
|
|||
|
||||
virtual void Popup( wxWindow* aFocus = nullptr );
|
||||
virtual void Move( const wxPoint &aWhere );
|
||||
virtual void Move( const VECTOR2I& aWhere );
|
||||
|
||||
/**
|
||||
* Hides the popup after a specified time.
|
||||
|
|
Loading…
Reference in New Issue