Commit 164c1070 authored by Felix Paul Kühne's avatar Felix Paul Kühne

patches/GHSidebarNav: improve rendering overly long menu item names

parent d31f31bf
From c851177d8f2f8a69da85daf6b59e57b28944882a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Sun, 18 Aug 2013 19:21:21 +0200
Subject: [PATCH 3/3] GHMenuCell: improve rendering of overly long menu item
names
---
Demo/GHMenuCell.m | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Demo/GHMenuCell.m b/Demo/GHMenuCell.m
index b6edf09..3111271 100644
--- a/Demo/GHMenuCell.m
+++ b/Demo/GHMenuCell.m
@@ -36,6 +36,11 @@ NSString const *kSidebarCellImageKey = @"CellImage";
self.textLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
self.textLabel.shadowColor = [UIColor colorWithWhite:0.0f alpha:0.25f];
self.textLabel.textColor = [UIColor colorWithRed:(196.0f/255.0f) green:(204.0f/255.0f) blue:(218.0f/255.0f) alpha:1.0f];
+ self.textLabel.adjustsFontSizeToFitWidth = YES;
+ if ([self.textLabel respondsToSelector:@selector(setAdjustsLetterSpacingToFitWidth:)])
+ self.textLabel.adjustsLetterSpacingToFitWidth = YES;
+ self.textLabel.minimumFontSize = 9.0f;
+ self.textLabel.lineBreakMode = UILineBreakModeTailTruncation;
UIView *topLine = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, [UIScreen mainScreen].bounds.size.height, 1.0f)];
topLine.backgroundColor = [UIColor colorWithRed:(16.0f/255.0f) green:(16.0f/255.0f) blue:(16.0f/255.0f) alpha:1.0f];
--
1.8.3.1 (Apple Git-46)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment