mirror of https://github.com/PCSX2/pcsx2.git
pcsx2|utilities: Use non-deprecated wxFont stuff
This commit is contained in:
parent
87867beb0e
commit
dda44519c1
|
@ -702,18 +702,18 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
pxWindowTextWriter& SetWeight( int weight );
|
pxWindowTextWriter& SetWeight( wxFontWeight weight );
|
||||||
pxWindowTextWriter& SetStyle( int style );
|
pxWindowTextWriter& SetStyle( wxFontStyle style );
|
||||||
pxWindowTextWriter& Normal();
|
pxWindowTextWriter& Normal();
|
||||||
|
|
||||||
pxWindowTextWriter& Bold()
|
pxWindowTextWriter& Bold()
|
||||||
{
|
{
|
||||||
return SetWeight(wxBOLD);
|
return SetWeight(wxFONTWEIGHT_BOLD);
|
||||||
}
|
}
|
||||||
|
|
||||||
pxWindowTextWriter& Italic()
|
pxWindowTextWriter& Italic()
|
||||||
{
|
{
|
||||||
return SetStyle(wxITALIC);
|
return SetStyle(wxFONTSTYLE_ITALIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
pxWindowTextWriter& SetPos( const wxPoint& pos );
|
pxWindowTextWriter& SetPos( const wxPoint& pos );
|
||||||
|
@ -801,7 +801,7 @@ extern int pxGetCharHeight( const wxWindow& wind, int rows=1 );
|
||||||
|
|
||||||
extern void pxSetToolTip( wxWindow* wind, const wxString& src );
|
extern void pxSetToolTip( wxWindow* wind, const wxString& src );
|
||||||
extern void pxSetToolTip( wxWindow& wind, const wxString& src );
|
extern void pxSetToolTip( wxWindow& wind, const wxString& src );
|
||||||
extern wxFont pxGetFixedFont( int ptsize=8, int weight=wxNORMAL );
|
extern wxFont pxGetFixedFont( int ptsize = 8, wxFontWeight weight = wxFONTWEIGHT_NORMAL );
|
||||||
|
|
||||||
extern pxDialogCreationFlags pxDialogFlags();
|
extern pxDialogCreationFlags pxDialogFlags();
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,8 @@ void pxRadioPanel::_RealizeDefaultOption()
|
||||||
if( m_IsRealized && m_DefaultIdx != -1 )
|
if( m_IsRealized && m_DefaultIdx != -1 )
|
||||||
{
|
{
|
||||||
wxFont def( GetFont() );
|
wxFont def( GetFont() );
|
||||||
def.SetWeight( wxBOLD );
|
def.SetWeight( wxFONTWEIGHT_BOLD );
|
||||||
//def.SetStyle( wxITALIC );
|
//def.SetStyle( wxFONTSTYLE_ITALIC );
|
||||||
m_objects[m_DefaultIdx].LabelObj->SetFont( def );
|
m_objects[m_DefaultIdx].LabelObj->SetFont( def );
|
||||||
m_objects[m_DefaultIdx].LabelObj->SetForegroundColour( wxColour( 20, 128, 40 ) );
|
m_objects[m_DefaultIdx].LabelObj->SetForegroundColour( wxColour( 20, 128, 40 ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ pxStaticText& pxStaticText::Align( wxAlignment align )
|
||||||
pxStaticText& pxStaticText::Bold()
|
pxStaticText& pxStaticText::Bold()
|
||||||
{
|
{
|
||||||
wxFont bold( GetFont() );
|
wxFont bold( GetFont() );
|
||||||
bold.SetWeight(wxBOLD);
|
bold.SetWeight(wxFONTWEIGHT_BOLD);
|
||||||
SetFont( bold );
|
SetFont( bold );
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ void pxWindowTextWriter::OnFontChanged()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
pxWindowTextWriter& pxWindowTextWriter::SetWeight( int weight )
|
pxWindowTextWriter& pxWindowTextWriter::SetWeight( wxFontWeight weight )
|
||||||
{
|
{
|
||||||
wxFont curfont( m_dc.GetFont() );
|
wxFont curfont( m_dc.GetFont() );
|
||||||
curfont.SetWeight( weight );
|
curfont.SetWeight( weight );
|
||||||
|
@ -42,7 +42,7 @@ pxWindowTextWriter& pxWindowTextWriter::SetWeight( int weight )
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
pxWindowTextWriter& pxWindowTextWriter::SetStyle( int style )
|
pxWindowTextWriter& pxWindowTextWriter::SetStyle( wxFontStyle style )
|
||||||
{
|
{
|
||||||
wxFont curfont( m_dc.GetFont() );
|
wxFont curfont( m_dc.GetFont() );
|
||||||
curfont.SetStyle( style );
|
curfont.SetStyle( style );
|
||||||
|
@ -53,8 +53,8 @@ pxWindowTextWriter& pxWindowTextWriter::SetStyle( int style )
|
||||||
pxWindowTextWriter& pxWindowTextWriter::Normal()
|
pxWindowTextWriter& pxWindowTextWriter::Normal()
|
||||||
{
|
{
|
||||||
wxFont curfont( m_dc.GetFont() );
|
wxFont curfont( m_dc.GetFont() );
|
||||||
curfont.SetStyle( wxNORMAL );
|
curfont.SetStyle( wxFONTWEIGHT_NORMAL );
|
||||||
curfont.SetWeight( wxNORMAL );
|
curfont.SetWeight( wxFONTSTYLE_NORMAL );
|
||||||
m_dc.SetFont( curfont );
|
m_dc.SetFont( curfont );
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
|
|
@ -593,10 +593,10 @@ void pxSetToolTip( wxWindow& wind, const wxString& src )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxFont pxGetFixedFont( int ptsize, int weight )
|
wxFont pxGetFixedFont( int ptsize, wxFontWeight weight )
|
||||||
{
|
{
|
||||||
return wxFont(
|
return wxFont(
|
||||||
ptsize, wxMODERN, wxNORMAL, weight, false
|
ptsize, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, weight, false
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
,L"Lucida Console" // better than courier new (win32 only)
|
,L"Lucida Console" // better than courier new (win32 only)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -167,10 +167,10 @@ ConsoleLogFrame::ColorArray::~ColorArray() throw()
|
||||||
void ConsoleLogFrame::ColorArray::SetFont( int fontsize )
|
void ConsoleLogFrame::ColorArray::SetFont( int fontsize )
|
||||||
{
|
{
|
||||||
const wxFont fixed( pxGetFixedFont( fontsize ) );
|
const wxFont fixed( pxGetFixedFont( fontsize ) );
|
||||||
const wxFont fixedB( pxGetFixedFont( fontsize+1, wxBOLD ) );
|
const wxFont fixedB( pxGetFixedFont( fontsize+1, wxFONTWEIGHT_BOLD ) );
|
||||||
|
|
||||||
//const wxFont fixed( fontsize, wxMODERN, wxNORMAL, wxNORMAL );
|
//const wxFont fixed( fontsize, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL );
|
||||||
//const wxFont fixedB( fontsize, wxMODERN, wxNORMAL, wxBOLD );
|
//const wxFont fixedB( fontsize, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD );
|
||||||
|
|
||||||
// Standard R, G, B format:
|
// Standard R, G, B format:
|
||||||
for (size_t i = 0; i < Color_StrongBlack; ++i)
|
for (size_t i = 0; i < Color_StrongBlack; ++i)
|
||||||
|
|
|
@ -430,7 +430,7 @@ GSFrame::GSFrame( const wxString& title)
|
||||||
|
|
||||||
wxStaticText* label = new wxStaticText( this, wxID_ANY, _("GS Output is Disabled!") );
|
wxStaticText* label = new wxStaticText( this, wxID_ANY, _("GS Output is Disabled!") );
|
||||||
m_id_OutputDisabled = label->GetId();
|
m_id_OutputDisabled = label->GetId();
|
||||||
label->SetFont( wxFont( 20, wxDEFAULT, wxNORMAL, wxBOLD ) );
|
label->SetFont( wxFont( 20, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD ) );
|
||||||
label->SetForegroundColour( *wxWHITE );
|
label->SetForegroundColour( *wxWHITE );
|
||||||
|
|
||||||
AppStatusEvent_OnSettingsApplied();
|
AppStatusEvent_OnSettingsApplied();
|
||||||
|
|
|
@ -105,7 +105,7 @@ Panels::BiosSelectorPanel::BiosSelectorPanel( wxWindow* parent )
|
||||||
_("Select folder with PS2 BIOS roms") // dir picker popup label
|
_("Select folder with PS2 BIOS roms") // dir picker popup label
|
||||||
);
|
);
|
||||||
|
|
||||||
m_ComboBox->SetFont( wxFont( m_ComboBox->GetFont().GetPointSize()+1, wxFONTFAMILY_MODERN, wxNORMAL, wxNORMAL, false, L"Lucida Console" ) );
|
m_ComboBox->SetFont( wxFont( m_ComboBox->GetFont().GetPointSize()+1, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, L"Lucida Console" ) );
|
||||||
m_ComboBox->SetMinSize( wxSize( wxDefaultCoord, std::max( m_ComboBox->GetMinSize().GetHeight(), 96 ) ) );
|
m_ComboBox->SetMinSize( wxSize( wxDefaultCoord, std::max( m_ComboBox->GetMinSize().GetHeight(), 96 ) ) );
|
||||||
|
|
||||||
//if (InstallationMode != InstallMode_Portable)
|
//if (InstallationMode != InstallMode_Portable)
|
||||||
|
|
|
@ -39,7 +39,7 @@ Panels::ThemeSelectorPanel::ThemeSelectorPanel( wxWindow* parent )
|
||||||
_("Select folder containing PCSX2 visual themes") // dir picker popup label
|
_("Select folder containing PCSX2 visual themes") // dir picker popup label
|
||||||
);
|
);
|
||||||
|
|
||||||
m_ComboBox->SetFont( wxFont( m_ComboBox->GetFont().GetPointSize()+1, wxFONTFAMILY_MODERN, wxNORMAL, wxNORMAL, false, L"Lucida Console" ) );
|
m_ComboBox->SetFont( wxFont( m_ComboBox->GetFont().GetPointSize()+1, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, L"Lucida Console" ) );
|
||||||
m_ComboBox->SetMinSize( wxSize( wxDefaultCoord, std::max( m_ComboBox->GetMinSize().GetHeight(), 96 ) ) );
|
m_ComboBox->SetMinSize( wxSize( wxDefaultCoord, std::max( m_ComboBox->GetMinSize().GetHeight(), 96 ) ) );
|
||||||
|
|
||||||
if (InstallationMode != InstallMode_Portable)
|
if (InstallationMode != InstallMode_Portable)
|
||||||
|
|
Loading…
Reference in New Issue