[QGIS-Developer] QgsSymbolButton/QgsFontButton no menu?

Jonas qgis at ag99.de
Mon Dec 17 11:08:40 PST 2018


Hi Nyall,

ok, thank you!

Jonas

> On 15. Dec 2018, at 22:41, Nyall Dawson <nyall.dawson at gmail.com> wrote:
> 
> On Sat, 15 Dec 2018 at 20:50, Jonas <qgis at ag99.de> wrote:
>> 
>> 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 don't think these are required, and are just remnants of code copied
> originally from the color button. As you've rightly concluded, it's
> not possible to use the font/symbol button widgets without the menus.
> 
> Nyall
> 
>> 
>> 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
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the QGIS-Developer mailing list