Hi, 
I would like to add the ability to set icon for g.app.gui.run... Qdialogs.
Actually, some of them have no icon set so an ugly system fallback icon is 
shown...
I thought it would be nice to set default Qdialog icon to leo's app one and 
even the ability to set a custom one.

That would mean to add some changes to leo/plugins/qt_gui.py.
To achieve that, I wonder if there is a special function to get default app 
icon, or if we have to specify icon name (leoapp32.png).

For example

def runAskOkCancelStringDialog(self,c,title,message,cancelButtonText=None,
                               okButtonText=None, icon=None,default=""):

    """Create and run askOkCancelString dialog ."""

    if g.unitTesting: return None

    d = QtWidgets.QInputDialog()
    d.setWindowTitle(title)
    d.setLabelText(message)
    d.setTextValue(default)
    if icon:
        d.setWindowIcon(icon)
    else:
        d.setWindowIcon(g.app.gui.getIconImage ('leoapp32.png'))
    if cancelButtonText:
        d.setCancelButtonText(cancelButtonText)
    if okButtonText:
        d.setOkButtonText(okButtonText)
    ok = d.exec_()
    return str(d.textValue()) if ok else None



-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to