Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Alternative fix for Replace ModalBar with 2 lines #7743

Merged
merged 2 commits into from
May 4, 2014
Merged

Conversation

TomMalbran
Copy link
Contributor

@redmunds This is the alternative fix for #7396.

I noticed that using 100% with translate worked fine, so we no longer need to worry about the height of the modal bar. It also fixes an issue when the html menus use 2 lines, or even more.

// when there are html menus we need to adjust the top position
if (!brackets.nativeMenus) {
var top = $("#titlebar").outerHeight();
this._$root.css("top", (top + 10) + "px");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this adjustment only 10px? The adjustment you're replacing uses 37px.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be just top and top is the height of the html menus, which is 37px when it uses 1 line and more when it uses 2. I was doing some testing and forgot to remove the extra 10.

@redmunds
Copy link
Contributor

redmunds commented May 4, 2014

I'm seeing some quirks with this branch. I'm using Win7. Also need to test Mac.

With HTML menus (and title bar a single line), it transitions down to a small amount (looks like 10px) and then closes the last amount. This happens both for a single line modal bar or a 2 line modal bar.

The case with a HTML Menus and 2 line title bar is broken in all 3 branches (master, this branch, and my branch).

I tested this branch with only the -44px ==> -100% change and it seems to be the best solution so far, but it doesn't fix the "HTML Menus with 2 line title bar" case.

@redmunds
Copy link
Contributor

redmunds commented May 4, 2014

@TomMalbran I added a Testing Matrix in description of #7396.

@TomMalbran
Copy link
Contributor Author

@redmunds I removed the extra 10px that was adding to the top position, which shouldn't be there in the first place. Hopefully that should fix the 10px error with the html menus, since it was placing the modal bars 10px under the menu leaving a gap between the menus and the bar.

I did some testing in win8.1 and it works fine for me (with and without html menus, with 1 and 2 lines bars).

@redmunds
Copy link
Contributor

redmunds commented May 4, 2014

Looks good! Merging.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants