Skip to content
This repository was 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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/styles/brackets.less
Original file line number Diff line number Diff line change
Expand Up @@ -1077,14 +1077,10 @@ a, img {
}

&.offscreen {
-webkit-transform: translate(0, -44px);
transform: translate(0, -44px);
-webkit-transform: translate(0, -100%);
transform: translate(0, -100%);
transition: -webkit-transform 266ms cubic-bezier(0, 0.56, 0, 1);
transition: transform 266ms cubic-bezier(0, 0.56, 0, 1);

body:not(.has-appshell-menus) & {
top: 37px;
}
}

input {
Expand Down
7 changes: 7 additions & 0 deletions src/widgets/ModalBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ define(function (require, exports, module) {

this._$root.addClass("popout");

// Since the modal bar has now an absolute position relative to the editor holder,
// 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.

}

// Preserve scroll position of the current full editor across the editor refresh, adjusting for the
// height of the modal bar so the code doesn't appear to shift if possible.
var fullEditor = EditorManager.getCurrentFullEditor(),
Expand Down