svghmi/widget_list.ysl2
branchsvghmi
changeset 3185 9038655c1b18
parent 3175 b2ba6eeb61ec
child 3232 7bdb766c2a4d
equal deleted inserted replaced
3184:1d3408e46ab1 3185:9038655c1b18
    11 
    11 
    12 template "widget[@type='TextStyleList']", mode="widget_defs" {
    12 template "widget[@type='TextStyleList']", mode="widget_defs" {
    13     param "hmi_element";
    13     param "hmi_element";
    14     |     styles: {
    14     |     styles: {
    15     foreach "$hmi_element/*[@inkscape:label]" {
    15     foreach "$hmi_element/*[@inkscape:label]" {
    16         const "text", "func:refered_elements(.)[self::svg:text][1]";
    16         const "style", "func:refered_elements(.)[self::svg:text]/@style";
    17         const "tspan", "$text/svg:tspan[1]";
       
    18         const "style" choose {
       
    19             when "$text/@style and $tspan/@style" > «$text/@style»;«$tspan/@style»
       
    20             otherwise > «$text/@style»«$tspan/@style»
       
    21 
       
    22         }
       
    23     |         «@inkscape:label»: "«$style»",
    17     |         «@inkscape:label»: "«$style»",
    24     }
    18     }
    25     |     },
    19     |     },
    26 }
    20 }