IDEMPIERE-5318 DetailPane ignore IAction.getIconSclass (#1367)
This commit is contained in:
parent
71b97d7a40
commit
a335d97eb1
|
@ -471,13 +471,23 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
|
||||||
btn.setId("Btn"+toolbarButton.getComponentName());
|
btn.setId("Btn"+toolbarButton.getComponentName());
|
||||||
btn.setTooltiptext(tooltiptext);
|
btn.setTooltiptext(tooltiptext);
|
||||||
btn.setDisabled(false);
|
btn.setDisabled(false);
|
||||||
|
btn.setIconSclass(null);
|
||||||
AImage aImage = Actions.getActionImage(actionId);
|
if (ThemeManager.isUseFontIconForImage()) {
|
||||||
if ( aImage != null ) {
|
String iconSclass = Actions.getActionIconSclass(actionId);
|
||||||
btn.setImageContent(aImage);
|
if (!Util.isEmpty(iconSclass, true)) {
|
||||||
} else {
|
btn.setIconSclass(iconSclass);
|
||||||
btn.setLabel(label);
|
LayoutUtils.addSclass("font-icon-toolbar-button", btn);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//not using font icon, fallback to image or label
|
||||||
|
if (Util.isEmpty(btn.getIconSclass(), true)) {
|
||||||
|
AImage aImage = Actions.getActionImage(actionId);
|
||||||
|
if ( aImage != null ) {
|
||||||
|
btn.setImageContent(aImage);
|
||||||
|
} else {
|
||||||
|
btn.setLabel(label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ToolbarCustomButton toolbarCustomBtn = new ToolbarCustomButton(toolbarButton, btn, actionId, tabPanel.getGridTab().getWindowNo(), tabPanel.getGridTab().getTabNo());
|
ToolbarCustomButton toolbarCustomBtn = new ToolbarCustomButton(toolbarButton, btn, actionId, tabPanel.getGridTab().getWindowNo(), tabPanel.getGridTab().getTabNo());
|
||||||
tp.toolbarCustomButtons.put(btn, toolbarCustomBtn);
|
tp.toolbarCustomButtons.put(btn, toolbarCustomBtn);
|
||||||
|
|
Loading…
Reference in New Issue