[QGIS-Developer] Legend symbol and geometry generator

Julien Cabieces julien.cabieces at oslandia.com
Wed Oct 12 03:28:51 PDT 2022


A non-text attachment was scrubbed...
Name: legend_symbol_browser.png
Type: image/png
Size: 20920 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221012/f9d2fb00/attachment-0001.png>
-------------- next part --------------

Hi devs,

I would like to fix the legend symbol rendering when a geometry generator is involved in the browser and in the layout. I would like to ask you what it is the expected behavior, because it doesn't look very consistent to me.

Every layer in my project as a geometry generator with a big buffer.

In browser, As you can see on attachmed file, only marker with categorized or rule renderer can be bigger than a 16x16 pixel icon. Is it wanted ?

Its size is limited by the parameter "Options > Canvas & legend > Maximum legend symbol size"
Note that the marker symbol is drawn "big" according to geometry generator definition, and QGIS keep a square subset in the center regarding the max size. This is different when you chose a very big symbol for your marker where it is scaled to fit the icon size. 

Is it wanted ? 

Same questions apply for layout.
Do we want the exact same behavior than browser ?
Do we want to scale the content to the legend symbol given size or do we
want to keep only what's in the center ?
Do we want a different way of dealing with marker on one side, and
line/polygon on other side ?
Do we want a different rendering whether there is a categorized/rule renderer or not ? 

Regards,
Julien


More information about the QGIS-Developer mailing list