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:
parent
f672a71ab4
commit
97094e852c
@ -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()
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user