Skip to content

Commit cf9875b

Browse files
authored
Merge pull request #8 from ChristianBecker/cb/alignment_fix_2.0
Fix the alignment of the excuses, again
2 parents 97680f1 + ee44309 commit cf9875b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

DeveloperExcuses/DeveloperExcusesView.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ class DeveloperExcusesView: ScreenSaverView {
5757
super.draw(rect)
5858

5959
var newFrame = label.frame
60-
let height = (label.stringValue as NSString).size(withAttributes: [NSFontAttributeName: label.font!]).height
61-
newFrame.size.height = height;
62-
newFrame.origin.y = rect.size.height / 2;
63-
label.frame = newFrame;
60+
newFrame.origin.x = 0
61+
newFrame.origin.y = rect.size.height / 2
62+
newFrame.size.width = rect.size.width
63+
newFrame.size.height = (label.stringValue as NSString).size(withAttributes: [NSFontAttributeName: label.font!]).height
64+
label.frame = newFrame
6465

6566
NSColor.black.setFill()
6667
NSRectFill(rect)

0 commit comments

Comments
 (0)