Tools/Toolset/palettes/tools/revtools.livecodescript has some issues.
If a widget does "set the backColor of this card to black" in OnCreate (using "post"), then the backColor of the tools palette is set to black.
My proposal is to use (if available) the SVGIcon or email@example.com or a default SVG [optionally at preferredSize] as "dragImage".
This could also resolve problems that I have with some of my widgets: After dragging the widget from the Tools palette the latter is hidden (or probably: put off-screen).
The following part on the way to that goal works:
Inserted at line 605 Tools/Toolset/palettes/tools/revtools.livecodescript line 605
Code: Select all
# Create a control and Generate a drag image if tObjectTypeID begins with "community.livecode.hermann." then put revIDEExtensionProperty(tObjectTypeID, "icon") into fImg if fImg is empty then put revIDEDefaultExtensionIcon("widget") into fImg put fImg into fTmp set the itemdelimiter to "." put fImg into fTmp replace ".png" with "@extra-high.png" in fTmp if there is a file fTmp then put fTmp into fImg create invisible img "tmp" set the filename of img "tmp" to fImg set topleft of img 1 to 0,0 show img 1 disable img 1 set the windowshape of this stack to the ID of image 1 set the rect of this stack to the rect of image 1 else ... end if
How can I solve that?
p.s. Related to that (bug #20377)