Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Corona tabbar rendering precision

Tags:

lua

coronasdk

I'm trying to build a tabbar in corona only using custom graphics for up/down states, and background. I find that corona adds left and right padding as the attached image & basic setup below shows. The images are both 32x32 and should fill the space exactly, instead there are black lines at either end and the buttons are forced to overlap.

I've tried every option available in the docs but with no success. Does anyone know if there's an undocumented option that overrides the automatic positioning of tabbar buttons?

    -- table to setup buttons
    local tabButtons = {
        { up="icon1.png", down="icon1-down.png", width = 32, height = 32, cornerRadius=0, onPress=onFirstView, selected=true },
        { up="icon2.png", down="icon2-down.png", width = 32, height = 32, cornerRadius=0, onPress=onSecondView },
    }

    -- create the actual tabBar widget
    local tabBar = widget.newTabBar{
        width=64, height=32,
        buttons = tabButtons
    }

Here's the output:

output screenshot

like image 479
dorianm Avatar asked Nov 03 '22 08:11

dorianm


1 Answers

This is a known bug and is being addressed.

like image 149
Rob Miracle Avatar answered Nov 15 '22 10:11

Rob Miracle