PDA

View Full Version : Content Panel right side of border sometimes cuts out



jameslu
8 Aug 2014, 8:36 PM
Code below sometimes produces a testPanel ContentPanel who's right border is missing.

I am using GXT 3.1.0 and GWT 2.6.1

when I change testPanel's type from ContentPanel to FramedPanel, borders are visible on all sides.




ContentPanel topContainer = new ContentPanel();
topContainer.setHeaderVisible(false);
ContentPanel testPanel = new ContentPanel();
testPanel.setHeaderVisible(false);
testPanel.setBorders(true);

VerticalLayoutContainer topContainerVerticalLayoutContainer = new VerticalLayoutContainer();

topContainerVerticalLayoutContainer.add(testPanel, new VerticalLayoutData(1,38, new Margins(0, 0, 0, 0)));

topContainer.add(topContainerVerticalLayoutContainer);

// Note: topContainer is then placed into the west region of a border layout



Inspecting the dom reveals that div with the generated class GAMDM1BCGDD-com-sencha-gxt-theme-neptune-client-base-panel-Css3ContentPanelAppearance-Css3ContentPanelStyle-body has a width that is 2 pixels wider than the div with GAMDM1BCKDD-com-sencha-gxt-theme-neptune-client-base-panel-Css3ContentPanelAppearance-Css3ContentPanelStyle-panel GAMDM1BCDSC-com-sencha-gxt-theme-neptune-client-base-Css3ThemeAppearance-Css3ThemeStyles-border


Full div output


tyle="position: relative; width: 350px; height: 481px;">


<div>

// width is 348px
<div class="GAMDM1BCKDD-com-sencha-gxt-theme-neptune-client-base-panel-C…ptune-client-base-Css3ThemeAppearance-Css3ThemeStyles-border" style="border-width: 1px; position: relative; width: 348px; left: 0px; top: 0px;">




<div class="GAMDM1BCJDD-com-sencha-gxt-theme-neptune-client-base-panel-Css3ContentPanelAppearance-Css3ContentPanelStyle-header" style="display: none;"></div>
<div class="GAMDM1BCHDD-com-sencha-gxt-theme-neptune-client-base-panel-Css3ContentPanelAppearance-Css3ContentPanelStyle-bodyWrap">

// width is 350px and is covering the border which is 348px
<div class="GAMDM1BCGDD-com-sencha-gxt-theme-neptune-client-base-panel-Css3ContentPanelAppearance-Css3ContentPanelStyle-body" style="width: 350px; height: 38px;">


<div class="GAMDM1BCBND-com-sencha-gxt-theme-neptune-client-base-toolbar…ToolBarStyle-toolBar x-toolbar x-toolbar-mark x-small-editor" style="width: 344px; height: 32px;"></div>
</div>
<div class="GAMDM1BCIDD-com-sencha-gxt-theme-neptune-client-base-panel-Css3ContentPanelAppearance-Css3ContentPanelStyle-footer" style="height: 0px;"></div>
</div>
</div>
</div




Problem seems to get worst if you continue to adding more layer of LayoutContainers.