Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 102

Hmmm
buzztouch Evangelist
Profile
Posts: 67
Reg: Sep 17, 2013
location unknow...
6,670
11/14/15 10:45 AM (9 years ago)

Menu Image Advanced Header Image Alignment

On an iPad in landscape mode, the header image aligns right and the menu items align left. It stretches the image on android in landscape mode. Is there a code modification, or patch to solve this for iOS and Android? Thanks.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
11/15/15 02:49 PM (9 years ago)
It's trickier than you would think to get a header image to look great on all the dofferent devices and portrait and landscape. I have a menu plugin in the market and to get the headers to work, my menu uses different files for portrait and landscape and avoids stretching distortion by fixing the width to the device, without tweaking the image height. However it is a buttons menu, so maybe not the layout you are looking for.
 
peterj
Apple Fan
Profile
Posts: 113
Reg: Jun 19, 2011
location unknow...
6,630
like
01/26/16 01:19 PM (8 years ago)
I observed a similar behavior. I'm not sure if it's the same thing as what your are experiencing Hmmm, but I was able to get the behavior I wanted on iOS by making a change to WB_screen_menuImage.m. Look for the comment "Get the height and width, and if we are in landscape, swap width / height values" Delete or comment out the following 3 lines: if(UIInterfaceOrientationIsLandscape(self.interfaceOrientation)){ self.deviceWidth=self.deviceHeight; }
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.