Code review comment for lp:~canonical-platform-qa/ubuntu-ui-toolkit/fix1401517-overwrite_swipe_borders

Revision history for this message
Tim Peeters (tpeeters) wrote :

+ # Swiping from below can open the toolbar or trigger the bottom edge
9 + # gesture. Use this margin to start a swipe that will not be that close to
10 + # the bottom edge.
11 + margin_to_swipe_from_bottom = 25

Where did you get the 25 pixels from? Shouldn't we use grid units here?

We have this in the UITK Panel.qml:

    /*!
      The size (height for top or bottom-aligned panels, width for left or right-aligned
      panels) of the mouse area used to detect edge swipes to open the panel, when
      the panel is not opened. Default value: units.gu(2).
     */
    property real triggerSize: units.gu(2)

So apps that use the Panel with default settings will need a margin of 2 grid units. Of course apps can override this with their own value (or not use the Panel at all and implement their own bottom-edge).

« Back to merge proposal