Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6768 closed defect (fixed)

BorderContainer: style gap between panes for splitter=false

Reported by: bill Owned by: bill
Priority: high Milestone: 1.2
Component: Dijit - LnF Version: 1.1.0
Keywords: Cc: nonken
Blocked By: Blocking:

Description (last modified by bill)

When splitter=true

<div dojoType="dijit.layout.ContentPane" region="top" .. splitter="true">

...BorderContainer leaves a gap between the panes which can be grabbed and dragged in order to resize the pane:

For styling reasons (see #6438 and #6764), need to support (an optional) similar gap even when pane's size is not adjustable (ie, when splitter="false"). Actually, a gap should be the default, to match the padding that nonken will be adding to BorderContainer.

But of course don't display the thumb icon if pane isn't resizable.

As usual w/dijit everything needs to be controlled via CSS rules but not sure exactly what the best way to do this is... could have a .dijitNonMovableSplitter class or perhaps just leverage the padding setting from the BorderContainer's DOM node.

Attachments (2)

gap.png (17.3 KB) - added by bill 11 years ago.
thumb.png (4.4 KB) - added by bill 11 years ago.

Download all attachments as: .zip

Change History (11)

Changed 11 years ago by bill

Attachment: gap.png added

Changed 11 years ago by bill

Attachment: thumb.png added

comment:1 Changed 11 years ago by bill

Description: modified (diff)

comment:2 Changed 11 years ago by Adam Peller

So I take issue with making a 'gap' the default in bc. Also, it sounds more like you want a non-movable splitter (w/o a 'thumb') than a gap; there's a difference. If we want the latter, we could have a property on BC like showAllSplitters="true" (I think it should default to 'false' to preserve the current behavior, it's simpler, and because it makes more sense when splitters aren't used) This would make the splitters appear -- an extra themed DIV element -- without their 'thumbs', using CSS rules, which is more than just producing a gap in the layout.

comment:3 Changed 11 years ago by dante

showSplitters=true works for me +1

so splitter=false && showSplitters=true would create a _Splitter, but not "activate" it?

comment:4 Changed 11 years ago by bill

Owner: changed from Adam Peller to bill
Status: newassigned

comment:5 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [14340]) Add gutters=true/false parameter so BorderContainer? can be used like old LayoutContainer? where it doesn't add margin around panes or borders around ContainerPane? and TabContainer?.

When gutters=true (default), adds "margin" around all panes, even non-resizable panes, separating them from other panes and from the edge of the BorderContainer? itself.

Also removed padding from tests and instead added it to themes, in order to test that the themes are working correctly. Plus, changed themeTester.html to have single BorderContainer? instead of nested ones.

Fixes #6768 !strict

comment:6 Changed 11 years ago by bill

(In [14341]) A few lines I meant to remove before previous checkin. Refs #6768 !strict

comment:7 Changed 11 years ago by bill

(In [14342]) Fix and simplify calculations (adding 0 is harmless), fixing problem where right splitter was obscured on IE. Refs #6768 !strict

comment:8 Changed 11 years ago by bill

(In [14343]) Fix calculations again... rightSplitterWidth should be 0 if there is no right pane. Refs #6768 !strict

comment:9 Changed 11 years ago by bill

(In [14347]) Refactor code to stick in a dummy div as a gutter (for when BorderContainer?.gutters=true but ContentPane?.splitter=false). This is needed to make nested BorderContainers? look right, because they have padding:0px but they still need gutters... thus the gutter width cannot be equal to the padding. Refs #6768 !strict

Note: See TracTickets for help on using tickets.