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);
|
this.btnLock.setPressed(locked);
|
||||||
|
|
||||||
String size = Env.getContext(Env.getCtx(), "#ZK_Toolbar_Button_Size");
|
if (ThemeManager.isUseFontIconForImage())
|
||||||
String suffix = "24.png";
|
{
|
||||||
if (!Util.isEmpty(size))
|
String iconSclass = "z-icon-" + (this.btnLock.isPressed() ? "lock" : "unlock") ;
|
||||||
{
|
this.btnLock.setIconSclass(iconSclass);
|
||||||
suffix = size + ".png";
|
LayoutUtils.addSclass("font-icon-toolbar-button", this.btnLock);
|
||||||
}
|
}
|
||||||
String imgURL = "images/"+ (this.btnLock.isPressed() ? "LockX" : "Lock") + suffix;
|
else
|
||||||
imgURL = ThemeManager.getThemeResource(imgURL);
|
{
|
||||||
this.btnLock.setImage(imgURL);
|
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)
|
public void enablePostIt(boolean enabled)
|
||||||
|
|
Loading…
Reference in New Issue