From 0c42e51c8f54bf3dddd9d2c9b86bbe2830ed1a24 Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Tue, 3 Sep 2013 13:54:15 -0700 Subject: [PATCH] Improve welcome dialog support for large fonts Objective: * Make the welcome dialog work with smaller fonts by increasing its size a bit, and also making its contents scroll vertically if needed Changes: ve.ui.MWBetaWelcomeDialog.js * Move content into a scrollable and padded panel layout element ve.ui.MWDialog.css * Remove padding, now provided by panel layout ve.ui.Dialog.css * Remove min-height override, inherited value is fine * Use max width and height instead of setting them directly Bug: 52667 Change-Id: Ie35b041e13ef18ffcacef6d9e70439e4e1351e0a --- .../ui/dialogs/ve.ui.MWBetaWelcomeDialog.js | 16 +++++++++------- modules/ve-mw/ui/styles/ve.ui.MWDialog.css | 1 - modules/ve/ui/styles/ve.ui.Dialog.css | 5 ++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js index dd7af301c7..2ae5d8fefd 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWBetaWelcomeDialog.js @@ -43,12 +43,11 @@ ve.ui.MWBetaWelcomeDialog.prototype.initialize = function () { ve.ui.MWDialog.prototype.initialize.call( this ); // Properties - this.$content = this.$$( '
' ) - .addClass( 've-ui-mwBetaWelcomeDialog-content' ) - .text( - ve.msg( 'visualeditor-dialog-beta-welcome-content', $( '#ca-edit' ).text() ) - ); - + this.contentLayout = new ve.ui.PanelLayout( { + '$$': this.frame.$$, + 'scrollable': true, + 'padded': true + } ); this.continueButton = new ve.ui.ButtonWidget( { '$$': this.$$, 'label': ve.msg( 'visualeditor-dialog-beta-welcome-action-continue' ), @@ -59,7 +58,10 @@ ve.ui.MWBetaWelcomeDialog.prototype.initialize = function () { this.continueButton.connect( this, { 'click': [ 'close', 'close' ] } ); // Initialization - this.$body.append( this.$content ); + this.contentLayout.$ + .addClass( 've-ui-mwBetaWelcomeDialog-content' ) + .text( ve.msg( 'visualeditor-dialog-beta-welcome-content', $( '#ca-edit' ).text() ) ); + this.$body.append( this.contentLayout.$ ); this.$foot.append( this.continueButton.$ ); }; diff --git a/modules/ve-mw/ui/styles/ve.ui.MWDialog.css b/modules/ve-mw/ui/styles/ve.ui.MWDialog.css index 89f68de95a..e7e1521119 100644 --- a/modules/ve-mw/ui/styles/ve.ui.MWDialog.css +++ b/modules/ve-mw/ui/styles/ve.ui.MWDialog.css @@ -75,7 +75,6 @@ /* ve.ui.MWBetaWelcomeDialog */ .ve-ui-mwBetaWelcomeDialog-content { - padding: 1.5em; line-height: 1.5em; font-size: 1.1em; } diff --git a/modules/ve/ui/styles/ve.ui.Dialog.css b/modules/ve/ui/styles/ve.ui.Dialog.css index 2b6c15acfe..22d08f9a9d 100644 --- a/modules/ve/ui/styles/ve.ui.Dialog.css +++ b/modules/ve/ui/styles/ve.ui.Dialog.css @@ -53,9 +53,8 @@ } .ve-ui-dialog .ve-ui-window-frame.ve-ui-window-frame-small { - width: 600px; - min-height: 200px; - height: 280px; + max-width: 600px; + max-height: 300px; } .ve-ui-dialog-closing .ve-ui-window-frame {