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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -100,7 +100,7 @@
// Release details
// These are automatically injected to built HTML
var build = "1592960481";
var build = "1593875565";
var version = "3.50.0";
// Construct the script tag

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>

View File

@ -66,6 +66,10 @@ body {
}
}
.hide-scrollbars * ::-webkit-scrollbar {
display: none;
}
.smooth-scroll {
&.smooth-scrolling-enabled,
.smooth-scrolling-enabled & {