Commit a932a6ba authored by Jeremy Chinsen's avatar Jeremy Chinsen Committed by Commit Bot

Revert "cros: Replace custom header for wallpaper picker with default."

This reverts commit db70952d.

Reason for revert: Caused a regression in preview (bug: 1112747)

Original change's description:
> cros: Replace custom header for wallpaper picker with default.
> 
> Currently the wallpaper picker uses a customer header that lacks a
> maximize button. However, the wallpaper picker is resizeable and can be
> maximized. To make the wallpaper picker consistent with similar apps,
> replaced custom header with the default.
> 
> Test: manual
> Bug: 1096274
> Change-Id: If7d31b2ef53c782b05d361b8147554736742726f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316152
> Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
> Commit-Queue: Jeremy Chinsen <chinsenj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#791553}

TBR=xdai@chromium.org,chinsenj@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1096274
Change-Id: I06a800ead6cd20a22e4a1f222b90ff681b1d0491
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2341750Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Jeremy Chinsen <chinsenj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795627}
parent 11a5186a
...@@ -336,6 +336,11 @@ body:not([surprise-me-disabled]) [visibleif~='surprise-me-disabled'] { ...@@ -336,6 +336,11 @@ body:not([surprise-me-disabled]) [visibleif~='surprise-me-disabled'] {
content: url(../images/ui/remember.png); content: url(../images/ui/remember.png);
} }
#dialog-header {
display: flex;
height: 40px;
}
.dialog-body { .dialog-body {
display: flex; display: flex;
height: 100%; height: 100%;
...@@ -383,6 +388,31 @@ body:not([surprise-me-disabled]) [visibleif~='surprise-me-disabled'] { ...@@ -383,6 +388,31 @@ body:not([surprise-me-disabled]) [visibleif~='surprise-me-disabled'] {
display: block; display: block;
} }
#dialog-header > div {
-webkit-app-region: no-drag;
border-radius: 50%;
display: block;
height: 24px;
position: absolute;
top: 4px;
transition: background-color 100ms;
width: 24px;
}
#dialog-header div:hover {
background-color: rgb(241, 243, 244);
}
#minimize-button {
background-image: url(../images/ui/ic_minimize_grey-1x.svg);
right: 32px;
}
#close-button {
background-image: url(../images/ui/ic_close_grey-1x.svg);
right: 4px;
}
#top-header { #top-header {
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
background-color: #fff; background-color: #fff;
......
...@@ -194,8 +194,10 @@ chrome.app.runtime.onLaunched.addListener(function() { ...@@ -194,8 +194,10 @@ chrome.app.runtime.onLaunched.addListener(function() {
} }
var options = { var options = {
frame: 'none',
innerBounds: {width: 768, height: 512, minWidth: 768, minHeight: 512}, innerBounds: {width: 768, height: 512, minWidth: 768, minHeight: 512},
resizable: true, resizable: true,
alphaEnabled: true
}; };
chrome.app.window.create('main.html', options, function(window) { chrome.app.window.create('main.html', options, function(window) {
......
...@@ -381,6 +381,12 @@ WallpaperManager.prototype.preDownloadDomInit_ = function() { ...@@ -381,6 +381,12 @@ WallpaperManager.prototype.preDownloadDomInit_ = function() {
'resize', this.onResize_.bind(this)); 'resize', this.onResize_.bind(this));
this.document_.defaultView.addEventListener( this.document_.defaultView.addEventListener(
'keydown', this.onKeyDown_.bind(this)); 'keydown', this.onKeyDown_.bind(this));
$('minimize-button').addEventListener('click', function() {
chrome.app.window.current().minimize();
});
$('close-button').addEventListener('click', function() {
window.close();
});
window.addEventListener(Constants.WallpaperChangedBy3rdParty, e => { window.addEventListener(Constants.WallpaperChangedBy3rdParty, e => {
this.currentWallpaper_ = e.detail.wallpaperFileName; this.currentWallpaper_ = e.detail.wallpaperFileName;
this.decorateCurrentWallpaperInfoBar_(); this.decorateCurrentWallpaperInfoBar_();
......
...@@ -83,6 +83,10 @@ found in the LICENSE file. ...@@ -83,6 +83,10 @@ found in the LICENSE file.
</div> </div>
</div> </div>
<div class="dialog-container"> <div class="dialog-container">
<div id="dialog-header">
<div id="minimize-button"></div>
<div id="close-button"></div>
</div>
<div class="dialog-body"> <div class="dialog-body">
<div class="dialog-topbar"> <div class="dialog-topbar">
<div id="navstrip"> <div id="navstrip">
......
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