Widgets and custom themes

Hi,

Several of the widgets code checks if if ios7 theme is the current and apply different logic - for example the segmented control uses an embossed font if the theme is not iOS7.

This makes it inappropriate for using custom made themes, can you please remove the logic for iOS 7 and add those as properties of the individual themes

Btw, why are you requesting a file to be attached to each bug report - couldn’t really submit this report through your system

Thanks
Atanas

Hi @atanas,

Which widgets are you trying to customize? Most (or all) of them should allow you to specify the font (not use the embossed version or whatever).

Thanks,

Brent

Hi Brent,

Here is the code from segmentedControl :

 if _widget.isSeven() then

                        label = display.newText( segmentedControl, segments[i], 0, 0, opt.labelFont, opt.labelSize )

                        if view._segmentNumber == i or opt.defaultSegment == i then

                                label:setFillColor( unpack( view._labelColor.over ) )

                        else

                                label:setFillColor( unpack( view._labelColor.default ) )

                        end

                else

                        label = display.newEmbossedText( segmentedControl, segments[i], 0, 0, opt.labelFont, opt.labelSize )

                        label:setFillColor( unpack( whiteColor ) )

                end

There are quite a few other references to isSeven where slight adjustments are made based on wether the current theme is iOS7.

On the other hand, the buttons have the embossed property default in the theme itself

Thanks,

 Atanas

Hi Brent,

Any news? I just entered another related one, this time with the switch control - basically it doesn’t work on anything except iOS7 as you can’t set the x position reliably and set a state = true. Case 28960 in the issue tracking system.

Hard-coding isSeven checks in the widgets code really makes it a challenge to use any custom themes, but also it simply breaks your own widgets code on the different platforms. 

Thanks,

 Atanas

Entering this one in the widget bugs tracking spreadsheet! Thanks for your report. 

Oh, thanks - somehow I thought the spreadsheet is only for tableView widget

Nope. Its for all the widgets. I started it a while back when Walter said in a blog post “We’ve fixed most of the widget bugs and now we’re moving on…” and I thought it might be a good idea to keep an open & transparent list. So far it seems like visibility is securing some attention. Still, we have bugs in there now more than 6 months old still waiting to be dealt with. 

I see - famous last words as they say :slight_smile:

I like this one too.  :wink: Quite telling as to why we had to wait for almost year for widgets to be stabilized, bit by bit… Getting there slowly but as you know the list keeps growing rather than shrinking despite all the hard work from CL staff. 

Hi @atanas,

Which widgets are you trying to customize? Most (or all) of them should allow you to specify the font (not use the embossed version or whatever).

Thanks,

Brent

Hi Brent,

Here is the code from segmentedControl :

 if _widget.isSeven() then

                        label = display.newText( segmentedControl, segments[i], 0, 0, opt.labelFont, opt.labelSize )

                        if view._segmentNumber == i or opt.defaultSegment == i then

                                label:setFillColor( unpack( view._labelColor.over ) )

                        else

                                label:setFillColor( unpack( view._labelColor.default ) )

                        end

                else

                        label = display.newEmbossedText( segmentedControl, segments[i], 0, 0, opt.labelFont, opt.labelSize )

                        label:setFillColor( unpack( whiteColor ) )

                end

There are quite a few other references to isSeven where slight adjustments are made based on wether the current theme is iOS7.

On the other hand, the buttons have the embossed property default in the theme itself

Thanks,

 Atanas

Hi Brent,

Any news? I just entered another related one, this time with the switch control - basically it doesn’t work on anything except iOS7 as you can’t set the x position reliably and set a state = true. Case 28960 in the issue tracking system.

Hard-coding isSeven checks in the widgets code really makes it a challenge to use any custom themes, but also it simply breaks your own widgets code on the different platforms. 

Thanks,

 Atanas

Entering this one in the widget bugs tracking spreadsheet! Thanks for your report. 

Oh, thanks - somehow I thought the spreadsheet is only for tableView widget

Nope. Its for all the widgets. I started it a while back when Walter said in a blog post “We’ve fixed most of the widget bugs and now we’re moving on…” and I thought it might be a good idea to keep an open & transparent list. So far it seems like visibility is securing some attention. Still, we have bugs in there now more than 6 months old still waiting to be dealt with. 

I see - famous last words as they say :slight_smile:

I like this one too.  :wink: Quite telling as to why we had to wait for almost year for widgets to be stabilized, bit by bit… Getting there slowly but as you know the list keeps growing rather than shrinking despite all the hard work from CL staff.