IDEMPIERE-3535 Implement font icon theme / integrate fix from Murilo (muriloht) for the lock button
This commit is contained in:
parent
caf3ca2367
commit
391b57de2a
|
@ -587,15 +587,24 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
|
|||
{
|
||||
this.btnLock.setPressed(locked);
|
||||
|
||||
String size = Env.getContext(Env.getCtx(), "#ZK_Toolbar_Button_Size");
|
||||
String suffix = "24.png";
|
||||
if (!Util.isEmpty(size))
|
||||
{
|
||||
suffix = size + ".png";
|
||||
}
|
||||
String imgURL = "images/"+ (this.btnLock.isPressed() ? "LockX" : "Lock") + suffix;
|
||||
imgURL = ThemeManager.getThemeResource(imgURL);
|
||||
this.btnLock.setImage(imgURL);
|
||||
if (ThemeManager.isUseFontIconForImage())
|
||||
{
|
||||
String iconSclass = "z-icon-" + (this.btnLock.isPressed() ? "lock" : "unlock") ;
|
||||
this.btnLock.setIconSclass(iconSclass);
|
||||
LayoutUtils.addSclass("font-icon-toolbar-button", this.btnLock);
|
||||
}
|
||||
else
|
||||
{
|
||||
String size = Env.getContext(Env.getCtx(), "#ZK_Toolbar_Button_Size");
|
||||
String suffix = "24.png";
|
||||
if (!Util.isEmpty(size))
|
||||
{
|
||||
suffix = size + ".png";
|
||||
}
|
||||
String imgURL = "images/"+ (this.btnLock.isPressed() ? "LockX" : "Lock") + suffix;
|
||||
imgURL = ThemeManager.getThemeResource(imgURL);
|
||||
this.btnLock.setImage(imgURL);
|
||||
}
|
||||
}
|
||||
|
||||
public void enablePostIt(boolean enabled)
|
||||
|
|
Loading…
Reference in New Issue