×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    36

    PageStackWindow values for width and height don't change despite orientation on N9

    I was just testing my QML app on the N9 and I just discovered that the PageStackWindow always returns 854 for the width, and 480 for the height, even when the phone is in portrait mode. I checked this using the onWidthChanged and onHeightChanged events.

    Is this a bug? If not, how can I retrieve the width and the height of the screen in its current orientation.

    Thanks.

  2. #2
    Registered User
    Join Date
    Aug 2011
    Posts
    32

    Re: PageStackWindow values for width and height don't change despite orientation on N

    It's correct, the width and height of a PageStack is always 854 and 480, because it's not the Application window rotating, but the pagestack content!

    Check Screen element to get more info.

    Just for an example, if you need to get size for a full screen image, use this:
    Code:
    width: screen.orientationString === "Portrait" ? screen.displayHeight : screen.displayWidth
    height: screen.orientationString === "Portrait" ? screen.displayWidth : screen.displayHeight

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    36

    Re: PageStackWindow values for width and height don't change despite orientation on N

    Screen works great. Thanks for the tip.

Similar Threads

  1. Replies: 1
    Last Post: 2011-02-28, 09:03
  2. Dynamically change the width/height of text editor
    By jainygaurav in forum Symbian
    Replies: 3
    Last Post: 2006-09-27, 11:36
  3. how to get the width and height of a jpg or bmp
    By faqffq in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-12-15, 10:49
  4. JSR-226 Height and Width
    By ThatIsEnough in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2005-08-23, 12:06
  5. Replies: 1
    Last Post: 2004-11-22, 18:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×