Don't use deprecated wxBOLD, wxNORMAL and similar constants.
Replace them with wxFONTWEIGHT_BOLD, wxFONTSTYLE_NORMAL or wxFONTWEIGHT_NORMAL and equivalents in the code of the library itself and in the samples. Also simplify font construction using wxFontInfo where possible to avoid specifying these constants at all if they are not needed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7696081c90
commit
d66e7af9aa
21 changed files with 192 additions and 198 deletions
|
|
@ -145,7 +145,7 @@ Edit::Edit (wxWindow *parent, wxWindowID id,
|
|||
SetReadOnly (g_CommonPrefs.readOnlyInitial);
|
||||
SetWrapMode (g_CommonPrefs.wrapModeInitial?
|
||||
wxSTC_WRAP_WORD: wxSTC_WRAP_NONE);
|
||||
wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL);
|
||||
wxFont font(wxFontInfo(10).Family(wxFONTFAMILY_MODERN));
|
||||
StyleSetFont (wxSTC_STYLE_DEFAULT, font);
|
||||
StyleSetForeground (wxSTC_STYLE_DEFAULT, *wxBLACK);
|
||||
StyleSetBackground (wxSTC_STYLE_DEFAULT, *wxWHITE);
|
||||
|
|
@ -529,7 +529,7 @@ bool Edit::InitializePrefs (const wxString &name) {
|
|||
// default fonts for all styles!
|
||||
int Nr;
|
||||
for (Nr = 0; Nr < wxSTC_STYLE_LASTPREDEFINED; Nr++) {
|
||||
wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL);
|
||||
wxFont font(wxFontInfo(10).Family(wxFONTFAMILY_MODERN));
|
||||
StyleSetFont (Nr, font);
|
||||
}
|
||||
|
||||
|
|
@ -543,8 +543,9 @@ bool Edit::InitializePrefs (const wxString &name) {
|
|||
for (Nr = 0; Nr < STYLE_TYPES_COUNT; Nr++) {
|
||||
if (curInfo->styles[Nr].type == -1) continue;
|
||||
const StyleInfo &curType = g_StylePrefs [curInfo->styles[Nr].type];
|
||||
wxFont font (curType.fontsize, wxMODERN, wxNORMAL, wxNORMAL, false,
|
||||
curType.fontname);
|
||||
wxFont font(wxFontInfo(curType.fontsize)
|
||||
.Family(wxFONTFAMILY_MODERN)
|
||||
.FaceName(curType.fontname));
|
||||
StyleSetFont (Nr, font);
|
||||
if (curType.foreground) {
|
||||
StyleSetForeground (Nr, wxColour (curType.foreground));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue