summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 23:39:12 +0000
committerjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 23:39:12 +0000
commitc404564277fa3cd5713efa6966287c072b489a87 (patch)
tree25fbe59d4ba20b34deefde036510cc37e6a5777d
parentfbe51667207db9f146e05ece7f3643379d558c68 (diff)
downloadchromium_src-c404564277fa3cd5713efa6966287c072b489a87.zip
chromium_src-c404564277fa3cd5713efa6966287c072b489a87.tar.gz
chromium_src-c404564277fa3cd5713efa6966287c072b489a87.tar.bz2
Centre tool-bar manually to ignore vertical scroll-bar.
BUG=96286 TEST=Manual Review URL: http://codereview.chromium.org/7889043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101190 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--remoting/webapp/me2mom/remoting.js11
-rw-r--r--remoting/webapp/me2mom/toolbar.css2
2 files changed, 10 insertions, 3 deletions
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js
index 6e64d30..9e4f9b8 100644
--- a/remoting/webapp/me2mom/remoting.js
+++ b/remoting/webapp/me2mom/remoting.js
@@ -465,8 +465,9 @@ function onClientStateChange_(oldState) {
} else if (state == remoting.ClientSession.State.INITIALIZING) {
remoting.debug.log('Initializing connection');
} else if (state == remoting.ClientSession.State.CONNECTED) {
- showToolbarPreview_();
remoting.setMode(remoting.AppMode.IN_SESSION);
+ recenterToolbar_();
+ showToolbarPreview_();
updateStatistics();
var accessCode = document.getElementById('access-code-entry');
accessCode.value = '';
@@ -674,6 +675,7 @@ remoting.toggleScaleToFit = function(button) {
remoting.onResize = function() {
if (remoting.session)
remoting.session.onWindowSizeChanged();
+ recenterToolbar_();
}
/**
@@ -724,4 +726,11 @@ remoting.setUseP2pApi = function(use) {
}
}
+function recenterToolbar_() {
+ var toolbar = document.getElementById('session-toolbar');
+ var toolbarX = (window.innerWidth - toolbar.clientWidth) / 2;
+ toolbar.style['left'] = toolbarX + 'px';
+ remoting.debug.log('toolbar moved to ' + toolbarX);
+}
+
}());
diff --git a/remoting/webapp/me2mom/toolbar.css b/remoting/webapp/me2mom/toolbar.css
index 0b67cbf..a89b243 100644
--- a/remoting/webapp/me2mom/toolbar.css
+++ b/remoting/webapp/me2mom/toolbar.css
@@ -7,8 +7,6 @@
position: fixed;
top: -45px;
width: 640px;
- left: 50%;
- margin-left: -320px;
-webkit-transition: top 0.2s linear;
-webkit-transition-delay: 0.7s;
font-size: 13px;