Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[header] New header component and big changes to orientation handling #27

Merged
merged 1 commit into from Apr 23, 2014
Merged

Conversation

faenil
Copy link
Member

@faenil faenil commented Apr 17, 2014

First of all, this is a big commit, I'm sorry guys...I couldn't find
a decent way to split the big changes into many commits as they're
all strongly related one to the other...so I decided to just push it
into one commit instead of splitting it into non-working mini-commits.

So, the main changes which this commit brings are:

  • Header component!
    It's basically a toolbar + "drawer" with
    levels of customizable heights providing speedbumps
    (yeah, I can understand this is not that self-explaining,
    refer to https://github.com/qwazix/glacier-controls-spec/blob/master/header/header.pdf
    for more info :D )
    I'm sure there are lots of things which can be improved,
    look for the "TODO" comments in the sourcecode.
    But it's generally complete and working.
    The header behaves different in portrait and landscape modes,
    as requested in the spec above.
  • Header dimmer:
    this is a separate component because of technical reasons,
    but it's basically the dimmer which is anchored at the bottom
    of the header, and partially covers the current page.
  • Added a new HeaderToolsLayout, which replaces the temporary
    ToolBarLayoutExample.
    This component currently only handles the layout of the toolbar,
    not the drawer (decision making required, here).
  • Added FilteringMouseArea QML component, with c++ implementation:
    this was needed to implement the header, and I'm sure it will be useful
    in the future for other purposes. It's basically a MouseArea which
    receives the events, handles them, and sends them underneath if
    it wishes to (while in MouseArea, if you accept the first event the areas
    below you won't receive it, and if you don't accept the first event,
    you'll miss all the others as well)
  • The toolbar/header element has been moved from Page to ApplicationWindow.
    This means there's only one Header in the app, what changes is its
    content (just like in MeeGo's Qt Components), which means we don't have
    to create a new Header everytime we push a Page on the stack.
  • Moved some QML properties to C++
  • Improved UI orientation change handling:
    the orientation locks now work correctly, plus we can both specify
    a Page orientation lock, and a global orientation lock, which is used
    when no lock is specified for the current page.
  • Updated components example Gallery:
    many modifications here and there as a consequence to the big changes,
    plus I've replaced the Toolbar with the Header in all pages,and
    put a few levels in the drawer of the main Page.
    I also set orientation locks in a few pages, to make it easier
    in the future to check that everything is working.

Have fun! :)

faenil

First of all, this is a big commit, I'm sorry guys...I couldn't find
a decent way to split the big changes into many commits as they're
all strongly related one to the other...so I decided to just push it
into one commit instead of splitting it into non-working mini-commits.

So, the main changes which this commit brings are:
- Header component!
  It's basically a toolbar + "drawer" with
  levels of customizable heights providing speedbumps
  (yeah, I can understand this is not that self-explaining,
  refer to https://github.com/qwazix/glacier-controls-spec/blob/master/header/header.pdf
  for more info :D )
  I'm sure there are lots of things which can be improved,
  look for the "TODO" comments in the sourcecode.
  But it's generally complete and working.
  The header behaves different in portrait and landscape modes,
  as requested in the spec above.

- Header dimmer:
  this is a separate component because of technical reasons,
  but it's basically the dimmer which is anchored at the bottom
  of the header, and partially covers the current page.

- Added a new HeaderToolsLayout, which replaces the temporary
  ToolBarLayoutExample.
  This component currently only handles the layout of the toolbar,
  not the drawer (decision making required, here).

- Added FilteringMouseArea QML component, with c++ implementation:
  this was needed to implement the header, and I'm sure it will be useful
  in the future for other purposes. It's basically a MouseArea which
  receives the events, handles them, and sends them underneath if
  it wishes to (while in MouseArea, if you accept the first event the areas
  below you won't receive it, and if you don't accept the first event,
  you'll miss all the others as well)

- The toolbar/header element has been moved from Page to ApplicationWindow.
  This means there's only one Header in the app, what changes is its
  content (just like in MeeGo's Qt Components), which means we don't have
  to create a new Header everytime we push a Page on the stack.

- Moved some QML properties to C++

- Improved UI orientation change handling:
  the orientation locks now work correctly, plus we can both specify
  a Page orientation lock, *and* a global orientation lock, which is used
  when no lock is specified for the current page.

- Updated components example Gallery:
  many modifications here and there as a consequence to the big changes,
  plus I've replaced the Toolbar with the Header in all pages,and
  put a few levels in the drawer of the main Page.
  I also set orientation locks in a few pages, to make it easier
  in the future to check that everything is working.

Have fun! :)

faenil
@locusf
Copy link
Member

locusf commented Apr 17, 2014

LGTM, good commenting too. Perhaps someone else should look as well, its a big commit though.

@sledges
Copy link
Contributor

sledges commented Apr 23, 2014

@locusf has tried and tested it, we should let the monster in. Big thanks @faenil !

If we find bugs/regressions - we deal with them separately.
Otherwise, imagine us coming back to @faenil and saying "we need you to reset this commit, fix one character, and update this PR" :D

LGeTM :)

However with note that monster commits should be only exceptional in future (like this one)

locusf added a commit that referenced this pull request Apr 23, 2014
[header] New header component and big changes to orientation handling
@locusf locusf merged commit 6e8fc4d into nemomobile:master Apr 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants