Fixed: CPButton's now set their font using [self font] (#2943)

The corresponding adaptation in CPControl was missing in the previous PR
This commit is contained in:
Didier Korthoudt
2020-10-09 13:05:51 +02:00
committed by GitHub
parent 5f6df95e30
commit d9e8321d9e
+2 -1
View File
@@ -917,7 +917,7 @@ var CPControlBlackColor = [CPColor blackColor];
*/
- (CPFont)font
{
return [self valueForThemeAttribute:@"font"];
return [self currentValueForThemeAttribute:@"font"] || [CPFont systemFontForControlSize:_controlSize];
}
/*!
@@ -1127,6 +1127,7 @@ var CPControlActionKey = @"CPControlActionKey",
[self setControlSize:[aCoder decodeIntForKey:CPControlControlSizeKey]];
[self setBaseWritingDirection:[aCoder decodeIntForKey:CPControlBaseWrittingDirectionKey]];
[self updateTrackingAreas];
}
return self;