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

fix menubar height measurement #4384

Merged
merged 1 commit into from Oct 17, 2013
Merged

fix menubar height measurement #4384

merged 1 commit into from Oct 17, 2013

Conversation

minrk
Copy link
Member

@minrk minrk commented Oct 12, 2013

we were measuring the wrong divs, causing the pager splitter to occasionally be off-screen, or the top ~8 pixels of the header to be cut off (e.g. when visiting a url with an anchor).

we were measuring the wrong divs,
causing the pager splitter to occasionally be off-screen,
or the top ~8 pixels of the header to be cut off
(e.g. when visiting a url with an anchor).
@damianavila
Copy link
Member

Would not be also useful to measure the toolbar_height?

Something like this:

        var toolbar_height;
        if ($('div#maintoolbar').css('display') === 'none') {
            toolbar_height = 0;
        } else {
            toolbar_height = $('div#maintoolbar'').outerHeight(true);
        }

       return h-header_height-menubar_height-toolbar_height;  // content height

@damianavila
Copy link
Member

I mean, taking all the three elements into account to calculate the final height...

@minrk
Copy link
Member Author

minrk commented Oct 12, 2013

toolbar height is taken into account. menubar-container wraps the menubar, the toolbar, and a pad. The issues were arising because measuring the menubar and the toolbar excluded the space in between (in a weirdly inconsistent way, for some reason).

@damianavila
Copy link
Member

OK, with your explanation, now is more clear to me, thanks.

minrk added a commit that referenced this pull request Oct 17, 2013
fix menubar height measurement

we were measuring the wrong divs, causing the pager splitter to occasionally be off-screen, or the top ~8 pixels of the header to be cut off (e.g. when visiting a url with an anchor).
@minrk minrk merged commit 52ae6bb into ipython:master Oct 17, 2013
@minrk minrk deleted the height branch October 17, 2013 21:06
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
fix menubar height measurement

we were measuring the wrong divs, causing the pager splitter to occasionally be off-screen, or the top ~8 pixels of the header to be cut off (e.g. when visiting a url with an anchor).
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

2 participants