Opened 11 years ago

Closed 10 years ago

Last modified 9 years ago

#9123 closed enhancement (fixed)

Icons for TabButton

Reported by: mschuerig Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.0
Keywords: dijit TabButton TabContainer icon Cc:
Blocked By: Blocking:

Description

Currently, there doesn't seem to be a way to display icons in TabButtons?, either in addition to the title, or instead of the title. The attached patch passed iconClass and showLabel attributes defined on the ContentPane? domNode through to the TabButton?.

Attachments (1)

tab-button-icons.patch (2.3 KB) - added by mschuerig 11 years ago.

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by mschuerig

Attachment: tab-button-icons.patch added

comment:1 Changed 11 years ago by bill

Milestone: tbd1.4
Owner: set to bill
Status: newassigned

comment:2 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [17429]) Allow specifying icons for StackContainer? panes, which are displayed in tab labels and the accordion title bars.

Fixes #9123 !strict.

comment:3 Changed 10 years ago by Adam Peller

(In [17430]) save a few bytes. Refs #9123

comment:4 Changed 10 years ago by mschuerig

Resolution: fixed
Status: closedreopened

Thanks for adding this enhancement. A small nit: I think the showLabel attribute of the child widget should be passed through to the button.

comment:5 Changed 10 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [17433]) Support showTitle attribute for TabContainer? that controls whether tab label text is displayed, or just the icon. Except in high contrast mode, when the label text is displayed regardless of showTitle setting.

Most of the changes here are to remove the tabSpacer <img> from the TabButton? template. It was used to insure a minimum height of each tab button so that buttons with and w/out close icons were the same height, even when the browser's font setting was set to "smallest". But I had to implement it a different way because it was making the icon in icon-only tabs un-centered horizontally.

Fixes #9123 !strict

comment:6 Changed 10 years ago by bill

(In [17434]) Make focusNode include the icon, so that when showLabel=false there's still something to focus. Refs #9123 !strict

comment:7 Changed 9 years ago by bill

(In [23629]) Fix inconsistent tab height when browser font size is small and some (but not all) of the tabs have a close icon. Height was consistent on soria/nihilo (see [17433]) but not on claro/tundra.

Also fixes extra padding on the left of tabs that was occurring due to a 1x1 blank image for the icon even when there was no icon specified. Have to make it display:none in that case since even a 0x0 <img> causes extra padding around the node, at least on FF.

Not sure if the placement of the close icon is exactly where claro wants it or not, could tweak that.

Fixes #11441, refs #9123 !strict.

Note: See TracTickets for help on using tickets.