fix(rn,filmstrip) simplify thumbnail height calculations
This commit is contained in:
parent
57ecdff9eb
commit
fc27300132
|
@ -241,6 +241,8 @@ class TileView extends Component<Props> {
|
|||
aspectRatio: TILE_ASPECT_RATIO,
|
||||
flex: 0,
|
||||
height: this._getTileDimensions().height,
|
||||
maxHeight: null,
|
||||
maxWidth: null,
|
||||
width: null
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
|
||||
import { ColorPalette } from '../../../base/styles';
|
||||
import { FILMSTRIP_SIZE } from '../../constants';
|
||||
import { SMALL_THUMBNAIL_SIZE } from '../../constants';
|
||||
|
||||
/**
|
||||
* Size for the Avatar.
|
||||
|
@ -33,7 +33,7 @@ export default {
|
|||
flexDirection: 'row',
|
||||
flexGrow: 0,
|
||||
justifyContent: 'flex-end',
|
||||
height: FILMSTRIP_SIZE
|
||||
marginBottom: 5
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -88,12 +88,14 @@ export default {
|
|||
borderStyle: 'solid',
|
||||
borderWidth: 1,
|
||||
flex: 1,
|
||||
height: 80,
|
||||
height: SMALL_THUMBNAIL_SIZE,
|
||||
justifyContent: 'center',
|
||||
margin: 2,
|
||||
maxHeight: SMALL_THUMBNAIL_SIZE,
|
||||
maxWidth: SMALL_THUMBNAIL_SIZE,
|
||||
overflow: 'hidden',
|
||||
position: 'relative',
|
||||
width: 80
|
||||
width: SMALL_THUMBNAIL_SIZE
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
// @flow
|
||||
|
||||
import { BoxModel } from '../base/styles';
|
||||
|
||||
/**
|
||||
* The size (height and width) of the small (not tile view) thumbnails.
|
||||
*/
|
||||
export const SMALL_THUMBNAIL_SIZE = 80;
|
||||
|
||||
/**
|
||||
* The height of the filmstrip in narrow aspect ratio, or width in wide.
|
||||
*/
|
||||
export const FILMSTRIP_SIZE = 90;
|
||||
export const FILMSTRIP_SIZE = SMALL_THUMBNAIL_SIZE + BoxModel.margin;
|
||||
|
||||
/**
|
||||
* The aspect ratio of a tile in tile view.
|
||||
|
|
Loading…
Reference in New Issue