Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
164c1070
Commit
164c1070
authored
Aug 18, 2013
by
Felix Paul Kühne
Browse files
patches/GHSidebarNav: improve rendering overly long menu item names
parent
d31f31bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
patches/ghsidebarnav/0003-GHMenuCell-improve-rendering-of-overly-long-menu-ite.patch
0 → 100644
View file @
164c1070
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)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment