From 234ca8b062f088f23a2f50d508d2a20056a73c79 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Thu, 8 Feb 2018 17:50:30 +0000 Subject: [PATCH] Remove top padding from app tile. --- src/ScalarMessaging.js | 1 - src/components/structures/ContextualMenu.js | 4 ++++ src/components/views/rooms/Stickerpack.js | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ScalarMessaging.js b/src/ScalarMessaging.js index 3d585108dd..ac68d1a2d2 100644 --- a/src/ScalarMessaging.js +++ b/src/ScalarMessaging.js @@ -336,7 +336,6 @@ function setWidget(event, roomId) { if (userWidget) { console.warn('Adding user widget'); const client = MatrixClientPeg.get(); - // client.setAccountData('m.widgets', {}); const userWidgets = client.getAccountData('m.widgets').getContent() || {}; // Delete existing widget with ID diff --git a/src/components/structures/ContextualMenu.js b/src/components/structures/ContextualMenu.js index 7ec078f739..3c23e0ceae 100644 --- a/src/components/structures/ContextualMenu.js +++ b/src/components/structures/ContextualMenu.js @@ -134,6 +134,10 @@ module.exports = { menuStyle["backgroundColor"] = props.menuColour; } + if (!isNaN(Number(props.menuPaddingTop))) { + menuStyle["paddingTop"] = props.menuPaddingTop; + } + // FIXME: If a menu uses getDefaultProps it clobbers the onFinished // property set here so you can't close the menu from a button click! const menu = ( diff --git a/src/components/views/rooms/Stickerpack.js b/src/components/views/rooms/Stickerpack.js index e04098a06b..24bd44c3d3 100644 --- a/src/components/views/rooms/Stickerpack.js +++ b/src/components/views/rooms/Stickerpack.js @@ -175,6 +175,7 @@ export default class Stickerpack extends React.Component { menuHeight: this.popoverHeight, element: this.state.stickersContent, onFinished: this.onFinished, + menuPaddingTop: 0, });