1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-07 23:51:14 +02:00

Defaulting label font size to be system preferred

This commit is contained in:
Vitaly Sverchinsky 2021-07-21 18:29:10 +03:00
parent f672a71ab4
commit 97094e852c
2 changed files with 8 additions and 4 deletions

View File

@ -236,8 +236,13 @@ wxFont LabelTrackView::GetFont(const wxString &faceName, int size)
encoding = wxFONTENCODING_DEFAULT;
else
encoding = wxFONTENCODING_SYSTEM;
return wxFont(size, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
wxFONTWEIGHT_NORMAL, false, faceName, encoding);
auto fontInfo = size == 0 ? wxFontInfo() : wxFontInfo(size);
fontInfo
.Encoding(encoding)
.FaceName(faceName);
return wxFont(fontInfo);
}
void LabelTrackView::ResetFont()

View File

@ -44,8 +44,7 @@ class AUDACITY_DLL_API LabelTrackView final : public CommonTrackView
void Reparent( const std::shared_ptr<Track> &parent ) override;
public:
enum : int { DefaultFontSize = 12 };
enum : int { DefaultFontSize = 0 }; //system preferred
explicit
LabelTrackView( const std::shared_ptr<Track> &pTrack );
~LabelTrackView() override;