Tweak fixed header and footer

Don't show fixed header if its height is larger than one line of text.
Take the editmode toobar into account when fixing the footer.