×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2010
    Location
    Austria
    Posts
    9

    Question partial area has white background on 5800XM

    Hi,

    i'm working on an application, which only supports the portrait mode.
    all works fine, when i start it out of the portrait mode.

    but when the system is in the landscape mode, and i start the app then the bottom part of the full screen window has a withe background color instead of black.

    Started out of portrait mode:

    everything is fine.

    But started out of landscape mode:

    I had to use a photo camera to make a screenshot because ScreenSnap doesn't show this effect in the screenshots...

    now i did a workaround by redefining the applications QPalette
    Code:
    MainWindow::MainWindow()
    {
    	...
    #ifdef Q_OS_SYMBIAN
    
    	// Workaround to Bug#02:
    	// overrides the system color sheme!!! (TODO: find another solution)
    	QPalette pal;
    	pal.setColor(QPalette::Window, Qt::black);
    	pal.setColor(QPalette::WindowText, Qt::white);
    	QApplication::setPalette(pal);
    
    	showFullScreen();
    	...
    #else

    the main function has this code to lock to portrait mode:
    Code:
    #include <QApplication>
    #include "mainwindow.h"
    
    // found this code for screen-orientation on:
    // http://thpmaemo.blogspot.com/2010/10/qt-write-once-ifdef-everywhere.html
    // added this code on 26th of Oct. 2010
    #ifdef Q_OS_SYMBIAN
    #include <AknAppUi.h>
    #endif
    
    int main(int argc, char *argv[])
    {
        QApplication app(argc, argv);
    
    #ifdef Q_OS_SYMBIAN
    	CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
    	TRAPD(error,
    	if (appUi) {
    		appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
    	}
    	);
    #endif
    
    	MainWindow window;
    	//window.show();
        return app.exec();
    }
    my workaround is fine, but it overrides the systems default color sheme. and that's not a nice way!
    has anybody had this bug or a better idea for a workaround?

    kind regards,
    Karl Zeilhofer

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: partial area has white background on 5800XM

    Are you drawing part of your UI transparent with bits of the system background showing through?

    Any particular good reason for doing so, particularly at the bottom there?

    Is it a graphics view based app? If so the border around the edge is because the graphics view has a transparent frame by default with the S60 style, you can set the frame style to NoFrame to fix that part (and you get more area to draw on!).

  3. #3
    Registered User
    Join Date
    Mar 2010
    Location
    Austria
    Posts
    9

    Re: partial area has white background on 5800XM

    please note, that this issue is dependent of the orientation BEFORE starting the application.
    If the orientation was already in portrait mode, it behaves like expected.

    i don't set anything of the ui to transperent. and also it is not the system, that is shining throug, it's just white!
    The app is not graphics view bases. it's a simple widget.

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: partial area has white background on 5800XM

    Yes, I think it's transparency in the default palette on Symbian. Basically the system background should show through in some circumstances but when the orientation was different beforehand the cached system background has the wrong orientation or something like that.

    The workaround you've got is probably the best one for now. It's a bug in Qt in any case, you should raise it in their JIRA instance.

    If you want you could experiment with setting the WA_OpaquePaintEvent & WA_NoSystemBackground attributes on your widgets. You might get more white.

    It almost certainly doesn't have to be Graphics View based for the other issue I mentioned - any class that inherits from QFrame probably gets that transparent border I guess.

  5. #5
    Registered User
    Join Date
    Mar 2010
    Location
    Austria
    Posts
    9

    Re: partial area has white background on 5800XM

    thank you for your answer!
    I posted this bug to
    http://bugreports.qt.nokia.com/browse/QTBUG-17311

    do you have any idea about my second problem?
    http://discussion.forum.nokia.com/fo...oes-not-update
    i really don't find any solution

    thanks in advance
    Last edited by griffin27; 2011-02-10 at 17:04.

Similar Threads

  1. White area on alert (any type), using new firmware in E51 and E90
    By arifnpm in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2008-07-21, 19:17
  2. CEikEdwin , Outline not visible on White Background..
    By gmsk19 in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-01-30, 05:51
  3. White background on icons in Theme Studio 1.2.1
    By nsquared in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2006-02-24, 20:37

Posting Permissions

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