From f586aaab358004217ecc7071c0acf77c60605e19 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 28 Mar 2020 00:51:01 +0000 Subject: [PATCH] Fix ugly scrollbars in TabbedView (settings), emojipicker and widgets Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/TabbedView.tsx | 5 +++-- src/components/views/emojipicker/EmojiPicker.js | 5 +++-- src/components/views/rooms/AuxPanel.js | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/structures/TabbedView.tsx b/src/components/structures/TabbedView.tsx index ea485acc1a..c0e0e58db8 100644 --- a/src/components/structures/TabbedView.tsx +++ b/src/components/structures/TabbedView.tsx @@ -20,6 +20,7 @@ import * as React from "react"; import {_t} from '../../languageHandler'; import * as PropTypes from "prop-types"; import * as sdk from "../../index"; +import AutoHideScrollbar from './AutoHideScrollbar'; import { ReactNode } from "react"; /** @@ -113,9 +114,9 @@ export default class TabbedView extends React.Component { private _renderTabPanel(tab: Tab): React.ReactNode { return (
-
+ {tab.body} -
+
); } diff --git a/src/components/views/emojipicker/EmojiPicker.js b/src/components/views/emojipicker/EmojiPicker.js index ca8f0c0565..cacc15a5f9 100644 --- a/src/components/views/emojipicker/EmojiPicker.js +++ b/src/components/views/emojipicker/EmojiPicker.js @@ -22,6 +22,7 @@ import { _t } from '../../../languageHandler'; import * as recent from '../../../emojipicker/recent'; import {DATA_BY_CATEGORY, getEmojiFromUnicode} from "../../../emoji"; +import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; export const CATEGORY_HEADER_HEIGHT = 22; export const EMOJI_HEIGHT = 37; @@ -214,7 +215,7 @@ class EmojiPicker extends React.Component {
-
+ this.bodyRef.current = e} onScroll={this.onScroll}> {this.categories.map(category => { const emojis = this.memoizedDataByCategory[category.id]; const categoryElement = ( + {this.state.previewEmoji || !this.props.showQuickReactions ? : } diff --git a/src/components/views/rooms/AuxPanel.js b/src/components/views/rooms/AuxPanel.js index 0b34739e0e..e102b0dba4 100644 --- a/src/components/views/rooms/AuxPanel.js +++ b/src/components/views/rooms/AuxPanel.js @@ -27,6 +27,7 @@ import { _t } from '../../../languageHandler'; import classNames from 'classnames'; import RateLimitedFunc from '../../../ratelimitedfunc'; import SettingsStore from "../../../settings/SettingsStore"; +import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; export default createReactClass({ @@ -264,14 +265,14 @@ export default createReactClass({ } return ( -
+ { stateViews } { appsDrawer } { fileDropTarget } { callView } { conferenceCallNotification } { this.props.children } -
+ ); }, });