[vlc-devel] [PATCH] Fixed bugs for https://trac.videolan.org/vlc/ticket/14948. And now there is no alignment and rescale issue on this toolbar's barItem, they align with baseline perfectly both on portrait and landscape, iPhone and iPad.

zzdjk6 zzdjk6 at gmail.com
Wed Jul 8 21:07:39 CEST 2015


---
 Sources/VLCPlaylistViewController.m | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/Sources/VLCPlaylistViewController.m b/Sources/VLCPlaylistViewController.m
index 3b1b572..a2afca2 100644
--- a/Sources/VLCPlaylistViewController.m
+++ b/Sources/VLCPlaylistViewController.m
@@ -164,11 +164,8 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
     UIBarButtonItem *createFolderItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemOrganize target:self action:@selector(createFolder)];
 
     // Better visual alignment with the action button
-    UIEdgeInsets insets = UIEdgeInsetsMake(4, 0, 0, 0);
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
-        insets.top += 1;
-    }
-    createFolderItem.imageInsets = insets;
+    createFolderItem.imageInsets = UIEdgeInsetsMake(4, 0, -4, 0);
+    createFolderItem.landscapeImagePhoneInsets = UIEdgeInsetsMake(3, 0, -3, 0);
 
     _actionBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(actOnSelection:)];
     _actionBarButtonItem.enabled = NO;
-- 
2.3.2 (Apple Git-55)




More information about the vlc-devel mailing list