ICEfaces
  1. ICEfaces
  2. ICE-6009

menus auto-adjust width to contain contents.

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.8.2-EE-GA_P01
    • Fix Version/s: None
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      icefaces 2
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      The work-around won't auto-size the menus, but is how you alter the default hard-coded width. In the application style sheet, change the width for the iceMnuBarSubMenu, iceMnuBarVrtSubMenu styles. Or, for XSubMenu, XVrtSubMenu styles, where X is the styleClass specified on the ice:menuBar or ice:menuPopup component.

      .iceMnuBarSubMenu, .iceMnuBarVrtSubMenu {
          width:200px;
      }
      Show
      The work-around won't auto-size the menus, but is how you alter the default hard-coded width. In the application style sheet, change the width for the iceMnuBarSubMenu, iceMnuBarVrtSubMenu styles. Or, for XSubMenu, XVrtSubMenu styles, where X is the styleClass specified on the ice:menuBar or ice:menuPopup component. .iceMnuBarSubMenu, .iceMnuBarVrtSubMenu {     width:200px; }

      Description

      The ice:menuItem and ice:menuPopup components have an issue where menu item widths have to be hard-coded, instead of automatically resizing to their content's widths. That is, all sibling menuItem components should size to the largest width between them all.

      To accomplish this, we'll have to alter the markup we render, and update all of the themes' styling. That could break any custom styling applications have made, so we'll do this in icefaces 2, and mention it in the icefaces 1.8.x -> 2 migration notes. We'll have to evaluate if any compatibility issues will make this a non-starter.

        Activity

        Hide
        Mark Collette added a comment -

        To fix ICE-5991, many of these changes have now been made. I did a test, and disabled the following style, to get the menus to do auto-resizing:

        .iceMnuBarSubMenu, .iceMnuBarVrtSubMenu

        { width:145px; }

        In fact, the top level menus have always resized, and now the sub-menus will auto-size once the hard-coded width is disabled. Probably some cosmetic padding should be added to the right hand side though.

        Show
        Mark Collette added a comment - To fix ICE-5991 , many of these changes have now been made. I did a test, and disabled the following style, to get the menus to do auto-resizing: .iceMnuBarSubMenu, .iceMnuBarVrtSubMenu { width:145px; } In fact, the top level menus have always resized, and now the sub-menus will auto-size once the hard-coded width is disabled. Probably some cosmetic padding should be added to the right hand side though.
        Hide
        Mark Collette added a comment -

        Reverted rime.css changes, since it doesn't work with IE6. Back to hard-coded width for now.

        Subversion 22258

        Show
        Mark Collette added a comment - Reverted rime.css changes, since it doesn't work with IE6. Back to hard-coded width for now. Subversion 22258
        Hide
        Mark Collette added a comment -

        There might be a way to make IE6 use hard-coded widths, and other browsers use auto-sizing widths. That might be a sufficient compromise.

        Show
        Mark Collette added a comment - There might be a way to make IE6 use hard-coded widths, and other browsers use auto-sizing widths. That might be a sufficient compromise.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: