mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Expose statusBarStyle on page (#4021)
This commit is contained in:
committed by
Hristo Hristov
parent
9e3222781a
commit
5457424766
@@ -35,7 +35,6 @@ export class PageBase extends ContentView implements PageDefinition {
|
||||
public actionBarHidden: boolean;
|
||||
public enableSwipeBackNavigation: boolean;
|
||||
public backgroundSpanUnderStatusBar: boolean;
|
||||
public statusBarStyle: "light" | "dark";
|
||||
public androidStatusBarBackground: Color;
|
||||
|
||||
constructor() {
|
||||
@@ -77,6 +76,13 @@ export class PageBase extends ContentView implements PageDefinition {
|
||||
}
|
||||
}
|
||||
|
||||
get statusBarStyle(): "light" | "dark" {
|
||||
return this.style.statusBarStyle;
|
||||
}
|
||||
set statusBarStyle(value: "light" | "dark") {
|
||||
this.style.statusBarStyle = value;
|
||||
}
|
||||
|
||||
get page(): PageDefinition {
|
||||
return this;
|
||||
}
|
||||
|
||||
4
tns-core-modules/ui/page/page.d.ts
vendored
4
tns-core-modules/ui/page/page.d.ts
vendored
@@ -5,7 +5,7 @@
|
||||
*/ /** */
|
||||
|
||||
///<reference path="../../tns-core-modules.d.ts" /> Include global typings
|
||||
import { ContentView, EventData, Property, Color } from "../content-view";
|
||||
import { ContentView, EventData, Property, Color, CssProperty, Style } from "../content-view";
|
||||
import { Frame } from "../frame";
|
||||
import { ActionBar } from "../action-bar";
|
||||
import { KeyframeAnimationInfo } from "../animation/keyframe-animation";
|
||||
@@ -286,7 +286,7 @@ export const enableSwipeBackNavigationProperty: Property<Page, boolean>;
|
||||
/**
|
||||
* Property backing statusBarStyle.
|
||||
*/
|
||||
export const statusBarStyleProperty: Property<Page, "light" | "dark">;
|
||||
export const statusBarStyleProperty: CssProperty<Style, "light" | "dark">;
|
||||
|
||||
/**
|
||||
* Property backing androidStatusBarBackground.
|
||||
|
||||
2
tns-core-modules/ui/styling/style/style.d.ts
vendored
2
tns-core-modules/ui/styling/style/style.d.ts
vendored
@@ -131,7 +131,7 @@ export class Style extends Observable {
|
||||
public selectedBackgroundColor: Color;
|
||||
|
||||
// Page-specific props
|
||||
public statusBarStyle: string;
|
||||
public statusBarStyle: "light" | "dark";
|
||||
public androidStatusBarBackground: Color;
|
||||
|
||||
constructor(ownerView: ViewBase);
|
||||
|
||||
@@ -99,7 +99,7 @@ export class Style extends Observable implements StyleDefinition {
|
||||
public selectedBackgroundColor: Color;
|
||||
|
||||
// Page-specific props
|
||||
public statusBarStyle: string;
|
||||
public statusBarStyle: "light" | "dark";
|
||||
public androidStatusBarBackground: Color;
|
||||
|
||||
//flexbox layout properties
|
||||
|
||||
Reference in New Issue
Block a user