Fix MTLabel creation.

This commit is contained in:
Michael Griebling
2023-01-16 09:08:12 -05:00
parent 3df7146c8c
commit ce4df65d44

View File

@@ -171,6 +171,7 @@ public class MTMathUILabel : MTView {
} }
func initCommon() { func initCommon() {
errorLabel = MTLabel()
#if os(macOS) #if os(macOS)
self.layer?.isGeometryFlipped = true self.layer?.isGeometryFlipped = true
errorLabel?.layer?.isGeometryFlipped = true errorLabel?.layer?.isGeometryFlipped = true
@@ -179,7 +180,6 @@ public class MTMathUILabel : MTView {
errorLabel?.layer.isGeometryFlipped = true errorLabel?.layer.isGeometryFlipped = true
#endif #endif
self.backgroundColor = MTColor.clear self.backgroundColor = MTColor.clear
errorLabel = MTLabel()
errorLabel?.isHidden = true errorLabel?.isHidden = true
errorLabel?.textColor = MTColor.red errorLabel?.textColor = MTColor.red
self.addSubview(errorLabel!) self.addSubview(errorLabel!)