goldim
goldim

Reputation: 460

How to set icons for buttons of qxl.dialog in your project?

I installed qxl.dialog package, created a dialog but there no images for buttons. In description of the package said: in your theme directory of your project you have to extend an icon class and define paths for specific alias such as qxl.dialog.icon.(ok|cancel|info|warning|error). But I don't use specific icon theme and change theme at runtime. I mean I don't depend on one theme. I would like to get icon theme of current theme and add programmatically alias for this icon theme. How can I do this?

Upvotes: 0

Views: 43

Answers (1)

goldim
goldim

Reputation: 460

There is a alias manager which allows to define alias and their values. It can be used for defining qxl.dialog.icon.(ok|cancel|info|warning|error).

const title = qx.theme.manager.Icon.getInstance().getTheme().title
const manager = qx.util.AliasManager.getInstance()
manager.add("qxl.dialog.icon.ok", `qx/icon/${title}/22/actions/dialog-ok.png`);

Upvotes: 0

Related Questions