×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    27

    Problem with navi pane tab image mask

    Hi!

    I'm using navi tabs with images. When I use image without a mask, it is displayed correctly, with all its colours. But I want to get rid of nasty surrounding rectangle, so I apply a mask. After that the contour of image is correct (no rectangular surrounding), but its colour is all black. What could be the reason? I'm using s60 3rd fp1 and carbide.vs. The problem occurs both for emulator and real device.

    Original images are 13x13, 24 bits per pixel bitmaps. Masks are 13x13, 1 bit per pixel bitmaps. I use carbide.vs bitmap collection tool to produce mbm file with 'c12' colour depth for all images and masks (changing it to 'c8' and 'c24' did not help).

    Resource:

    RESOURCE TAB_GROUP r_main_options_tabs
    {
    tab_width = EAknTabWidthWithThreeTabs;
    active = 0;
    tabs =
    {
    TAB
    {
    id = EMainOptionsTab1;
    bmpfile = string_icon_file_name;
    bmpid = EMbmMyAppFirstTab1313;
    bmpmask = EMbmMyAppFirstTab1313_mask;
    },

    TAB
    {
    id = EMainOptionsTab2;
    bmpfile = string_icon_file_name;
    bmpid = EMbmMyAppSecondTab1313;
    bmpmask = EMbmMyAppSecondTab1313_mask;
    },

    TAB
    {
    id = EMainOptionsTab3;
    bmpfile = string_icon_file_name;
    bmpid = EMbmMyAppThirdTab1313;
    bmpmask = EMbmMyAppThirdTab1313_mask;
    }
    };
    }


    Code:

    void CStatusPaneAdjuster::AdjustNaviPaneTabModeL()
    {
    // Get status pane
    CEikStatusPane* statusPane = iAppUi->StatusPane();

    TUid naviPaneUid;
    naviPaneUid.iUid = EEikStatusPaneUidNavi;
    CEikStatusPaneBase::TPaneCapabilities subPane = statusPane->PaneCapabilities(naviPaneUid);
    if(subPane.IsPresent() && subPane.IsAppOwned())
    {
    // Get navigation pane
    CAknNavigationControlContainer* naviPane = (CAknNavigationControlContainer *) statusPane->ControlL(naviPaneUid);

    // Read the tab group resource
    TResourceReader reader;
    iCoeEnv->CreateResourceReaderLC(reader, iTabGroupId);
    // Delete old decorator own by the class, if any
    GuiHelper::SafeDelete(iNaviDecorator);

    // Set navigation pane tab group
    iNaviDecorator = naviPane->CreateTabGroupL(reader);

    // Get tab group; ownership is not transferred here
    CAknTabGroup* tabGroup = (CAknTabGroup*) iNaviDecorator->DecoratedControl();

    // Set tab observer
    tabGroup->SetObserver(iTabObserver);

    // Set active tab
    tabGroup->SetActiveTabByIndex(iActiveTab);

    // Delete reader
    CleanupStack::PopAndDestroy();

    // Push decorator
    naviPane->PushL(*iNaviDecorator);
    }
    }

    Can you see any fault?

  2. #2
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    86

    Re: Problem with navi pane tab image mask

    Hi FerdynandKiepski,

    I am also having same issue. Did you get any success with this?

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    10

    Unhappy Re: Problem with navi pane tab image mask

    Yep, me too. Any ideas on how to solve this?

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: Problem with navi pane tab image mask

    In fact I am not sure if CAknTab is really designed to be used with coloured images - until now I was believing that it does not care about the image part at all, and it uses only the mask (as it happens in the built-in applications).
    Remember that tab-colors change with the theme, so it would be hard to design colourful icons that will look great on all possible backgrounds.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: Problem with navi pane tab image mask

    In fact Jas76 has already found a clue before posting here (http://discussion.forum.nokia.com/fo...d.php?t=143760, 2 hours earlier), though he apparently has not read that carefully enough.
    http://wiki.forum.nokia.com/index.ph..._in_Avkon_tabs
    Quote Originally Posted by page
    Note: It is not possible to draw colored SVG in the TAB, as the mask is always used for generating the icon.

  6. #6
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    86

    Re: Problem with navi pane tab image mask

    Hi cbpbenitez,

    As Wizard_hu already pointed out. Its a system limitation that colour will not appear in the tab icons. Infect it is true with inbuilt applications as well (I checked on device with call logger, contacts etc).

    My problem was different that I was not giving mask. Infect I was assiging mask to bmpid field. and I was having black rectangle because of that.

  7. #7
    Registered User
    Join Date
    Aug 2008
    Posts
    10

    Smile Re: Problem with navi pane tab image mask

    Hmm.. I have noticed this limitation before too. I just couldn't find the document about it. Anyway, thanks!

Similar Threads

  1. Problem saving an image using FileConnection
    By pmgf_14 in forum Mobile Java General
    Replies: 7
    Last Post: 2008-08-18, 23:41
  2. Binary Image problem
    By vishaljaiswal in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2007-05-16, 09:26
  3. set Navi pane visible only out of whole status pane
    By saurbh_g in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-10-25, 04:45
  4. Replies: 1
    Last Post: 2003-04-19, 22:28
  5. CAknForm derived class does not display via navi pane
    By andyesquire in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-03-01, 19:07

Posting Permissions

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