Toolbar icons name for Python?

Hello,

I’m trying to replicate the “builtin_brushes” buttons in the paint toolbar for an addon, but I’m having trouble finding the names of their respective icons. I did an extensive research but I still don’t get it.

But so far, I’m getting this (with substitutive icons for the moment)…
Builtin brushes_wrong

        row.scale_x = 1.5
        row.scale_y = 1.8
        row.operator("wm.tool_set_by_id", icon="").name = "builtin_brush.Draw"
        row.operator("wm.tool_set_by_id", icon="").name = "builtin_brush.Soften"
        row.operator("wm.tool_set_by_id", icon="").name = "builtin_brush.Smear"
        row.operator("wm.tool_set_by_id", icon="").name = "builtin_brush.Clone"
        row.operator("wm.tool_set_by_id", icon="").name = "builtin_brush.Fill"
        row.operator("wm.tool_set_by_id", icon="").name = "builtin_brush.Mask"

I would like the same behavior as in the toolbar but the problems are:

  • the button doesn’t stay highlighted when the tool is selected
  • I cannot get the name of the tool’s real icon
  • the icon is not centered in the box (since the boxes of the row are upscaled)

How can I achieve this? Thanks.
Builtin brushes_right

To be specific, these are the names of the icons I’m looking for:
(taken from C:\Program Files\Blender Foundation\Blender 2.82\2.82\datafiles\icons)

brush.paint_texture.draw
brush.paint_texture.soften
brush.paint_texture.smear
brush.paint_texture.clone
brush.paint_texture.fill
brush.paint_texture.mask

But how can I put them as an argument to “icon” for a “row.operator”?

I have looked at the Template “Ui Tool Simple” but it constrains the creation of a tool in the toolbar. I want to recreate the tool in a pie menu…