Browse Source

Fixed sidemenu image being cut off on some devices

keplyx 4 years ago
parent
commit
32069f2b8c
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      components/Sidebar.js

+ 3
- 2
components/Sidebar.js View File

@@ -8,6 +8,7 @@ import CustomMaterialIcon from '../components/CustomMaterialIcon';
8 8
 import ThemeManager from "../utils/ThemeManager";
9 9
 
10 10
 const deviceHeight = Dimensions.get("window").height;
11
+const deviceWidth = Dimensions.get("window").width;
11 12
 
12 13
 const drawerCover = require("../assets/drawer-cover.png");
13 14
 
@@ -136,8 +137,8 @@ export default class SideBar extends React.Component<Props, State> {
136 137
 
137 138
 const styles = StyleSheet.create({
138 139
     drawerCover: {
139
-        height: deviceHeight / 5,
140
-        width: deviceHeight / 2.5,
140
+        height: deviceWidth / 3,
141
+        width: 2 * deviceWidth / 3,
141 142
         position: "relative",
142 143
         marginBottom: 10,
143 144
         marginTop: 20

Loading…
Cancel
Save