Skip to content

Commit

Permalink
fix(ons-page): Change timing of status bar fill.
Browse files Browse the repository at this point in the history
  • Loading branch information
argelius committed Nov 27, 2015
1 parent 1ce962c commit 40aefea
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
22 changes: 17 additions & 5 deletions core/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ons-toolbar + .page__background + .page__content {
height: 64px;
}

.page__status-bar-fill + ons-toolbar[modifier="material"] {
.page__status-bar-fill + ons-toolbar[modifier~="material"] {
height: 76px;
}

Expand All @@ -87,9 +87,9 @@ ons-toolbar + .page__background + .page__content {
padding-top: 20px;
}

.page__status-bar-fill + ons-toolbar[modifier="material"] > .center,
.page__status-bar-fill + ons-toolbar[modifier="material"] > .left,
.page__status-bar-fill + ons-toolbar[modifier="material"] > .right {
.page__status-bar-fill + ons-toolbar[modifier~="material"] > .center,
.page__status-bar-fill + ons-toolbar[modifier~="material"] > .left,
.page__status-bar-fill + ons-toolbar[modifier~="material"] > .right {
height: 76px;
}

Expand All @@ -99,7 +99,7 @@ ons-toolbar + .page__background + .page__content {
padding-top: 0px;
}

.page__status-bar-fill + ons-toolbar[modifier="material"] + .page__background + .page__content {
.page__status-bar-fill + ons-toolbar[modifier~="material"] + .page__background + .page__content {
top: 76px;
}

Expand All @@ -126,6 +126,18 @@ ons-toolbar + .page__background + .page__content {
padding-top: 22px;
}

ons-tabbar[position="top"] .page__status-bar-fill + .page__background + .page__content {
padding-top: 0px;
}

ons-toolbar + .page__background + .page__content ons-tabbar > .tab-bar__status-bar-fill + .tab-bar--top__content {
top: 49px;
}

ons-toolbar + .page__background + .page__content ons-tabbar > .tab-bar__status-bar-fill + .tab-bar--top__content + .tab-bar--top {
padding-top: 0px;
}

ons-dialog[disabled] > .dialog,
ons-alert-dialog[disabled],
ons-popover[disabled] {
Expand Down
4 changes: 2 additions & 2 deletions core/elements/ons-page.es6
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ limitations under the License.
if(!util.hasAnyComponentAsParent(this)) {
this._show();
}

this._tryToFillStatusBar();
}

/**
Expand Down Expand Up @@ -217,8 +219,6 @@ limitations under the License.
fragment.appendChild(content);

this.appendChild(fragment);

this._tryToFillStatusBar();
}

_registerExtraElement(element) {
Expand Down
3 changes: 3 additions & 0 deletions core/elements/ons-tabbar.es6
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ limitations under the License.
* @param {Number} options.previousTabIndex
*/
_switchPage(element, options) {
if (this._hasTopTabbar()) {
element.setAttribute('no-status-bar-fill', '');
}

if (this.getActiveTabIndex() !== -1) {
var oldPageElement = this._oldPageElement || ons._internal.nullElement;
Expand Down

0 comments on commit 40aefea

Please sign in to comment.