mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 23:29:41 +02:00
Defaulting label font size to be system preferred
(cherry picked from audacity commit 97094e852c5e21b2cbce80e77473d96f0d2d8ae5) Signed-off-by: akleja <storspov@gmail.com>
This commit is contained in:
parent
eb774a449c
commit
89fa2cb996
@ -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 TENACITY_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