@@ -113,12 +113,18 @@ const messages = defineMessages({
113113 } ,
114114} ) ;
115115
116- const boxWidth = semiNormalize ( 150 ) ;
116+ // Try to make our boxes as wide as we can...
117+ let boxWidth = normalize ( 170 ) ;
118+ // ...and only start scaling them non-proportionally on the larger screen sizes,
119+ // so that we do 3-4 columns
120+ if ( Dimensions . get ( 'window' ) . width >= 1024 ) {
121+ boxWidth = semiNormalize ( 170 ) ;
122+ }
117123const boxMargin = 5 ;
118124
119125function listViewWidth ( ) {
120126 const fullBox = boxWidth + boxMargin ;
121- return Math . floor ( Dimensions . get ( 'window' ) . width / fullBox ) * fullBox - 20 ;
127+ return Math . floor ( Dimensions . get ( 'window' ) . width / fullBox ) * fullBox - 10 ;
122128}
123129
124130function sortedTutorials ( tutorials , language ) {
@@ -166,7 +172,6 @@ class _PlaylistStylesView extends React.Component {
166172 const durationSeconds = style . tutorials . reduce ( ( prev , current ) => prev + current . getDurationSeconds ( ) , 0 ) ;
167173 const length = formatDuration ( this . props . intl . formatMessage , durationSeconds ) ;
168174 let styleTitle = style . title ;
169- console . log ( style . title , style . titleMessage ) ;
170175 if ( style . titleMessage ) {
171176 styleTitle = this . props . intl . formatMessage ( style . titleMessage ) ;
172177 }
@@ -187,9 +192,9 @@ class _PlaylistStylesView extends React.Component {
187192 alignItems : 'center' ,
188193 } } >
189194 < Image source = { style . thumbnail } resizeMode = "contain" style = { { width : imageWidth , height : imageWidth } } />
190- < Text style = { { fontWeight : 'bold' } } > { styleTitle } </ Text >
191- < Text > { this . props . intl . formatMessage ( messages . numTutorials , { count : style . tutorials . length } ) } </ Text >
192- < Text > { this . props . intl . formatMessage ( messages . totalTime , { time : length } ) } </ Text >
195+ < Text style = { [ styles . boxTitle , styles . boxText ] } > { styleTitle } </ Text >
196+ < Text style = { styles . boxText } > { this . props . intl . formatMessage ( messages . numTutorials , { count : style . tutorials . length } ) } </ Text >
197+ < Text style = { styles . boxText } > { this . props . intl . formatMessage ( messages . totalTime , { time : length } ) } </ Text >
193198 </ View >
194199 </ TouchableHighlight > ;
195200 }
@@ -256,8 +261,8 @@ class _PlaylistListView extends React.Component {
256261 borderRadius : 10 ,
257262 } } >
258263 < Image source = { { uri : playlist . thumbnail } } resizeMode = "cover" style = { styles . thumbnail } />
259- < Text style = { { fontWeight : 'bold' } } > { title } </ Text >
260- < Text > { this . props . intl . formatMessage ( messages . numVideosWithDuration , { count : playlist . getVideoCount ( ) , duration} ) } </ Text >
264+ < Text style = { [ styles . boxTitle , styles . boxText ] } > { title } </ Text >
265+ < Text style = { styles . boxText } > { this . props . intl . formatMessage ( messages . numVideosWithDuration , { count : playlist . getVideoCount ( ) , duration} ) } </ Text >
261266 </ View >
262267 </ TouchableHighlight > ;
263268 }
@@ -575,13 +580,20 @@ let styles = StyleSheet.create({
575580 } ,
576581 thumbnail : {
577582 borderRadius : 10 ,
578- height : 100 ,
583+ height : semiNormalize ( 100 ) ,
579584 } ,
580585 listViewWrapper : {
581586 flex : 1 ,
582587 borderTopColor : 'black' ,
583588 borderTopWidth : 1 ,
584589 } ,
590+ boxTitle : {
591+ fontWeight : 'bold' ,
592+ } ,
593+ boxText : {
594+ fontSize : semiNormalize ( 14 ) ,
595+ lineHeight : normalize ( 22 ) ,
596+ } ,
585597 playlistListRow : {
586598 padding : 7 ,
587599 } ,
0 commit comments