[Maya][UI] Icon scaling?

Are the maya icons resizable when using them?

In the docs for iconTextButton, the flag image (i) says:

If you are not providing images with different sizes then you may use this flag for the control’s image. If the “iconOnly” style is set, the icon will be scaled to the size of the control.

Yet I cannot get an icon to scale. I can set the height of the icon on creation, but width appears to have no effect. Example:

import maya.cmds as cmds

window = cmds.window()
cmds.columnLayout(adj=True)
icon = cmds.iconTextButton(style='iconOnly', w=16, h=500, image='paintBlendshape.png' )
cmds.showWindow( window )

The margins around the icon expand to fill the height, but the icon itself remains the same size, and the width doesn’t seem to go below a certain value. I have tried this using a form layout and the icon once again does not scale at all.

Image provided to the iconTextButton will not scale dynamically but it will scale to the input size of your control (i.e. w=16, h=500).
Reason why your image isn’t scaling width wise is because it’s parent control width is set to be dynamic via columnLayout(adj=True).
Set that to False and the image will scale appropriately.
Keep in mind that window control itself will not scale width wise below certain value (~100 or so). You can test this by creating an empty window and trying to drag-resize it as small as possible.