Skip to content

Commit

Permalink
Improve message header sizes and touch areas
Browse files Browse the repository at this point in the history
Fixes zulip#242
  • Loading branch information
borisyankov committed Jan 27, 2017
1 parent 2991bc4 commit 72398cf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/message/headers/PrivateMessageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ const styles = StyleSheet.create({
},
private: {
flex: 1,
padding: 4,
padding: 8,
fontSize: 16,
color: 'white',
},
icon: {
padding: 6,
paddingLeft: 10,
padding: 10,
paddingLeft: 16,
}
});

Expand Down
16 changes: 6 additions & 10 deletions src/message/headers/StreamMessageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,24 @@ import { foregroundColorFromBackground } from '../../utils/color';

const styles = StyleSheet.create({
header: {
flex: 1,
flexDirection: 'row',
backgroundColor: '#eee',
overflow: 'hidden',
},
stream: {
padding: 6,
fontSize: 16,
},
topic: {
flex: 1,
padding: 4,
padding: 8,
fontSize: 16,
},
icon: {
padding: 6,
padding: 8,
paddingLeft: 10,
},
triangle: {
borderTopWidth: 15,
borderTopWidth: 18,
borderRightWidth: 0,
borderBottomWidth: 15,
borderLeftWidth: 15,
borderBottomWidth: 18,
borderLeftWidth: 18,
borderTopColor: 'transparent',
borderRightColor: 'transparent',
borderBottomColor: 'transparent',
Expand Down
10 changes: 6 additions & 4 deletions src/message/headers/TopicMessageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import { Touchable } from '../../common';
import { topicNarrow } from '../../utils/narrow';

const styles = StyleSheet.create({
touch: {
flex: 1,
},
topic: {
padding: 6,
paddingLeft: 8,
padding: 8,
fontSize: 16,
backgroundColor: '#eee',
},
Expand All @@ -34,8 +36,8 @@ export default class TopicMessageHeader extends React.PureComponent {
const { topic } = this.props;

return (
<Touchable onPress={this.performTopicNarrow}>
<Text style={styles.topic} numberOfLines={1}>
<Touchable style={styles.touch} onPress={this.performTopicNarrow}>
<Text style={styles.topic} numberOfLines={1} ellipsizeMode="tail">
{topic}
</Text>
</Touchable>
Expand Down

0 comments on commit 72398cf

Please sign in to comment.