Skip to content

Commit

Permalink
Gallery.app: Make the window header work.
Browse files Browse the repository at this point in the history
* Adds the headers of the maximze, minimize, and close buttons.
* Turn the header to a draggable region.

BUG=358698
TEST=manually

Review URL: https://codereview.chromium.org/254203003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267493 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
hirono@chromium.org committed May 1, 2014
1 parent b37b274 commit 574419d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ui/file_manager/gallery/css/gallery.css
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ body {
}

.gallery > .header {
-webkit-app-region: drag;
-webkit-box-align: center;
-webkit-box-pack: end;
border-bottom: 1px solid rgba(50, 50, 50, 0.8);
Expand All @@ -186,6 +187,10 @@ body {
top: 0;
}

.gallery .header button {
-webkit-app-region: no-drag;
}

.gallery > .toolbar {
border-top: 1px solid rgba(50, 50, 50, 0.8);
bottom: 0;
Expand Down
12 changes: 9 additions & 3 deletions ui/file_manager/gallery/js/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ function Gallery(volumeManager) {
this.context_ = {
appWindow: chrome.app.window.current(),
onBack: function() {},
onClose: function() {},
onMaximize: function() {},
onMinimize: function() {},
onClose: function() { close(); },
onMaximize: function() {
var appWindow = chrome.app.window.current();
if (appWindow.isMaximized())
appWindow.restore();
else
appWindow.maximize();
},
onMinimize: function() { chrome.app.window.current().minimize(); },
onAppRegionChanged: function() {},
metadataCache: MetadataCache.createFull(volumeManager),
shareActions: [],
Expand Down

0 comments on commit 574419d

Please sign in to comment.