Add hide scrollbars option

This commit is contained in:
PJ Evans
2020-07-04 16:43:07 +01:00
parent 850c69cea1
commit 90acaccc52
6 changed files with 22 additions and 3 deletions

View File

@ -222,6 +222,9 @@ export class App extends React.Component {
} else {
className += ' notouch';
}
if (this.props.hide_scrollbars) {
className += ' hide-scrollbars';
}
return (
<div className={className}>
@ -368,6 +371,7 @@ export class App extends React.Component {
const mapStateToProps = (state, ownProps) => ({
theme: state.ui.theme,
wide_scrollbar_enabled: state.ui.wide_scrollbar_enabled,
hide_scrollbars: state.ui.hide_scrollbars,
smooth_scrolling_enabled: state.ui.smooth_scrolling_enabled,
hotkeys_enabled: state.ui.hotkeys_enabled,
allow_reporting: state.ui.allow_reporting,

View File

@ -280,6 +280,17 @@ class Settings extends React.Component {
Use wide scrollbars
</span>
</label>
<label>
<input
type="checkbox"
name="hide_scrollbars"
checked={ui.hide_scrollbars}
onChange={(e) => uiActions.set({ hide_scrollbars: !ui.hide_scrollbars })}
/>
<span className="label">
Hide scrollbars
</span>
</label>
</div>
</div>