mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-16 09:31:14 +01:00
Defaulting label font size to be system preferred
(cherry picked from audacity commit 97094e852c)
Signed-off-by: akleja <storspov@gmail.com>
This commit is contained in:
committed by
akleja
parent
eb774a449c
commit
89fa2cb996
@@ -236,8 +236,13 @@ wxFont LabelTrackView::GetFont(const wxString &faceName, int size)
|
|||||||
encoding = wxFONTENCODING_DEFAULT;
|
encoding = wxFONTENCODING_DEFAULT;
|
||||||
else
|
else
|
||||||
encoding = wxFONTENCODING_SYSTEM;
|
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()
|
void LabelTrackView::ResetFont()
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ class TENACITY_DLL_API LabelTrackView final : public CommonTrackView
|
|||||||
void Reparent( const std::shared_ptr<Track> &parent ) override;
|
void Reparent( const std::shared_ptr<Track> &parent ) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum : int { DefaultFontSize = 12 };
|
enum : int { DefaultFontSize = 0 }; //system preferred
|
||||||
|
|
||||||
explicit
|
explicit
|
||||||
LabelTrackView( const std::shared_ptr<Track> &pTrack );
|
LabelTrackView( const std::shared_ptr<Track> &pTrack );
|
||||||
~LabelTrackView() override;
|
~LabelTrackView() override;
|
||||||
|
|||||||
Reference in New Issue
Block a user