On 19-02-2020 05:33, mark wrote:
I've just tried it like this:
optionsButton = new Button("_Options"); optionsButton.setImage(new Image(StockID.PREFERENCES)); helpButton = new Button(StockID.HELP);
The help button shows an icon & the text "Help"; the options button shows a "missing icon" icon and the text "Options". Even when I use the StockID.HELP for the options button it still shows the "missing icon" icon. I'm testing this on Linux.
I've now reported this as a bug https://github.com/gtkd-developers/GtkD/issues/300 including a tiny runnable example.
Actually the code is using a other constructor then the one accepting a
StockID, since theh icon size is missing the enum is interpreted as a
string and passed to the constructor that uses a filename.
This should work:
optionsButton = new Button("_Options"); optionsButton.setImage(new Image(StockID.PREFERENCES, IconSize.BUTTON));