XUL:Panel Improvements: Difference between revisions

Jump to navigation Jump to search
Line 14: Line 14:


;Close on outside click/escape key: When clicking outside of a panel, or pressing the Escape key, the panel will be closed. This is currently controlled via the noautohide attribute, which can be set to either true or false. The default value is false, which makes the panel close in this way. If true, the panel will only be closed if a call to hidePopup is made.
;Close on outside click/escape key: When clicking outside of a panel, or pressing the Escape key, the panel will be closed. This is currently controlled via the noautohide attribute, which can be set to either true or false. The default value is false, which makes the panel close in this way. If true, the panel will only be closed if a call to hidePopup is made.
:This feature is already implemented.
;Titlebar: By default panels, do not have a titlebar. Support is desired for both normal size and thin titlebars. When a titlebar is present, the panel can be moved around by dragging the titlebar. The titlebar can optionally have a label. This is possible via a new attribute titlebar which can be set to false (the default), 'normal' for a normal titlebar or 'thin' for a thin titlebar. The titlebar attribute has no effect unless the noautohide attribute is set to true.
;Titlebar: By default panels, do not have a titlebar. Support is desired for both normal size and thin titlebars. When a titlebar is present, the panel can be moved around by dragging the titlebar. The titlebar can optionally have a label. This is possible via a new attribute titlebar which can be set to false (the default), 'normal' for a normal titlebar or 'thin' for a thin titlebar. The titlebar attribute has no effect unless the noautohide attribute is set to true.
:See [https://bugzilla.mozilla.org/show_bug.cgi?id=552982| bug 552982] Displaying a titlebar is quite simple, but complications arise due to the manner in which views and widgets are positioned that cause coordinates to be calculated incorrectly and the popup to jump about the screen.
;Close button: A close button, off by default, to close the popup. A new attribute, closebutton, set to either true or false. Has no effect if the titlebar attribute isn't set to 'normal' or 'thin'.
;Close button: A close button, off by default, to close the popup. A new attribute, closebutton, set to either true or false. Has no effect if the titlebar attribute isn't set to 'normal' or 'thin'.
;Dockable: A dock button on the titlebar to dock the panel into the main window. It would appear as, for example, a sidebar. Events would be needed when a panel switches between these states to update any UI that might be different. For instance, while a titlebar might appear while docked, it won't be a native titlebar, although some platforms may be able to render it as such. In the future, drag and drop of panels to dock them may be an option. A dockbutton attribute would put a button on the titlebar to dock and undock the panel. The attribute would have no effect if a titlebar wasn't present. An API should exist to dock and undock the panel; this would ideally work even if the button wasn't present.
;Dockable: A dock button on the titlebar to dock the panel into the main window. It would appear as, for example, a sidebar. Events would be needed when a panel switches between these states to update any UI that might be different. For instance, while a titlebar might appear while docked, it won't be a native titlebar, although some platforms may be able to render it as such. In the future, drag and drop of panels to dock them may be an option. A dockbutton attribute would put a button on the titlebar to dock and undock the panel. The attribute would have no effect if a titlebar wasn't present. An API should exist to dock and undock the panel; this would ideally work even if the button wasn't present.
287

edits

Navigation menu