mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-11 22:27:42 +02:00
Bug 646: Small gap now between icon and text.
This commit is contained in:
parent
1706aaca69
commit
8ebe966a8b
@ -121,6 +121,7 @@ class PluginRegistrationDialog:public wxDialog {
|
|||||||
void OnApply(wxCommandEvent & event);
|
void OnApply(wxCommandEvent & event);
|
||||||
void OnCancel(wxCommandEvent & event);
|
void OnCancel(wxCommandEvent & event);
|
||||||
void OnToggleState( wxListEvent & event );
|
void OnToggleState( wxListEvent & event );
|
||||||
|
void SetBoldOrRegular( int i );
|
||||||
|
|
||||||
wxButton *mOK;
|
wxButton *mOK;
|
||||||
wxButton *mCancel;
|
wxButton *mCancel;
|
||||||
@ -211,7 +212,8 @@ void PluginRegistrationDialog::PopulateOrExchange(ShuttleGui &S)
|
|||||||
wxSize siz;
|
wxSize siz;
|
||||||
for (int i = 0; i < (int)mFiles.GetCount(); i++) {
|
for (int i = 0; i < (int)mFiles.GetCount(); i++) {
|
||||||
miState.Add( SHOW_CHECKED ); // 1 is selected.
|
miState.Add( SHOW_CHECKED ); // 1 is selected.
|
||||||
mPlugins->InsertItem(i, mFiles[i], SHOW_CHECKED);
|
mPlugins->InsertItem(i, wxString(wxT(" ")) + mFiles[i], SHOW_CHECKED);
|
||||||
|
// SetBoldOrRegular( i );
|
||||||
siz = dc.GetTextExtent( mFiles[i] );
|
siz = dc.GetTextExtent( mFiles[i] );
|
||||||
if( siz.GetWidth() > iLen )
|
if( siz.GetWidth() > iLen )
|
||||||
iLen = siz.GetWidth();
|
iLen = siz.GetWidth();
|
||||||
@ -226,12 +228,20 @@ void PluginRegistrationDialog::PopulateOrExchange(ShuttleGui &S)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PluginRegistrationDialog::SetBoldOrRegular( int i )
|
||||||
|
{
|
||||||
|
wxFont Font = mPlugins->GetItemFont( i );
|
||||||
|
Font.SetWeight( (miState[i]==SHOW_CHECKED)? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL );
|
||||||
|
mPlugins->SetItemFont( i, Font );
|
||||||
|
}
|
||||||
|
|
||||||
void PluginRegistrationDialog::OnToggleState(wxListEvent & event)
|
void PluginRegistrationDialog::OnToggleState(wxListEvent & event)
|
||||||
{
|
{
|
||||||
int i = event.GetIndex();
|
int i = event.GetIndex();
|
||||||
miState[ i ] = (miState[ i ]==SHOW_CHECKED) ? SHOW_UNCHECKED : SHOW_CHECKED; // Toggle it.
|
miState[ i ] = (miState[ i ]==SHOW_CHECKED) ? SHOW_UNCHECKED : SHOW_CHECKED; // Toggle it.
|
||||||
mPlugins->SetItemState( i, 0 ,wxLIST_STATE_SELECTED);
|
mPlugins->SetItemState( i, 0 ,wxLIST_STATE_SELECTED);
|
||||||
mPlugins->SetItemImage( i, miState[i] );
|
mPlugins->SetItemImage( i, miState[i] );
|
||||||
|
// SetBoldOrRegular( i );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PluginRegistrationDialog::OnApply(wxCommandEvent & event)
|
void PluginRegistrationDialog::OnApply(wxCommandEvent & event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user