TabBar buttons issue

Hi!

So I am converting an older project from widgets v.1 to v.2 and getting close to having things up and running like it should. However the tabBar is acting weird. I have a custom file for it and for buttons but the buttons dont center on the tabBar like it used to. Now they are placed slightly above the center. 

Is this supposed to be? I have tried alot of things but nothing seem to work. The select graphics are centered on the tabBar where the button should have been, but the button is not. And as far as I can see there are no ways of adjusting the placement of the buttons?

code with tabBar looks like this:

[lua]

local btnWidth = 100

local btnHeight = 70

local tabButtons = {

    {

        defaultFile=“assets/tasks.png”,

        overFile=“assets/tasks-down.png”,

        width = btnWidth, 

        height = btnHeight,

        onPress=function() 

            --call function

        end,

        selected=true,

    },

    {

        defaultFile=“assets/goals.png”,

        overFile=“assets/goals-down.png”,

        width = btnWidth, 

        height = btnHeight,

        onPress=function() 

            --call function

        end,

    },

    {

        defaultFile=“assets/info.png”,

        overFile=“assets/info-down.png”,

        width = btnWidth, 

        height = btnHeight,

        onPress=function() 

            --call function

        end,

    },

}

local bottomTab = widget.newTabBar

    {

        left = 0,

        top = display.contentHeight-70,

        width = display.contentWidth,

        height = 70,

        buttons=tabButtons,

        backgroundFile = “assets/tab_bck.png”,

        tabSelectedLeftFile = “assets/tabBar_tabSelectedLeft.png”,

        tabSelectedRightFile = “assets/tabBar_tabSelectedRight.png”,

        tabSelectedMiddleFile = “assets/tabBar_tabSelectedMiddle.png”,

        tabSelectedFrameWidth = 20,

        tabSelectedFrameHeight = 52,

    }

[/lua]

Can you post a screen shot? 

What version of Corona SDK are you using?

I am using build 2013.1154, screenshot attached

should this be 70?

tabSelectedFrameHeight = 52

no, as I said the select graphics work. Dosent matter what values I put for those, they still get centered properly if I have the select graphics shown. Also the issue with buttons are still there even if I remove the custom images for the tabBar and just use the standard black one. I have attached a thumbnail where I show this by removing all the custom parts of the tabBar leaving the code for that part looking like this:

[lua]

local demoTabs = widget.newTabBar

    {

        left = 0,

        top = display.contentHeight-77,

        width = display.contentWidth,

        height = 70,

        buttons=tabButtons,

    }

[/lua]

one more thing I have noticed is that I have to subtract 77 from the value of the display.contentHeight for the tabBar to be place correctly on the screen instead of 70. So then I tried making the buttons smaller and if I put them at 50*100 the tabBar would be placed as it should leaving a gap of 7pixels at the bottom when subtracting 77 from height. Buttons are still not centred on the Y axis, but now the tabBar placement works. Attached a screenshot of this as well, same code only buttons have a height of 50 now instead of 70.

so is there a reason for this? why the buttons are no longer centered on the tabBar in the Y axis? if you want a samplecode just open the widgetdemo code that comes with corona, you will notice that the buttons have the samme issue there.

Can you post a screen shot? 

What version of Corona SDK are you using?

I am using build 2013.1154, screenshot attached

should this be 70?

tabSelectedFrameHeight = 52

no, as I said the select graphics work. Dosent matter what values I put for those, they still get centered properly if I have the select graphics shown. Also the issue with buttons are still there even if I remove the custom images for the tabBar and just use the standard black one. I have attached a thumbnail where I show this by removing all the custom parts of the tabBar leaving the code for that part looking like this:

[lua]

local demoTabs = widget.newTabBar

    {

        left = 0,

        top = display.contentHeight-77,

        width = display.contentWidth,

        height = 70,

        buttons=tabButtons,

    }

[/lua]

one more thing I have noticed is that I have to subtract 77 from the value of the display.contentHeight for the tabBar to be place correctly on the screen instead of 70. So then I tried making the buttons smaller and if I put them at 50*100 the tabBar would be placed as it should leaving a gap of 7pixels at the bottom when subtracting 77 from height. Buttons are still not centred on the Y axis, but now the tabBar placement works. Attached a screenshot of this as well, same code only buttons have a height of 50 now instead of 70.

so is there a reason for this? why the buttons are no longer centered on the tabBar in the Y axis? if you want a samplecode just open the widgetdemo code that comes with corona, you will notice that the buttons have the samme issue there.