svghmi/widget_list.ysl2
branchsvghmi
changeset 3175 b2ba6eeb61ec
parent 3031 440d74319a74
child 3185 9038655c1b18
equal deleted inserted replaced
3174:bc4194b73438 3175:b2ba6eeb61ec
    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 "style", "func:refered_elements(.)[self::svg:text]/@style";
    16         const "text", "func:refered_elements(.)[self::svg:text][1]";
       
    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         }
    17     |         «@inkscape:label»: "«$style»",
    23     |         «@inkscape:label»: "«$style»",
    18     }
    24     }
    19     |     },
    25     |     },
    20 }
    26 }