1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Mobile: Fixed tag box styling in dark theme

This commit is contained in:
Laurent Cozic
2018-03-26 17:52:49 +00:00
parent 067455542f
commit f8310ba0d5
4 changed files with 66 additions and 23 deletions

View File

@@ -65,7 +65,7 @@ class NoteTagsDialogComponent extends React.Component {
return (
<TouchableOpacity key={tag.id} onPress={() => this.tag_press(tag.id)} style={this.styles().tag}>
<View style={this.styles().tagIconText}>
<Icon name={iconName} style={this.styles().tagCheckbox}/><Text>{tag.title}</Text>
<Icon name={iconName} style={this.styles().tagCheckbox}/><Text style={this.styles().tagText}>{tag.title}</Text>
</View>
</TouchableOpacity>
);
@@ -114,7 +114,6 @@ class NoteTagsDialogComponent extends React.Component {
tagListData.sort((a, b) => {
return naturalCompare.caseInsensitive(a.title, b.title);
//return a.title.toLowerCase() < b.title.toLowerCase() ? -1 : +1;
});
this.setState({ tagListData: tagListData });
@@ -137,9 +136,11 @@ class NoteTagsDialogComponent extends React.Component {
flexDirection: 'row',
alignItems: 'center',
},
tagText: Object.assign({}, theme.normalText),
tagCheckbox: {
marginRight: 5,
marginRight: 8,
fontSize: 20,
color: theme.color,
},
newTagBox: {
flexDirection:'row',
@@ -149,6 +150,8 @@ class NoteTagsDialogComponent extends React.Component {
borderBottomWidth: 1,
borderBottomColor: theme.dividerColor
},
newTagBoxLabel: Object.assign({}, theme.normalText, { marginRight: 8 }),
newTagBoxInput: Object.assign({}, theme.lineInput, { flex: 1 }),
};
this.styles_[themeId] = StyleSheet.create(styles);
@@ -161,7 +164,7 @@ class NoteTagsDialogComponent extends React.Component {
const dialogContent = (
<View style={{flex:1}}>
<View style={this.styles().newTagBox}>
<Text>{_('New tags:')}</Text><TextInput value={this.state.newTags} onChangeText={value => { this.setState({ newTags: value }) }} style={{flex:1}}/>
<Text style={this.styles().newTagBoxLabel}>{_('New tags:')}</Text><TextInput value={this.state.newTags} onChangeText={value => { this.setState({ newTags: value }) }} style={this.styles().newTagBoxInput}/>
</View>
<FlatList
data={this.state.tagListData}