I will like change Font style by bindings.
Posted by: pierrot | on July 12, 2015
I will like change Font style by bindings. But i dont know, what value is correct for normal, bold, italic, bold & italic in bindigs…
I mean for example this (it’s silly, but for demonstration)
set for bindigs/text/font style
if ($ll_second > 45){
return “bold”;}
else if ($ll_second >30) {
return ‘italic’;}
else if ($ll_second >15) {
return Normal;}
else {return bold and italic ;
}
(nothing from this not working for me). What i must set to return value?
TrianguloY
]]>Posted in | 4 Comments »
Tags:
« bindings value (Previous Post)
(Next Post) bindings is perfect function. »
< ![CDATA[
Hmm, the question is an interesting one, and the answer is here:
http://www.pierrox.net/android/applications/lightning_launcher/script/reference/net/pierrox/lightning_launcher/script/api/PropertySet.html
However the property only change after a reload of the item.
Is it a bug Pierre Hébert?
var t=parseFloat($ll_second)%4;
if (t==0){
return “BOLD”;}
else if (t==1) {
return ‘ITALIC’;}
else if (t==2) {
return “NORMAL”;}
else {return ‘BOLD_ITALIC’ ;
}
]]>
< ![CDATA[
Thanks…
This work for me…
if ($ll_second >45) {
return “BOLD”;}
else if ($ll_second >30) {
return “ITALIC”;}
else if ($ll_second >15) {
return “BOLD_ITALIC”;}
else {return “NORMAL”;}
But as say you, only after restart, is changed font style. If I use almost same code for change basic color, this working automatically…
if ($ll_second > 50){
return 0xffffaa00;}
else if ($ll_second >40) {
return 0xffff00e0;}
else if ($ll_second >30) {
return 0xffff0000;}
else if ($ll_second >20) {
return 0xff2514c5;}
else if ($ll_second >10) {
return 0xff27c514;}
else {return 0xff000000 ;
}
]]>
< ![CDATA[
Yes it should, a bad copy/paste in the code…
]]>
< ![CDATA[
b4/b5 fix problem with font style, thanks
]]>