[QGIS-Developer] QgsSymbolButton/QgsFontButton no menu?

Jonas qgis at ag99.de
Sat Dec 15 02:49:44 PST 2018


Hi,

i am currently working on fixing the inner paddings of the ToolButtons for
Symbols (QgsSymbolButton) and Fonts (QgsFontButton) on non-windows platforms
(the fontbutton for macOS has been fixed in 
https://github.com/qgis/QGIS/pull/8605
<https://github.com/qgis/QGIS/pull/8605>  ).

<http://osgeo-org.1560.x6.nabble.com/file/t384296/toolbuttons_2.png> 

can somebody explain to me the rationale to have differing icon widths if
the button has no menu?

see 
https://github.com/qgis/QGIS/blob/8a0a745677a8ff2c4631f451c9ed8fd7580ec220/src/gui/qgssymbolbutton.cpp#L468
<https://github.com/qgis/QGIS/blob/8a0a745677a8ff2c4631f451c9ed8fd7580ec220/src/gui/qgssymbolbutton.cpp#L468>  

i could imagine this would make sense if you could remove the arrow on the
right to make the icon wider then, but i actually found no way to do this in
c++ or python. but you can remove the menu without removing the arrow (eg
setting QgsFontButton.setMenu(None) in PyQGIS) which triggers the
alternative styling. it does not make sense but it makes the button look
weird and also ... blurry on all platforms ?!??

i would like to fix the padding and think that removing the check altogether
is fine, but i am reluctant to move on as i am new around here.

can somebody explain if there is a use case for the non-menu styling? Thanks

Jonas (iona5)


 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html


More information about the QGIS-Developer mailing list