TagSpaces is an offline, open source, document manager with tagging support
Fixing #1005 - wrong scrolling in the settings dialog
Ilian Sapundshiev537a62768af7
diff --git a/app/components/dialogs/GenericDialog.js b/app/components/dialogs/GenericDialog.jsindex fc8e55f5c..c87378dc3 100644--- a/app/components/dialogs/GenericDialog.js+++ b/app/components/dialogs/GenericDialog.js@@ -83,6 +83,7 @@ const GenericDialog = (props: Props) => {open={open}TransitionComponent={DialogTransition}keepMounted+ scroll="paper"onClose={onClose}onBackdropClick={onBackdropClick && onClose}// onEscapeKeyDown={onClose}diff --git a/app/components/dialogs/SettingsDialog.js b/app/components/dialogs/SettingsDialog.jsindex 8a18598ba..45b4d622c 100644--- a/app/components/dialogs/SettingsDialog.js+++ b/app/components/dialogs/SettingsDialog.js@@ -37,12 +37,11 @@ import SettingsFileTypes from '../settings/SettingsFileTypes';import i18n from '../../services/i18n';import { getSettings, actions } from '../../reducers/settings';import { extend } from '../../utils/misc';+import AppConfig from '../../config';const styles = theme => ({mainContent: {- minHeight: 50,- maxHeight: 600,- overflowY: 'hidden'+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay',}});@@ -88,10 +87,6 @@ class SettingsDialog extends React.Component<Props, State> {});};- renderTitle = () => (- <DialogTitle>{i18n.t('core:options')}</DialogTitle>- );-handleTabClick = (event, currentTab) => {this.setState({ currentTab });};@@ -183,6 +178,24 @@ class SettingsDialog extends React.Component<Props, State> {this.setState({ items: filteredItems }, () => this.saveFileTypes());};+ renderTitle = () => (+ <React.Fragment>+ <DialogTitle>{i18n.t('core:options')}</DialogTitle>+ <AppBar position="static" color="default">+ <Tabs+ value={this.state.currentTab}+ onChange={this.handleTabClick}+ indicatorColor="primary"+ variant="fullWidth"+ >+ <Tab data-tid="generalSettingsDialog" label={i18n.t('core:generalTab')} />+ <Tab data-tid="fileTypeSettingsDialog" label={i18n.t('core:fileTypeTab')} />+ <Tab data-tid="keyBindingsSettingsDialog" label={i18n.t('core:keyBindingsTab')} />+ </Tabs>+ </AppBar>+ </React.Fragment>+ );+renderContent = () => (<DialogContent className={this.props.classes.mainContent}>@@ -212,18 +225,6 @@ class SettingsDialog extends React.Component<Props, State> {className={this.props.classes.mainContent}ref={el => { this.settingsFileTypeRef = el; }}>- <AppBar position="static" color="default">- <Tabs- value={this.state.currentTab}- onChange={this.handleTabClick}- indicatorColor="primary"- variant="fullWidth"- >- <Tab data-tid="generalSettingsDialog" label={i18n.t('core:generalTab')} />- <Tab data-tid="fileTypeSettingsDialog" label={i18n.t('core:fileTypeTab')} />- <Tab data-tid="keyBindingsSettingsDialog" label={i18n.t('core:keyBindingsTab')} />- </Tabs>- </AppBar>{this.state.currentTab === 0 && (<SettingsGeneral />)}{this.state.currentTab === 1 && (<SettingsFileTypesdiff --git a/app/components/settings/SettingsFileTypes.js b/app/components/settings/SettingsFileTypes.jsindex bcd36aebd..c68c8de42 100644--- a/app/components/settings/SettingsFileTypes.js+++ b/app/components/settings/SettingsFileTypes.js@@ -37,10 +37,6 @@ import TransparentBackground from '../TransparentBackground';const styles = theme => ({root: {- width: '100%',- height: '100%',- maxHeight: 520,- overflowY: AppConfig.isFirefox ? 'auto' : 'overlay',background: theme.palette.background.paper},fileExtension: {diff --git a/app/components/settings/SettingsGeneral.js b/app/components/settings/SettingsGeneral.jsindex 5d0971a80..43c0be76e 100644--- a/app/components/settings/SettingsGeneral.js+++ b/app/components/settings/SettingsGeneral.js@@ -41,8 +41,6 @@ import TransparentBackground from '../TransparentBackground';const styles = theme => ({root: {- maxHeight: 500,- overflowY: AppConfig.isFirefox ? 'auto' : 'overlay'},pro: {backgroundColor: '#1DD19F'diff --git a/app/components/settings/SettingsKeyBindings.js b/app/components/settings/SettingsKeyBindings.jsindex ee10e0489..788b4b6d3 100644--- a/app/components/settings/SettingsKeyBindings.js+++ b/app/components/settings/SettingsKeyBindings.js@@ -35,16 +35,10 @@ import {} from '../../reducers/settings';import DefaultSettings from '../../reducers/settings-default';import { isStr } from '../../utils/misc';-import AppConfig from '../../config';const styles = theme => ({root: {- width: 550,- height: '100%',- overflowY: AppConfig.isFirefox ? 'auto' : 'overlay',- maxHeight: 520,- paddingTop: 15,- paddingBottom: 40,+background: theme.palette.background.paper},keyBinding: {