Skip to content

Commit

Permalink
Merge pull request #8 from ChristianBecker/cb/alignment_fix_2.0
Browse files Browse the repository at this point in the history
Fix the alignment of the excuses, again
  • Loading branch information
kimar authored Jun 8, 2017
2 parents 97680f1 + ee44309 commit cf9875b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions DeveloperExcuses/DeveloperExcusesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ class DeveloperExcusesView: ScreenSaverView {
super.draw(rect)

var newFrame = label.frame
let height = (label.stringValue as NSString).size(withAttributes: [NSFontAttributeName: label.font!]).height
newFrame.size.height = height;
newFrame.origin.y = rect.size.height / 2;
label.frame = newFrame;
newFrame.origin.x = 0
newFrame.origin.y = rect.size.height / 2
newFrame.size.width = rect.size.width
newFrame.size.height = (label.stringValue as NSString).size(withAttributes: [NSFontAttributeName: label.font!]).height
label.frame = newFrame

NSColor.black.setFill()
NSRectFill(rect)
Expand Down

0 comments on commit cf9875b

Please sign in to comment.