Skip to content

Commit 12b1a23

Browse files
committed
fix viewport for tv
1 parent 3c8c9d6 commit 12b1a23

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

packages/app/index.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
<html>
33
<head>
44
<meta charset="UTF-8">
5-
<title><%= htmlWebpackPlugin.options.title %></title>
6-
<style>
5+
<meta name="viewport" content="width=1280, height=720, user-scalable=no" />
6+
<title>App</title>
7+
<style>
8+
body {
9+
width: 1280px;
10+
height: 720px;
11+
}
712
canvas {
8-
width: 100%;
9-
height: 100%;
13+
width: 1280px;
14+
height: 720px;
1015
position: absolute;
1116
top: 0;
1217
left: 0;
1318
}
1419
</style>
15-
</head>
1620
<body>
1721
<canvas id="root"></canvas>
1822
<script src="bundle.js"></script>

packages/app/src/Grid.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const styles = StyleSheet.create({
2727
top: 520,
2828
},
2929
image: {
30-
height: 328,
31-
width: 248,
30+
height: 228,
31+
width: 148,
3232
},
3333
});
3434

packages/app/src/Sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
withFocus,
99
} from '../../react-ape/reactApeEntry';
1010

11-
const {height} = Dimensions.get('screen');
11+
const {height} = Dimensions.get('window');
1212

1313
const styles = StyleSheet.create({
1414
sidebar: {

packages/app/src/Slideshow.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import {
77
StyleSheet,
88
} from '../../react-ape/reactApeEntry';
99

10-
const {width} = Dimensions.get('screen');
10+
const {width} = Dimensions.get('window');
1111

1212
const styles = StyleSheet.create({
1313
slideshow: {
1414
position: 'absolute',
1515
left: 280,
1616
top: 0,
1717
backgroundColor: '#080808',
18-
width: width,
18+
width: width - 280,
1919
height: 420,
2020
overflow: 'hidden',
2121
},

0 commit comments

Comments
 (0)