diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-18 10:58:48 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-18 10:58:48 -0600 |
commit | 69609d8732b67839c5be2a7463d52d8e0e707f6d (patch) | |
tree | cc4a6a8e1de48842dece0cde926b71c8b95d9062 /src | |
parent | ff68e5b85a3042d008a06cd3e9b2e760d8c159af (diff) | |
download | voidsky-69609d8732b67839c5be2a7463d52d8e0e707f6d.tar.zst |
Add min height to post text
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 5 | ||||
-rw-r--r-- | src/view/com/post/Post.tsx | 8 | ||||
-rw-r--r-- | src/view/com/posts/FeedItem.tsx | 5 | ||||
-rw-r--r-- | src/view/lib/styles.ts | 2 |
4 files changed, 16 insertions, 4 deletions
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 6c2f77030..fcfc99e7d 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -294,7 +294,7 @@ export const PostThreadItem = observer(function PostThreadItem({ <RichText text={record.text} entities={record.entities} - style={[styles.postText, s.f17, s['lh17-1.3']]} + style={[styles.postText]} /> </View> <PostCtrls @@ -361,6 +361,9 @@ const styles = StyleSheet.create({ }, postText: { fontFamily: 'Helvetica Neue', + fontSize: 17, + lineHeight: 22.1, // 1.3 of 17px + minHeight: 28, }, postTextContainer: { flexDirection: 'row', diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 3ed56ca1f..005ea8c7f 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -147,7 +147,7 @@ export const Post = observer(function Post({uri}: {uri: string}) { <RichText text={record.text} entities={record.entities} - style={[s.f16, s['lh16-1.3']]} + style={styles.postText} /> </View> <PostCtrls @@ -191,4 +191,10 @@ const styles = StyleSheet.create({ flexWrap: 'wrap', paddingBottom: 8, }, + postText: { + fontFamily: 'Helvetica Neue', + fontSize: 17, + lineHeight: 22.1, // 1.3 of 17px + minHeight: 28, + }, }) diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index ba3c32706..0458b0c9a 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -143,7 +143,7 @@ export const FeedItem = observer(function FeedItem({ <RichText text={record.text} entities={record.entities} - style={[s.f17, s['lh17-1.3']]} + style={styles.postText} /> </View> <PostCtrls @@ -199,5 +199,8 @@ const styles = StyleSheet.create({ }, postText: { fontFamily: 'Helvetica Neue', + fontSize: 17, + lineHeight: 22.1, // 1.3 of 17px + minHeight: 28, }, }) diff --git a/src/view/lib/styles.ts b/src/view/lib/styles.ts index 4bea6443c..8bb26ef88 100644 --- a/src/view/lib/styles.ts +++ b/src/view/lib/styles.ts @@ -85,7 +85,7 @@ export const s = StyleSheet.create({ ['lh16-1']: {lineHeight: 16}, ['lh16-1.3']: {lineHeight: 20.8}, // 1.3 of 16px ['lh17-1']: {lineHeight: 17}, - ['lh17-1.3']: {lineHeight: 22.1}, // 1.3 of 16px + ['lh17-1.3']: {lineHeight: 22.1}, // 1.3 of 17px ['lh18-1']: {lineHeight: 18}, ['lh18-1.3']: {lineHeight: 23.4}, // 1.3 of 18px |