GroupBox content borders fixed

This commit is contained in:
Yuriy Artamonov 2013-03-01 15:25:05 +00:00
parent 334fe8e737
commit 324d2212eb
7 changed files with 61 additions and 13 deletions

View File

@ -62,7 +62,7 @@ def desktopModule = project(':cuba-desktop')
def uiTestModule = project(':cuba-test-ui')
def portalModule = project(':cuba-portal')
def vaadinVersion = '7.0.1.h.M0'
def vaadinVersion = '7.0.1.h.M1'
def servletApi = [group: 'org.apache.tomcat', name: 'servlet-api', version: '6.0.20']
def groovyArtifact = [group: 'org.codehaus.groovy', name: 'groovy', version: '1.7.10']

View File

@ -28,7 +28,7 @@
webkit based browsers including Google Chrome.
-->
<!-- vaadin7 -->
<set-property name="user.agent" value="safari"/>
<set-property name="user.agent" value="safari, gecko1_8"/>
<!--
To enable SuperDevMode, uncomment this line.

View File

@ -7,6 +7,7 @@
package com.haulmont.cuba.web.toolkit.ui.client.groupbox;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style;
import com.google.gwt.user.client.Element;
import com.haulmont.cuba.web.toolkit.ui.CubaGroupBox;
import com.vaadin.client.ApplicationConnection;
@ -61,6 +62,18 @@ public class CubaGroupBoxConnector extends PanelConnector {
replaceClassNames(getWidget().getElement());
}
@Override
public void layout() {
super.layout();
// fix padding
getWidget().legend.getStyle().clearMarginTop();
Style style = getWidget().getElement().getStyle();
style.clearPaddingTop();
style.clearPaddingBottom();
}
private void replaceClassNames(Element element) {
String className = element.getClassName();
String newClassName = "";

View File

@ -6,8 +6,6 @@
package com.haulmont.cuba.web.toolkit.ui.client.groupbox;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
@ -63,12 +61,6 @@ public class CubaGroupBoxWidget extends VPanel {
getElement().appendChild(fieldset);
DOM.sinkEvents(expander, Event.ONCLICK);
addHandler(new ResizeHandler() {
@Override
public void onResize(ResizeEvent event) {
}
}, ResizeEvent.getType());
}
public void setDescription(String text) {

View File

@ -4,15 +4,21 @@
border: 0;
}
$groupBoxInnerPadding: 5px;
$groupBoxCaptionLineHeight: 18px;
@mixin cuba-groupbox {
.cuba-groupbox {
.cuba-groupbox.v-widget {
@include cuba-groupbox-defaults;
fieldset {
border: 1px solid #babfc0;
margin: 0;
padding: 5px 5px 5px;
padding: $groupBoxInnerPadding $groupBoxInnerPadding $groupBoxInnerPadding;
width: 100%;
height: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
legend {
@ -25,7 +31,7 @@
.cuba-groupbox-caption {
@include cuba-groupbox-defaults;
padding: 0 4px;
line-height: 18px;
line-height: $groupBoxCaptionLineHeight;
.cuba-groupbox-expander {
float: left;
@ -58,6 +64,8 @@
@include cuba-groupbox-defaults;
overflow: hidden;
border: none;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
height: 100%;
@ -80,4 +88,22 @@
}
}
}
}
.v-webkit {
.cuba-groupbox.v-widget {
fieldset {
.cuba-groupbox-content {
padding-bottom: $groupBoxCaptionLineHeight;
}
}
}
.cuba-groupbox.v-widget.cuba-groupbox-nocaption {
fieldset {
.cuba-groupbox-content {
padding-bottom: 0;
}
}
}
}

View File

@ -0,0 +1,15 @@
@mixin v-panel {
.v-panel {
.v-panel-content {
border: 0;
}
.v-panel-deco {
display: none;
}
.v-panel-captionwrap {
display: none;
}
}
}

View File

@ -7,11 +7,13 @@
// Components
@import "components/table/table.scss";
@import "components/groupbox/groupbox.scss";
@import "components/panel/panel.scss";
@mixin iceland {
//@include base;
@include reindeer;
@include v-table;
@include v-panel;
@include cuba-groupbox;
}