Formatting.
This commit is contained in:
parent
27813e443a
commit
672b27f91a
|
@ -116,14 +116,14 @@ wxFlexGridSizer* DIALOG_ABOUT::createFlexGridSizer()
|
||||||
void DIALOG_ABOUT::createNotebooks()
|
void DIALOG_ABOUT::createNotebooks()
|
||||||
{
|
{
|
||||||
createNotebookHtmlPage( m_notebook, _( "About" ), IMAGES::INFORMATION,
|
createNotebookHtmlPage( m_notebook, _( "About" ), IMAGES::INFORMATION,
|
||||||
m_info.GetDescription() );
|
m_info.GetDescription() );
|
||||||
|
|
||||||
wxString version = GetVersionInfoData( m_titleName, true );
|
wxString version = GetVersionInfoData( m_titleName, true );
|
||||||
|
|
||||||
createNotebookHtmlPage( m_notebook, _( "Version" ), IMAGES::VERSION, version, true );
|
createNotebookHtmlPage( m_notebook, _( "Version" ), IMAGES::VERSION, version, true );
|
||||||
|
|
||||||
createNotebookPageByCategory( m_notebook, _( "Developers" ) , IMAGES::DEVELOPERS,
|
createNotebookPageByCategory( m_notebook, _( "Developers" ) , IMAGES::DEVELOPERS,
|
||||||
m_info.GetDevelopers() );
|
m_info.GetDevelopers() );
|
||||||
createNotebookPage( m_notebook, _( "Doc Writers" ), IMAGES::DOCWRITERS,
|
createNotebookPage( m_notebook, _( "Doc Writers" ), IMAGES::DOCWRITERS,
|
||||||
m_info.GetDocWriters() );
|
m_info.GetDocWriters() );
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ void DIALOG_ABOUT::createNotebookPageByCategory( wxNotebook* aParent, const wxSt
|
||||||
if( sub_contributor->GetExtra() != wxEmptyString )
|
if( sub_contributor->GetExtra() != wxEmptyString )
|
||||||
{
|
{
|
||||||
wxStaticText* mail = wxStaticTextRef( m_scrolledWindow1,
|
wxStaticText* mail = wxStaticTextRef( m_scrolledWindow1,
|
||||||
sub_contributor->GetExtra() );
|
sub_contributor->GetExtra() );
|
||||||
fgSizer1->Add( mail, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
|
fgSizer1->Add( mail, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -360,8 +360,7 @@ void DIALOG_ABOUT::createNotebookPageByCategory( wxNotebook* aParent, const wxSt
|
||||||
// Email address of contributor at third column
|
// Email address of contributor at third column
|
||||||
if ( contributor->GetExtra() != wxEmptyString )
|
if ( contributor->GetExtra() != wxEmptyString )
|
||||||
{
|
{
|
||||||
wxStaticText* mail = wxStaticTextRef( m_scrolledWindow1,
|
wxStaticText* mail = wxStaticTextRef( m_scrolledWindow1, contributor->GetExtra() );
|
||||||
contributor->GetExtra() );
|
|
||||||
fgSizer1->Add( mail, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
|
fgSizer1->Add( mail, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -395,7 +394,8 @@ void DIALOG_ABOUT::createNotebookHtmlPage( wxNotebook* aParent, const wxString&
|
||||||
int flags = aSelection ? wxHW_SCROLLBAR_AUTO : ( wxHW_SCROLLBAR_AUTO | wxHW_NO_SELECTION );
|
int flags = aSelection ? wxHW_SCROLLBAR_AUTO : ( wxHW_SCROLLBAR_AUTO | wxHW_NO_SELECTION );
|
||||||
|
|
||||||
// the HTML page is going to be created with previously created HTML content
|
// the HTML page is going to be created with previously created HTML content
|
||||||
auto htmlWindow = new HTML_WINDOW( panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, flags );
|
HTML_WINDOW* htmlWindow = new HTML_WINDOW( panel, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||||
|
flags );
|
||||||
|
|
||||||
// HTML font set to font properties as they are used for widgets to have an unique look
|
// HTML font set to font properties as they are used for widgets to have an unique look
|
||||||
// under different platforms with HTML
|
// under different platforms with HTML
|
||||||
|
@ -431,13 +431,9 @@ wxStaticBitmap* DIALOG_ABOUT::createStaticBitmap( wxScrolledWindow* aParent, wxB
|
||||||
wxDefaultPosition, wxDefaultSize, 0 );
|
wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
if( aIcon )
|
if( aIcon )
|
||||||
{
|
|
||||||
bitmap->SetBitmap( *aIcon );
|
bitmap->SetBitmap( *aIcon );
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
bitmap->SetBitmap( KiBitmap( BITMAPS::right ) );
|
bitmap->SetBitmap( KiBitmap( BITMAPS::right ) );
|
||||||
}
|
|
||||||
|
|
||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,7 +208,8 @@ void DIALOG_COLOR_PICKER::initDefinedColors( CUSTOM_COLORS_LIST* aPredefinedColo
|
||||||
for( int jj = 0; jj < NBCOLORS; ++jj, grid_col++ )
|
for( int jj = 0; jj < NBCOLORS; ++jj, grid_col++ )
|
||||||
{
|
{
|
||||||
if( grid_col * table_row_count >= NBCOLORS )
|
if( grid_col * table_row_count >= NBCOLORS )
|
||||||
{ // the current grid row is filled, and we must fill the next grid row
|
{
|
||||||
|
// the current grid row is filled, and we must fill the next grid row
|
||||||
grid_col = 0;
|
grid_col = 0;
|
||||||
grid_row++;
|
grid_row++;
|
||||||
}
|
}
|
||||||
|
@ -617,10 +618,12 @@ void DIALOG_COLOR_PICKER::onRGBMouseDrag( wxMouseEvent& event )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_selectedCursor != &m_cursorBitmapRed &&
|
if( m_selectedCursor != &m_cursorBitmapRed
|
||||||
m_selectedCursor != &m_cursorBitmapGreen &&
|
&& m_selectedCursor != &m_cursorBitmapGreen
|
||||||
m_selectedCursor != &m_cursorBitmapBlue )
|
&& m_selectedCursor != &m_cursorBitmapBlue )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Adjust the HSV cursor position to follow the mouse cursor
|
// Adjust the HSV cursor position to follow the mouse cursor
|
||||||
// The cursor position is relative to the m_bitmapHSV wxBitmap center
|
// The cursor position is relative to the m_bitmapHSV wxBitmap center
|
||||||
|
@ -711,8 +714,10 @@ bool DIALOG_COLOR_PICKER::setHSvaluesFromCursor( const wxPoint& aMouseCursor )
|
||||||
double dist_from_centre = hypot( (double)mousePos.x, (double)mousePos.y );
|
double dist_from_centre = hypot( (double)mousePos.x, (double)mousePos.y );
|
||||||
|
|
||||||
if( dist_from_centre > half_size )
|
if( dist_from_centre > half_size )
|
||||||
|
{
|
||||||
// Saturation cannot be calculated:
|
// Saturation cannot be calculated:
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
m_cursorBitmapHSV = mousePos;
|
m_cursorBitmapHSV = mousePos;
|
||||||
|
|
||||||
|
|
|
@ -33,16 +33,15 @@
|
||||||
DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS( EDA_BASE_FRAME* aParent, TOOL_MANAGER* aToolMgr ):
|
DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS( EDA_BASE_FRAME* aParent, TOOL_MANAGER* aToolMgr ):
|
||||||
DIALOG_SHIM( aParent, wxID_ANY, _( "Hotkey List" ) )
|
DIALOG_SHIM( aParent, wxID_ANY, _( "Hotkey List" ) )
|
||||||
{
|
{
|
||||||
const auto margin = KIUI::GetStdMargin();
|
const int margin = KIUI::GetStdMargin();
|
||||||
|
wxBoxSizer* main_sizer = new wxBoxSizer( wxVERTICAL );
|
||||||
auto main_sizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
m_hk_list = new PANEL_HOTKEYS_EDITOR( aParent, this, true );
|
m_hk_list = new PANEL_HOTKEYS_EDITOR( aParent, this, true );
|
||||||
m_hk_list->AddHotKeys( aToolMgr );
|
m_hk_list->AddHotKeys( aToolMgr );
|
||||||
|
|
||||||
main_sizer->Add( m_hk_list, 1, wxTOP | wxLEFT | wxRIGHT | wxEXPAND, margin );
|
main_sizer->Add( m_hk_list, 1, wxTOP | wxLEFT | wxRIGHT | wxEXPAND, margin );
|
||||||
|
|
||||||
auto sdb_sizer = new wxStdDialogButtonSizer;
|
wxStdDialogButtonSizer* sdb_sizer = new wxStdDialogButtonSizer;
|
||||||
sdb_sizer->AddButton( new wxButton( this, wxID_OK ) );
|
sdb_sizer->AddButton( new wxButton( this, wxID_OK ) );
|
||||||
sdb_sizer->Realize();
|
sdb_sizer->Realize();
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,9 @@ bool DIALOG_IMAGE_EDITOR::CheckValues()
|
||||||
if( !IsOK( this, wxString::Format( _( "This scale results in an image which is very large "
|
if( !IsOK( this, wxString::Format( _( "This scale results in an image which is very large "
|
||||||
"(%.1f mm or %.2f in). Are you sure?" ),
|
"(%.1f mm or %.2f in). Are you sure?" ),
|
||||||
25.4 / 300 * size_max, size_max /300.0 ) ) )
|
25.4 / 300 * size_max, size_max /300.0 ) ) )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -39,15 +39,14 @@ bool HTML_WINDOW::SetPage( const wxString& aSource )
|
||||||
{
|
{
|
||||||
m_pageSource = aSource;
|
m_pageSource = aSource;
|
||||||
|
|
||||||
wxString fgColor =
|
wxColour fgColor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
|
||||||
wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ).GetAsString( wxC2S_HTML_SYNTAX );
|
wxColour bgColor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
|
||||||
wxString bgColor =
|
wxColour linkColor = wxSystemSettings::GetColour( wxSYS_COLOUR_HOTLIGHT );
|
||||||
wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ).GetAsString( wxC2S_HTML_SYNTAX );
|
|
||||||
wxString linkColor =
|
|
||||||
wxSystemSettings::GetColour( wxSYS_COLOUR_HOTLIGHT ).GetAsString( wxC2S_HTML_SYNTAX );
|
|
||||||
|
|
||||||
wxString html = wxString::Format( wxT( "<html>\n<body text='%s' bgcolor='%s' link='%s'>\n" ),
|
wxString html = wxString::Format( wxT( "<html>\n<body text='%s' bgcolor='%s' link='%s'>\n" ),
|
||||||
fgColor, bgColor, linkColor );
|
fgColor.GetAsString( wxC2S_HTML_SYNTAX ),
|
||||||
|
bgColor.GetAsString( wxC2S_HTML_SYNTAX ),
|
||||||
|
linkColor.GetAsString( wxC2S_HTML_SYNTAX ) );
|
||||||
html.Append( aSource );
|
html.Append( aSource );
|
||||||
html.Append( wxT( "\n</body>\n</html>" ) );
|
html.Append( wxT( "\n</body>\n</html>" ) );
|
||||||
|
|
||||||
|
|
|
@ -98,9 +98,9 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, LIB_TABLE* aLibTable,
|
||||||
{
|
{
|
||||||
wxPoint html_size = ConvertDialogToPixels( wxPoint( 80, 80 ) );
|
wxPoint html_size = ConvertDialogToPixels( wxPoint( 80, 80 ) );
|
||||||
|
|
||||||
m_details_ctrl =
|
m_details_ctrl = new HTML_WINDOW( this, wxID_ANY, wxDefaultPosition,
|
||||||
new HTML_WINDOW( this, wxID_ANY, wxDefaultPosition,
|
wxSize( html_size.x, html_size.y ),
|
||||||
wxSize( html_size.x, html_size.y ), wxHW_SCROLLBAR_AUTO );
|
wxHW_SCROLLBAR_AUTO );
|
||||||
|
|
||||||
sizer->Add( m_details_ctrl, 2, wxTOP | wxEXPAND, 5 );
|
sizer->Add( m_details_ctrl, 2, wxTOP | wxEXPAND, 5 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue