[header] New header component and big changes to orientation handling #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.
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.
ToolBarLayoutExample.
This component currently only handles the layout of the toolbar,
not the drawer (decision making required, here).
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)
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.
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.
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