[Gambas-user] SwitchButton with "OFF" when Enabled gets False
Fabien Bodard
gambas.fr at ...626...
Fri Oct 24 17:49:04 CEST 2014
Well it might be an error .... i remember the logical chain to have a
well rendered widget need some concentration
2014-10-24 17:00 GMT+02:00 Tobias Boege <taboege at ...626...>:
> Hi Benoit,
>
> gb.form's SwitchButton's DrawingArea_Draw() contains this:
>
> 80 If $fValue > 0 Then
> 81 If $iBg = Color.Default Then
> 82 iCol = Color.SelectedBackground
> 83 Else
> 84 iCol = $iBg
> 85 Endif
> 86 If Not Me.Enabled Then iCol = Color.Desaturate(Color.Merge(iCol, Color.ButtonBackground))
> 87 iCol = Color.SetAlpha(iCol, 255 * (1 - $fValue))
> 88 Else
> 89 iCol = Color.Default
> 90 Endif
>
> So Enabled = False has no effect (on iCol) when the button is "OFF". This
> looks like it's intentional but it makes the control appear differently when
> it is disabled, depending on whether it is ON or OFF... Why?
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
More information about the User
mailing list