Bladeren bron

Small fixes to IPanel and ITabsheet layout functions.

IExpandLayout cell overflows set to auto.

svn changeset:2880/svn branch:trunk
tags/6.7.0.beta1
Jouni Koivuviita 16 jaren geleden
bovenliggende
commit
3b2a7e19d3

+ 1
- 1
src/com/itmill/toolkit/terminal/gwt/client/ui/IExpandLayout.java Bestand weergeven

@@ -155,7 +155,7 @@ public class IExpandLayout extends ComplexPanel implements
public VerticalWidgetWrapper() {
setElement(DOM.createDiv());
// this is mostly needed for IE, could be isolated
DOM.setStyleAttribute(getContainerElement(), "overflow", "hidden");
DOM.setStyleAttribute(getContainerElement(), "overflow", "auto");
}

void setExpandedSize(int pixels) {

+ 4
- 1
src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java Bestand weergeven

@@ -146,7 +146,10 @@ public class IPanel extends SimplePanel implements Paintable,

// Calculate used height
super.setHeight("");
int usedHeight = getOffsetHeight();
int usedHeight = DOM.getElementPropertyInt(bottomDecoration,
"offsetTop")
+ DOM.getElementPropertyInt(bottomDecoration,
"offsetHeight");

// Calculate content area height (don't allow negative values)
int h = targetHeight - usedHeight;

+ 3
- 11
src/com/itmill/toolkit/terminal/gwt/client/ui/ITabsheet.java Bestand weergeven

@@ -247,21 +247,13 @@ public class ITabsheet extends FlowPanel implements Paintable,
DOM.setStyleAttribute(contentNode, "overflow", "hidden");

// Calculate target height
int targetHeight = 0;
/*
* if (height.indexOf("%") > 0) { // Percentage heights are handled
* separately int parentHeight = DOM.getElementPropertyInt(DOM
* .getParent(getElement()), "offsetHeight"); targetHeight =
* parentHeight Integer.parseInt(height.substring(0, height.length() -
* 1)) / 100; } else {
*/
super.setHeight(height);
targetHeight = getOffsetHeight();
// }
int targetHeight = getOffsetHeight();

// Calculate used height
super.setHeight("");
int usedHeight = getOffsetHeight();
int usedHeight = DOM.getElementPropertyInt(deco, "offsetTop")
+ DOM.getElementPropertyInt(deco, "offsetHeight");

// Calculate content area height (don't allow negative values)
int h = targetHeight - usedHeight;

Laden…
Annuleren
Opslaan