From 18c6aa38e4067d3007c35638bc5a96905e4a9c40 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 15 Feb 2016 17:22:55 +0000 Subject: [PATCH 1/2] Styling and imgs to support new read_marker semantics Support for adding a new 'Scroll up' bar in react-sdk --- .../matrix-react-sdk/structures/RoomView.css | 30 +++--- .../views/rooms/TopUnreadMessagesBar.css | 44 +++++++++ src/skins/vector/img/scrollup.svg | 91 +++++++++++++++++++ 3 files changed, 154 insertions(+), 11 deletions(-) create mode 100644 src/skins/vector/css/matrix-react-sdk/views/rooms/TopUnreadMessagesBar.css create mode 100644 src/skins/vector/img/scrollup.svg diff --git a/src/skins/vector/css/matrix-react-sdk/structures/RoomView.css b/src/skins/vector/css/matrix-react-sdk/structures/RoomView.css index 071b0275..38455a73 100644 --- a/src/skins/vector/css/matrix-react-sdk/structures/RoomView.css +++ b/src/skins/vector/css/matrix-react-sdk/structures/RoomView.css @@ -95,12 +95,20 @@ limitations under the License. flex: 0 0 auto; } -.mx_RoomView_messagePanel { +.mx_RoomView_topUnreadMessagesBar { -webkit-box-ordinal-group: 3; -moz-box-ordinal-group: 3; -ms-flex-order: 3; -webkit-order: 3; order: 3; +} + +.mx_RoomView_messagePanel { + -webkit-box-ordinal-group: 4; + -moz-box-ordinal-group: 4; + -ms-flex-order: 4; + -webkit-order: 4; + order: 4; -webkit-flex: 1 1 0; flex: 1 1 0; @@ -180,11 +188,11 @@ hr.mx_RoomView_myReadMarker { } .mx_RoomView_statusArea { - -webkit-box-ordinal-group: 4; - -moz-box-ordinal-group: 4; - -ms-flex-order: 4; - -webkit-order: 4; - order: 4; + -webkit-box-ordinal-group: 5; + -moz-box-ordinal-group: 5; + -ms-flex-order: 5; + -webkit-order: 5; + order: 5; width: 100%; -webkit-flex: 0 0 auto; @@ -343,11 +351,11 @@ hr.mx_RoomView_myReadMarker { } .mx_RoomView .mx_MessageComposer { - -webkit-box-ordinal-group: 5; - -moz-box-ordinal-group: 5; - -ms-flex-order: 5; - -webkit-order: 5; - order: 5; + -webkit-box-ordinal-group: 6; + -moz-box-ordinal-group: 6; + -ms-flex-order: 6; + -webkit-order: 6; + order: 6; width: 100%; -webkit-flex: 0 0 auto; diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/TopUnreadMessagesBar.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/TopUnreadMessagesBar.css new file mode 100644 index 00000000..1fac3aea --- /dev/null +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/TopUnreadMessagesBar.css @@ -0,0 +1,44 @@ +/* +Copyright 2016 OpenMarket Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +.mx_TopUnreadMessagesBar { + max-width: 960px; + padding-top: 5px; + padding-bottom: 5px; + border-bottom: 1px solid #eee; +} + +.mx_TopUnreadMessagesBar_scrollUp { + display: inline; + cursor: pointer; +} + +.mx_TopUnreadMessagesBar_scrollUp img { + padding-left: 10px; + padding-right: 31px; + vertical-align: middle; +} + +.mx_TopUnreadMessagesBar_scrollUp span { + opacity: 0.5; +} + +.mx_TopUnreadMessagesBar_close { + float: right; + padding-right: 14px; + padding-top: 3px; + cursor: pointer; +} diff --git a/src/skins/vector/img/scrollup.svg b/src/skins/vector/img/scrollup.svg new file mode 100644 index 00000000..1692f2a6 --- /dev/null +++ b/src/skins/vector/img/scrollup.svg @@ -0,0 +1,91 @@ + + + + + + image/svg+xml + + + + + + + icon_newmessages + Created with Sketch. + + + + + + + + + + From 1a9125a886d188cd3b325b0660059c5d498781bd Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 15 Feb 2016 18:10:11 +0000 Subject: [PATCH 2/2] Fix horizontal alignment of top unread-messages bar --- .../css/matrix-react-sdk/views/rooms/TopUnreadMessagesBar.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/TopUnreadMessagesBar.css b/src/skins/vector/css/matrix-react-sdk/views/rooms/TopUnreadMessagesBar.css index 1fac3aea..35f68399 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/TopUnreadMessagesBar.css +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/TopUnreadMessagesBar.css @@ -14,7 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_TopUnreadMessagesBar { +.mx_TopUnreadMessagesBar { + margin: auto; /* centre horizontally */ max-width: 960px; padding-top: 5px; padding-bottom: 5px;