IDEMPIERE-181 Zk6: Fixed toolbar appearance

This commit is contained in:
Elaine Tan 2012-03-19 16:16:54 +08:00
parent 9febc774f1
commit 536955c281
3 changed files with 22 additions and 12 deletions

View File

@ -47,13 +47,18 @@ public class ToolBarButton extends org.zkoss.zul.Toolbarbutton
public void setPressed(boolean pressed) { public void setPressed(boolean pressed) {
this.pressed = pressed; // Elaine 2008/12/09 this.pressed = pressed; // Elaine 2008/12/09
if (!getMode().equals("toggle"))
setMode("toggle");
if (!isDisabled()) { if (!isDisabled()) {
if (pressed) { // if (pressed) {
LayoutUtils.addSclass("depressed", this); // LayoutUtils.addSclass("depressed", this);
} else { // } else {
if (this.getSclass() != null && this.getSclass().indexOf("depressed") >= 0) // if (this.getSclass() != null && this.getSclass().indexOf("depressed") >= 0)
this.setSclass(this.getSclass().replace("depressed", "")); // this.setSclass(this.getSclass().replace("depressed", ""));
} // }
setChecked(pressed);
} }
} }

View File

@ -1288,11 +1288,12 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
} }
if (canHaveAttachment) if (canHaveAttachment)
{ {
toolbar.enableAttachment(true);
toolbar.getButton("Attachment").setPressed(curTab.hasAttachment()); toolbar.getButton("Attachment").setPressed(curTab.hasAttachment());
toolbar.enableAttachment(true);
} }
else else
{ {
toolbar.getButton("Attachment").setPressed(false);
toolbar.enableAttachment(false); toolbar.enableAttachment(false);
} }

View File

@ -109,7 +109,11 @@ html,body {
padding: 0px; padding: 0px;
} }
.toolbar-button img { .z-toolbarbutton-cnt {
padding: 0px;
}
.toolbar-button .z-toolbarbutton-body .z-toolbarbutton-cnt img {
width: 22px; width: 22px;
height: 22px; height: 22px;
padding: 0px 1px 0px 1px; padding: 0px 1px 0px 1px;
@ -118,7 +122,7 @@ html,body {
border-color: transparent; border-color: transparent;
} }
.embedded-toolbar-button img { .embedded-toolbar-button .z-toolbarbutton-body .z-toolbarbutton-cnt img {
width: 16px; width: 16px;
height: 16px; height: 16px;
padding: 0px 1px 0px 1px; padding: 0px 1px 0px 1px;
@ -128,12 +132,12 @@ html,body {
} }
.depressed img { .depressed img {
border-style: inset; /* border-style: inset;*/
border-width: 1px; border-width: 1px;
border-color: #9CBDFF; border-color: #9CBDFF;
background-color: #C4DCFB; background-color: #C4DCFB;
-moz-border-radius: 5px; /* -moz-border-radius: 5px;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;*/
padding: 0px 1px 0px 1px; padding: 0px 1px 0px 1px;
} }