Skip to content

Commit

Permalink
qiosmenu: Move "Done" button to the right
Browse files Browse the repository at this point in the history
The "Done" action is traditionally on the right.

Change-Id: I2497b878b552a9bcf69827a0ab85f1931067a023
Reviewed-by: Tor Arne Vestbø <[email protected]>
  • Loading branch information
kbroulik committed Feb 25, 2015
1 parent 1cf99d7 commit 8b0b240
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/platforms/ios/qiosmenu.mm
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ - (id)initWithVisibleMenuItems:(const QIOSMenuItemList &)visibleMenuItems select
self.toolbar = [[[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 100, 44)] autorelease];
self.toolbar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

UIBarButtonItem *doneButton = [[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self action:@selector(closeMenu)] autorelease];
UIBarButtonItem *spaceButton = [[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:self action:@selector(closeMenu)] autorelease];
UIBarButtonItem *cancelButton = [[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self action:@selector(cancelMenu)] autorelease];
[self.toolbar setItems:[NSArray arrayWithObjects:doneButton, spaceButton, cancelButton, nil]];
UIBarButtonItem *doneButton = [[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self action:@selector(closeMenu)] autorelease];
[self.toolbar setItems:[NSArray arrayWithObjects:cancelButton, spaceButton, doneButton, nil]];

[self setDelegate:self];
[self setDataSource:self];
Expand Down

0 comments on commit 8b0b240

Please sign in to comment.