~vthompson/ubuntu-ui-toolkit/expose-pressed-ubuntushape

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/Panel.qml

Don't automatically close a Panel when the user presses next to it, and update Panel position when its height changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
443
443
      \internal
444
444
      \deprecated
445
445
      Enable the InverseMouseArea that closes the panel when the user clicks outside of the panel.
446
 
      This functionality moved to the Toolbar/Page implementation because the mouse area needs to
447
 
      access with the toolbar and header, but this InverseMouseArea is still in the Panel for backwards
448
 
      compatibility in apps that use it directly. Default value is true, but it is set to false in Toolbar.
 
446
      This functionality moved to the MainView to deal with Toolbar hiding, but this InverseMouseArea
 
447
      is still in the Panel for backwards compatibility in apps that use it directly.
 
448
      Default value is false.
449
449
 
450
450
      FIXME: Remove __closeOnContentsClicks and the IMA below when all apps use Toolbar instead of Panel.
451
451
     */
452
 
    property bool __closeOnContentsClicks: true
 
452
    property bool __closeOnContentsClicks: false
453
453
    Toolkit.InverseMouseArea {
454
454
        anchors.fill: draggingArea
455
455
        onPressed: {
625
625
 
626
626
    Item {
627
627
        id: bar
 
628
        objectName: "bar_item"
628
629
        height: parent.height
629
630
        width: parent.width
630
631
        anchors {
637
638
        property real size: internal.orientation === Qt.Horizontal ? height : width
638
639
        //position will always be in the range 0..size, where position==0 means spread, position==size means hidden.
639
640
        property real position: panel.opened ? 0 : size
 
641
        onSizeChanged: position = panel.opened ? 0 : size
640
642
 
641
643
        y: internal.align === Qt.AlignTop ? -position : internal.align === Qt.AlignBottom ? position : 0
642
644
        x: internal.align === Qt.AlignLeft ? -position : internal.align === Qt.AlignRight ? position : 0