Skip to content

Commit

Permalink
Match navbar to the backgroundColor
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler committed Oct 27, 2023
1 parent de9a5c4 commit 344841d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
16 changes: 8 additions & 8 deletions Android/app/default/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,52 +20,52 @@
"filters": [
{
"filterType": "ABI",
"value": "x86"
"value": "x86_64"
}
],
"attributes": [],
"versionCode": 185,
"versionName": "1.8.5",
"outputFile": "app-default-x86-release.apk"
"outputFile": "app-default-x86_64-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86_64"
"value": "armeabi-v7a"
}
],
"attributes": [],
"versionCode": 185,
"versionName": "1.8.5",
"outputFile": "app-default-x86_64-release.apk"
"outputFile": "app-default-armeabi-v7a-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "armeabi-v7a"
"value": "arm64-v8a"
}
],
"attributes": [],
"versionCode": 185,
"versionName": "1.8.5",
"outputFile": "app-default-armeabi-v7a-release.apk"
"outputFile": "app-default-arm64-v8a-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "arm64-v8a"
"value": "x86"
}
],
"attributes": [],
"versionCode": 185,
"versionName": "1.8.5",
"outputFile": "app-default-arm64-v8a-release.apk"
"outputFile": "app-default-x86-release.apk"
}
],
"elementType": "File"
Expand Down
4 changes: 1 addition & 3 deletions Website/src/activitys/PicturePreviewActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ const PicturePreviewActivity = () => {
return (
<Page
modifier="noshadow"
backgroundStyle={{
backgroundColor: "black",
}}
backgroundStyle="#000000"
renderToolbar={renderToolbar}
>
<TransformWrapper>
Expand Down
4 changes: 1 addition & 3 deletions Website/src/activitys/TerminalActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ const TerminalActivity = () => {
onShow={install}
modifier="noshadow"
renderToolbar={renderToolbar}
backgroundStyle={{
backgroundColor: "black",
}}
backgroundStyle="#000000"
>
<div
ref={ref}
Expand Down
13 changes: 11 additions & 2 deletions Website/src/components/onsenui/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface NativeUIColors {

interface HTMLPage {
sx?: SxProps;
backgroundStyle?: React.CSSProperties;
backgroundStyle?: React.CSSProperties["backgroundColor"];
modifier?: string;
renderModal?: RenderFunction;
renderToolbar?: RenderFunction;
Expand All @@ -40,10 +40,19 @@ const _Page = React.forwardRef<HTMLElement, HTMLPage>((props, ref) => {
const { context } = useActivity();
const { renderToolbar, renderBottomToolbar, renderModal, renderFixed, sx, children, ...rest } = props;

React.useEffect(() => {
if (props.backgroundStyle) {
os.setNavigationBarColor(props.backgroundStyle);
return () => {
os.setNavigationBarColor(theme.palette.background.default);
};
}
}, [props.backgroundStyle]);

return (
<HTMLPage {...rest} ref={ref}>
{renderToolbar && renderToolbar(ref, context)}
<Box className="page__background" sx={props.backgroundStyle}></Box>
<Box className="page__background" sx={{ backgroundColor: props.backgroundStyle }}></Box>
<Box className="page__content" sx={sx}>
{children}
</Box>
Expand Down

0 comments on commit 344841d

Please sign in to comment.