1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Dropdown fioxes

This commit is contained in:
Laurent Cozic 2017-11-19 00:23:18 +00:00
parent 37c0b6d24a
commit ca20a2a1c2
5 changed files with 13 additions and 8 deletions

View File

@ -64,8 +64,8 @@ class Dropdown extends React.Component {
height: 35,
// borderWidth: 1,
// borderColor: '#ccc',
paddingLeft: 20,
paddingRight: 20,
//paddingLeft: 20,
//paddingRight: 20,
flex: 1,
flexDirection: 'row',
alignItems: 'center',
@ -77,6 +77,7 @@ class Dropdown extends React.Component {
const headerArrowStyle = Object.assign({}, this.props.headerStyle ? this.props.headerStyle : {}, {
flex: 0,
marginRight: 10,
});
const itemStyle = Object.assign({}, this.props.itemStyle ? this.props.itemStyle : {}, {
@ -104,8 +105,8 @@ class Dropdown extends React.Component {
return (
<View style={{flex: 1, flexDirection: 'column' }}>
<TouchableOpacity style={headerWrapperStyle} ref={(ref) => this.headerRef_ = ref} onPress={() => { this.setState({ listVisible: true }) }}>
<Text ellipsizeMode="tail" numberOfLines={1} style={headerStyle}>{headerLabel}</Text>
<Text style={headerArrowStyle}>{'▼'}</Text>
<Text ellipsizeMode="tail" numberOfLines={1} style={headerStyle}>{headerLabel}</Text>
</TouchableOpacity>
<Modal transparent={true} visible={this.state.listVisible} onRequestClose={() => { closeList(); }} >
<TouchableWithoutFeedback onPressOut={() => { closeList() }}>

View File

@ -1,5 +1,5 @@
const React = require('react'); const Component = React.Component;
const { StyleSheet, TouchableHighlight } = require('react-native');
const { StyleSheet, View, TouchableHighlight } = require('react-native');
const Icon = require('react-native-vector-icons/Ionicons').default;
const styles = {
@ -55,7 +55,9 @@ class Checkbox extends Component {
alignItems: 'center',
};
if (style.display) thStyle.display = style.display;
if (style && style.display === 'none') return <View/>
//if (style.display) thStyle.display = style.display;
return (
<TouchableHighlight onPress={() => this.onPress()} style={thStyle}>

View File

@ -91,7 +91,7 @@ class NoteItemComponent extends Component {
const theme = themeStyle(this.props.theme);
// IOS: display: none crashes the app
let checkboxStyle = !isTodo ? { } : { color: theme.color };
let checkboxStyle = !isTodo ? { display: 'none' } : { color: theme.color };
if (isTodo) {
checkboxStyle.paddingRight = 10;

View File

@ -277,7 +277,7 @@ class ScreenHeaderComponent extends Component {
backgroundColor: theme.backgroundColor,
}}
headerStyle={{
color: theme.raisedColor,
color: theme.raisedHighlightedColor,
fontSize: theme.fontSize,
}}
itemStyle={{

View File

@ -35,6 +35,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
settingContainer: {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
borderBottomWidth: 1,
borderBottomColor: theme.dividerColor,
paddingTop: theme.marginTop,
@ -63,7 +64,8 @@ class ConfigScreenComponent extends BaseScreenComponent {
styles.switchSettingControl = Object.assign({}, styles.settingControl);
delete styles.switchSettingControl.color;
styles.switchSettingControl.width = '20%';
//styles.switchSettingControl.width = '20%';
styles.switchSettingControl.flex = 0;
this.styles_[themeId] = StyleSheet.create(styles);
return this.styles_[themeId];