summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/resources/ntp4/new_tab.css11
-rw-r--r--chrome/browser/resources/ntp4/new_tab.html6
-rw-r--r--chrome/browser/resources/ntp4/recently_closed.css14
-rw-r--r--chrome/browser/resources/ntp4/recently_closed.js14
4 files changed, 29 insertions, 16 deletions
diff --git a/chrome/browser/resources/ntp4/new_tab.css b/chrome/browser/resources/ntp4/new_tab.css
index 1d8a660..7f5f7ec 100644
--- a/chrome/browser/resources/ntp4/new_tab.css
+++ b/chrome/browser/resources/ntp4/new_tab.css
@@ -57,18 +57,11 @@ button span {
color: #888;
}
-.footer-divider {
+#footer-divider {
background: -webkit-gradient(linear, left top, left bottom,
from(#eee), color-stop(0.5, #bbb), to(#eee));
- width: 1px;
-}
-
-#footer-divider-1 {
height: 60%;
-}
-
-#footer-divider-2 {
- height: 40%;
+ width: 1px;
}
/* TODO(estade): handle overflow better? I tried overflow-x: hidden and
diff --git a/chrome/browser/resources/ntp4/new_tab.html b/chrome/browser/resources/ntp4/new_tab.html
index 7257c72..cae619e 100644
--- a/chrome/browser/resources/ntp4/new_tab.html
+++ b/chrome/browser/resources/ntp4/new_tab.html
@@ -19,6 +19,7 @@
<link id="themecss" rel="stylesheet">
<script src="../shared/js/event_tracker.js"></script>
+<script src="../shared/js/local_strings.js"></script>
<script src="../shared/js/util.js"></script>
<script src="../shared/js/cr.js"></script>
@@ -48,7 +49,7 @@
<!-- TODO(estade): this image has a lot of blank space on the right
that needs removing. -->
<img src="../../../app/theme/%DISTRIBUTION%/product_logo.png">
- <div id="footer-divider-1" class="footer-divider"></div>
+ <div id="footer-divider"></div>
<ul id="dot-list">
<!-- This is another template node (see above). -->
@@ -59,9 +60,6 @@
<span i18n-content="recentlyclosed"></span>
<img src="../ntp/ntp_disclosure_triangle.png">
</button>
- <div id="footer-divider-2" class="footer-divider"></div>
- <!-- TODO(estade): replace this with actual user login. -->
- <span id="user-login">example at gmail.com</span>
<!-- TODO(estade): may want to remove this. -->
<div id="trash"></div>
diff --git a/chrome/browser/resources/ntp4/recently_closed.css b/chrome/browser/resources/ntp4/recently_closed.css
index d7a63a5..942f2fc 100644
--- a/chrome/browser/resources/ntp4/recently_closed.css
+++ b/chrome/browser/resources/ntp4/recently_closed.css
@@ -13,25 +13,33 @@
-webkit-transform: rotate(270deg);
}
+.recent-menu {
+ padding: 6px 8px;
+}
+
.recent-menu-item {
background: no-repeat 0% 50%;
+ background-color: transparent !important;
background-size: 16px 16px;
box-sizing: border-box;
display: block;
font-size: 100%;
line-height: 20px;
- margin: 2px;
+ margin: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- -webkit-margin-start: 18px;
+ -webkit-padding-end: 0;
+ -webkit-padding-start: 18px
}
.recent-window {
background-image: url('../ntp/closed_window.png');
}
+/* TODO(estade): find a better color for active. */
+.recent-menu-item:active,
.recent-menu-item:visited,
.recent-menu-item:link {
- color: hsl(213, 90%, 24%);
+ color: hsl(213, 90%, 24%) !important;
}
diff --git a/chrome/browser/resources/ntp4/recently_closed.js b/chrome/browser/resources/ntp4/recently_closed.js
index 5e54899..e79d36e 100644
--- a/chrome/browser/resources/ntp4/recently_closed.js
+++ b/chrome/browser/resources/ntp4/recently_closed.js
@@ -9,6 +9,19 @@
cr.define('ntp4', function() {
'use strict';
+ var localStrings = new LocalStrings();
+
+ /**
+ * Returns the text used for a recently closed window.
+ * @param {number} numTabs Number of tabs in the window.
+ * @return {string} The text to use.
+ */
+ function formatTabsText(numTabs) {
+ if (numTabs == 1)
+ return localStrings.getString('closedwindowsingle');
+ return localStrings.getStringF('closedwindowmultiple', numTabs);
+ }
+
var Menu = cr.ui.Menu;
var MenuItem = cr.ui.MenuItem;
var MenuButton = cr.ui.MenuButton;
@@ -21,6 +34,7 @@ cr.define('ntp4', function() {
MenuButton.prototype.decorate.call(this);
this.menu = new Menu;
cr.ui.decorate(this.menu, Menu);
+ this.menu.classList.add('recent-menu');
document.body.appendChild(this.menu);
this.needsRebuild_ = true;