Skip to content

Commit

Permalink
Input: Fix text color in landscape orientation in nightmode.
Browse files Browse the repository at this point in the history
In landscape orientation in night mode,the color of text written in
`<TextInput>` was too much transparent to be viewed properly.
Applied a different shade of previous color to fix it.

Fixes: zulip#4480
Signed-off-by: rajprakash00 <[email protected]>
  • Loading branch information
rajprakash00 committed Feb 18, 2021
1 parent 562f79c commit fe70b9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Input extends PureComponent<Props, State> {

return (
<TextInput
style={[this.styles.input, { color: this.context.color }, style]}
style={[this.styles.input, { color: this.context.textColor }, style]}
placeholder={_(fullPlaceholder.text, fullPlaceholder.values)}
placeholderTextColor={HALF_COLOR}
underlineColorAndroid={isFocused ? BORDER_COLOR : HALF_COLOR}
Expand Down
3 changes: 3 additions & 0 deletions src/styles/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { ThemeName } from '../reduxTypes';

export type ThemeData = {|
color: string,
textColor: string,
backgroundColor: string,
cardColor: string,
dividerColor: string,
Expand All @@ -14,6 +15,7 @@ export type ThemeData = {|
export const themeData: { [name: ThemeName | 'light']: ThemeData } = {
night: {
color: 'hsl(210, 11%, 85%)',
textColor: 'hsl(200, 11%, 65%)',
backgroundColor: 'hsl(212, 28%, 18%)',
cardColor: 'hsl(212, 31%, 21%)',
// Dividers follow Material Design: opacity 12% black or 12% white.
Expand All @@ -22,6 +24,7 @@ export const themeData: { [name: ThemeName | 'light']: ThemeData } = {
},
light: {
color: 'hsl(0, 0%, 20%)',
textColor: 'hsl(0, 0%, 20%)',
backgroundColor: 'white',
cardColor: 'hsl(0, 0%, 97%)',
// Dividers follow Material Design: opacity 12% black or 12% white.
Expand Down

0 comments on commit fe70b9a

Please sign in to comment.