Commit aaa60bab authored by yoshiki@chromium.org's avatar yoshiki@chromium.org

[Files.app] Minor UI fixes in Sugget app dialog

Changes:
- Change the height of the title to 44px.
- Set the widget container as same size as the widget.
- Add gray borders at the top and bottom of the widget container.
- Fix the padding of the "See more.." text on the bottom.

BUG=240152
TEST=test manually

Review URL: https://chromiumcodereview.appspot.com/23484006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220514 0039d316-1c4b-4281-b951-d872f2087c98
parent 04f87156
...@@ -1849,16 +1849,17 @@ menuitem#thumbnail-view[lead]:not([disabled]) { ...@@ -1849,16 +1849,17 @@ menuitem#thumbnail-view[lead]:not([disabled]) {
width: auto; width: auto;
} }
#suggest-app-dialog #suggested-app-list {
-webkit-box-orient: vertical;
display: -webkit-box;
width: 450px;
}
#suggest-app-dialog .cr-dialog-title { #suggest-app-dialog .cr-dialog-title {
/* Entire height: 44px (content-box 22px + padding 11px * 2) */
font-size: 16px; font-size: 16px;
height: 18px; height: 22px;
padding: 10px 18px; margin: 0;
padding: 11px 18px;
}
#suggest-app-dialog #webview-container {
border-bottom: solid 2px #bbb;
border-top: solid 2px #bbb;
} }
#suggest-app-dialog .cr-dialog-buttons, #suggest-app-dialog .cr-dialog-buttons,
...@@ -1874,7 +1875,10 @@ menuitem#thumbnail-view[lead]:not([disabled]) { ...@@ -1874,7 +1875,10 @@ menuitem#thumbnail-view[lead]:not([disabled]) {
} }
#suggest-app-dialog #buttons > #webstore-button { #suggest-app-dialog #buttons > #webstore-button {
-webkit-padding-start: 32px; -webkit-padding-after: 10px;
-webkit-padding-before: 10px;
-webkit-padding-end: 10px;
-webkit-padding-start: 36px;
background-image: -webkit-image-set( background-image: -webkit-image-set(
url('chrome://theme/IDR_WEBSTORE_ICON_16') 1x, url('chrome://theme/IDR_WEBSTORE_ICON_16') 1x,
url('chrome://theme/IDR_WEBSTORE_ICON_16@2x') 2x); url('chrome://theme/IDR_WEBSTORE_ICON_16@2x') 2x);
...@@ -1884,7 +1888,6 @@ menuitem#thumbnail-view[lead]:not([disabled]) { ...@@ -1884,7 +1888,6 @@ menuitem#thumbnail-view[lead]:not([disabled]) {
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
height: 16px; height: 16px;
padding: 10px;
} }
.cr-dialog-frame.error-dialog-frame { .cr-dialog-frame.error-dialog-frame {
......
...@@ -77,7 +77,7 @@ function SuggestAppsDialog(parentNode) { ...@@ -77,7 +77,7 @@ function SuggestAppsDialog(parentNode) {
this.frame_.id = 'suggest-app-dialog'; this.frame_.id = 'suggest-app-dialog';
this.webviewContainer_ = this.document_.createElement('div'); this.webviewContainer_ = this.document_.createElement('div');
this.webviewContainer_.id = 'app-list'; this.webviewContainer_.id = 'webview-container';
this.frame_.insertBefore(this.webviewContainer_, this.text_.nextSibling); this.frame_.insertBefore(this.webviewContainer_, this.text_.nextSibling);
this.buttons_ = this.document_.createElement('div'); this.buttons_ = this.document_.createElement('div');
...@@ -215,17 +215,20 @@ SuggestAppsDialog.prototype.show = function(extension, mime, onDialogClosed) { ...@@ -215,17 +215,20 @@ SuggestAppsDialog.prototype.show = function(extension, mime, onDialogClosed) {
this.webviewContainer_.innerHTML = this.webviewContainer_.innerHTML =
'<webview id="cws-widget" partition="persist:cwswidgets"></webview>'; '<webview id="cws-widget" partition="persist:cwswidgets"></webview>';
var webView = this.container_.querySelector('#cws-widget'); this.webviewContainer_.style.width = WEBVIEW_WIDTH + 'px';
webView.style.width = WEBVIEW_WIDTH + 'px'; this.webviewContainer_.style.height = WEBVIEW_HEIGHT + 'px';
webView.style.height = WEBVIEW_HEIGHT + 'px';
webView.request.onBeforeSendHeaders.addListener( var webview = this.container_.querySelector('#cws-widget');
webview.style.width = WEBVIEW_WIDTH + 'px';
webview.style.height = WEBVIEW_HEIGHT + 'px';
webview.request.onBeforeSendHeaders.addListener(
this.authorizeRequest_.bind(this), this.authorizeRequest_.bind(this),
{urls: [this.widgetOrigin_ + '/*']}, {urls: [this.widgetOrigin_ + '/*']},
['blocking', 'requestHeaders']); ['blocking', 'requestHeaders']);
webView.focus(); webview.focus();
this.webviewClient_ = new CWSContainerClient( this.webviewClient_ = new CWSContainerClient(
webView, webview,
extension, mime, extension, mime,
WEBVIEW_WIDTH, WEBVIEW_HEIGHT, WEBVIEW_WIDTH, WEBVIEW_HEIGHT,
this.widgetUrl_, this.widgetOrigin_); this.widgetUrl_, this.widgetOrigin_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment