Simplify settings dialog CSS

Stop the settings dialogs from requiring special styles on the
mx_Dialog which required passing in a classname from anywhere the
settings dialogs were opened (although this still requires
static=true). Some of the things have now been adopted for all dialogs
(border-radius), others have been moved to within the dialog content.
This commit is contained in:
David Baker 2019-04-08 16:48:42 +01:00
parent de4788a3d5
commit 670f6e4f99
4 changed files with 28 additions and 36 deletions

View file

@ -14,14 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
.mx_SettingsDialog { // Not actually a component but things shared by settings components
.mx_Dialog { .mx_UserSettingsDialog, .mx_RoomSettingsDialog {
height: 80%;
border-radius: 4px;
padding-top: 0;
padding-right: 30px;
padding-left: 0;
.mx_TabbedView { .mx_TabbedView {
top: 65px; top: 65px;
} }
@ -38,13 +32,11 @@ limitations under the License.
.mx_Dialog_title { .mx_Dialog_title {
text-align: center; text-align: center;
margin-top: 16px;
margin-bottom: 24px; margin-bottom: 24px;
} }
.mx_Dialog_fixedWidth {
max-width: 1000px; max-width: 1000px;
width: 90vw; width: 90vw;
} // set the height too since tabbed view scrolls itself.
} height: 80vh;
} }

View file

@ -597,8 +597,8 @@ export default React.createClass({
break; break;
case 'view_user_settings': { case 'view_user_settings': {
const UserSettingsDialog = sdk.getComponent("dialogs.UserSettingsDialog"); const UserSettingsDialog = sdk.getComponent("dialogs.UserSettingsDialog");
Modal.createTrackedDialog('User settings', '', UserSettingsDialog, {}, 'mx_SettingsDialog', Modal.createTrackedDialog('User settings', '', UserSettingsDialog, {},
/*isPriority=*/false, /*isStatic=*/true); /*className*/null, /*isPriority=*/false, /*isStatic=*/true);
// View the welcome or home page if we need something to look at // View the welcome or home page if we need something to look at
this._viewSomethingBehindModal(); this._viewSomethingBehindModal();

View file

@ -120,7 +120,7 @@ class RoomViewStore extends Store {
const RoomSettingsDialog = sdk.getComponent("dialogs.RoomSettingsDialog"); const RoomSettingsDialog = sdk.getComponent("dialogs.RoomSettingsDialog");
Modal.createTrackedDialog('Room settings', '', RoomSettingsDialog, { Modal.createTrackedDialog('Room settings', '', RoomSettingsDialog, {
roomId: payload.room_id || this._state.roomId, roomId: payload.room_id || this._state.roomId,
}, 'mx_SettingsDialog', /*isPriority=*/false, /*isStatic=*/true); }, /*className*/null, /*isPriority=*/false, /*isStatic=*/true);
break; break;
} }
} }