Changes between Version 169 and Version 170 of Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
2020-03-15T16:51:56+01:00 (4 years ago)
Author:
simon04
Comment:

r15731

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v169 v170  
    919919== Style settings ==
    920920
    921 [[Help/Dialog/MapPaint/StyleSettings|Styles settings]] are used to provide the user settings to customize a mappaint style. The user can use them in the MapPaint dialog. Style settings are availible since r7450. The internal style provides style settings since r7454. Note that there are plans to extend the implementation of style settings (currently there are only boolean values supported), so the mapcss syntax for style settings could change in the future (see #10435).
    922 
    923 create a setting:
     921[[Help/Dialog/MapPaint/StyleSettings|Styles settings]] are used to provide the user settings to customize a mappaint style. The user can use them in the MapPaint dialog. The following `type` of settings are available:
     922* `boolean` (since r7450)
     923* `double` (since r15731, see #10435)
     924* `string` (since r15731, see #10435)
     925
     926=== Settings of type `boolean` ===
     927
     928Create a setting of type `boolean`:
    924929{{{
    925930#!mapcss
     
    930935}
    931936}}}
    932 use a setting:
     937
     938Use a setting of type `boolean`:
    933939{{{
    934940#!mapcss
     
    936942  casing-width: 2;
    937943  casing-color: white;
     944}
     945}}}
     946
     947=== Settings of type `double` ===
     948
     949Create a setting of type `double`:
     950{{{
     951#!mapcss
     952setting::place_font_size {
     953  type: double;
     954  label: tr("Set place name font size...");
     955  default: 11;
     956}
     957}}}
     958
     959Use a setting of type `double`:
     960{{{
     961#!mapcss
     962node.place, way.place, area.place {
     963  font-size: setting("place_font_size");
    938964}
    939965}}}