From 9fe215f66c5c96285210d0bed6f0fb720d94a894 Mon Sep 17 00:00:00 2001 From: "mozilla.mano%sent.com" Date: Wed, 9 Apr 2008 00:39:19 +0000 Subject: [PATCH] Bug 424286 - Style the places organizer, bookmarks sidebar, and bookmarks menu with icons. r=dietrich. git-svn-id: svn://10.0.0.236/trunk@249872 18797224-902f-48f8-a5cc-f745e15eee43 --- .../components/places/content/treeView.js | 20 ++++++-------- .../themes/gnomestripe/browser/browser.css | 4 +++ .../gnomestripe/browser/places/organizer.css | 15 ---------- .../gnomestripe/browser/places/places.css | 26 ++++++++++++++++++ .../themes/pinstripe/browser/browser.css | 4 +++ .../pinstripe/browser/places/places.css | 17 ++++++++++++ .../themes/winstripe/browser/browser.css | 5 ++++ .../browser/themes/winstripe/browser/jar.mn | 2 ++ .../browser/places/allBookmarks-aero.png | Bin 0 -> 612 bytes .../winstripe/browser/places/allBookmarks.png | Bin 0 -> 562 bytes .../winstripe/browser/places/organizer.css | 6 ++-- .../winstripe/browser/places/places.css | 25 +++++++++++++++++ 12 files changed, 94 insertions(+), 30 deletions(-) create mode 100644 mozilla/browser/themes/winstripe/browser/places/allBookmarks-aero.png create mode 100644 mozilla/browser/themes/winstripe/browser/places/allBookmarks.png diff --git a/mozilla/browser/components/places/content/treeView.js b/mozilla/browser/components/places/content/treeView.js index 44ab9bcd942..aaa3d559076 100644 --- a/mozilla/browser/components/places/content/treeView.js +++ b/mozilla/browser/components/places/content/treeView.js @@ -918,6 +918,10 @@ PlacesTreeView.prototype = { } else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR) properties.push(this._getAtomFor("separator")); + else if (itemId != -1) { // bookmark nodes + if (PlacesUtils.nodeIsLivemarkContainer(node.parent)) + properties.push(this._getAtomFor("livemarkItem")); + } this._visibleElements[aRow].properties = properties; } @@ -1114,18 +1118,10 @@ PlacesTreeView.prototype = { return ""; var node = this._visibleElements[aRow].node; - - // Containers may or may not have favicons. If not, we will return - // nothing as the image, and the style rule should pick up the - // default. Separator rows never have icons. - if (PlacesUtils.nodeIsSeparator(node) || - (PlacesUtils.nodeIsContainer(node) && !node.icon)) - return ""; - - // For consistency, we always return a favicon for non-containers, - // even if it is just the default one. - var icon = node.icon || PlacesUtils.favicons.defaultFavicon; - return icon ? icon.spec : ""; + var icon = node.icon; + if (icon) + return icon.spec; + return ""; }, getProgressMode: function(aRow, aColumn) { }, diff --git a/mozilla/browser/themes/gnomestripe/browser/browser.css b/mozilla/browser/themes/gnomestripe/browser/browser.css index 5f58874b020..45311d02955 100644 --- a/mozilla/browser/themes/gnomestripe/browser/browser.css +++ b/mozilla/browser/themes/gnomestripe/browser/browser.css @@ -423,6 +423,10 @@ menuitem[command="Browser:ShowAllBookmarks"] { -moz-image-region: rect(0px 48px 16px 32px); } +#bookmarksToolbarFolderMenu { + list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png"); +} + #menu_openDownloads { list-style-image: url("chrome://browser/skin/Toolbar-small.png"); -moz-image-region: rect(0px 16px 16px 0px); diff --git a/mozilla/browser/themes/gnomestripe/browser/places/organizer.css b/mozilla/browser/themes/gnomestripe/browser/places/organizer.css index 3dccc1a99b8..ba99f66bff9 100644 --- a/mozilla/browser/themes/gnomestripe/browser/places/organizer.css +++ b/mozilla/browser/themes/gnomestripe/browser/places/organizer.css @@ -55,21 +55,6 @@ height: 12px; } -/* organize button */ -#organizeButton { - list-style-image: url("moz-icon://stock/gtk-properties?size=button"); -} - -/* view button */ -#viewMenu { - list-style-image: url("moz-icon://stock/gtk-sort-ascending?size=button"); -} - -/* maintenance button */ -#maintenanceButton { - list-style-image: url("moz-icon://stock/gtk-revert-to-saved?size=button"); -} - /* Root View */ #placesView { background-color: Window; diff --git a/mozilla/browser/themes/gnomestripe/browser/places/places.css b/mozilla/browser/themes/gnomestripe/browser/places/places.css index a1e8e3c7a89..204f88a9096 100755 --- a/mozilla/browser/themes/gnomestripe/browser/places/places.css +++ b/mozilla/browser/themes/gnomestripe/browser/places/places.css @@ -23,9 +23,15 @@ treechildren::-moz-tree-image(title) { margin: 0px 2px; width: 16px; height: 16px; + list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); +} + +treechildren::-moz-tree-image(title, livemarkItem) { + list-style-image: url("chrome://browser/skin/places/livemark-item.png"); } treechildren::-moz-tree-image(title, separator) { + list-style-image: none; width: 0; height: 0; } @@ -44,12 +50,32 @@ treechildren::-moz-tree-image(title, container, tagContainer) { -moz-image-region: auto; } +treechildren::-moz-tree-image(container, OrganizerQuery_AllBookmarks) { + list-style-image: url("chrome://browser/skin/Toolbar-small.png"); + -moz-image-region: rect(0px 48px 16px 32px); +} + +treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksToolbar) { + list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png"); + -moz-image-region: auto; +} + +treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksMenu) { + list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png"); + -moz-image-region: auto; +} + /* query-nodes should be styled even if they're not expandable */ treechildren::-moz-tree-image(title, query) { list-style-image: url("chrome://browser/skin/places/query.png"); -moz-image-region: auto; } +treechildren::-moz-tree-image(title, query, OrganizerQuery_History) { + list-style-image: url("chrome://browser/skin/Toolbar-small.png"); + -moz-image-region: rect(0px 32px 16px 16px); +} + /* We want some queries to look like ordinary folders. This must come after the (title, query) selector, or it would get overridden. */ treechildren::-moz-tree-image(title, query, folder) { diff --git a/mozilla/browser/themes/pinstripe/browser/browser.css b/mozilla/browser/themes/pinstripe/browser/browser.css index c17eeaa8e65..0d61675c54c 100755 --- a/mozilla/browser/themes/pinstripe/browser/browser.css +++ b/mozilla/browser/themes/pinstripe/browser/browser.css @@ -247,6 +247,10 @@ toolbarpaletteitem[place="toolbar"] .places-toolbar-items { height: 16px; } +#bookmarksToolbarFolderMenu { + list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png"); +} + /* ----- PRIMARY TOOLBAR BUTTONS ----- */ .toolbarbutton-1, diff --git a/mozilla/browser/themes/pinstripe/browser/places/places.css b/mozilla/browser/themes/pinstripe/browser/places/places.css index d2370b484c6..b3a45b86617 100755 --- a/mozilla/browser/themes/pinstripe/browser/places/places.css +++ b/mozilla/browser/themes/pinstripe/browser/places/places.css @@ -99,12 +99,17 @@ page > hbox { /* Trees */ treechildren::-moz-tree-image(title) { + list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); padding-right: 2px; margin: 0px 2px; width: 16px; height: 16px; } +treechildren::-moz-tree-image(title, livemarkItem) { + list-style-image: url("chrome://browser/skin/places/livemarkItem.png"); +} + treechildren::-moz-tree-image(title, container), treechildren::-moz-tree-image(title, open) { list-style-image: url("chrome://global/skin/tree/folder.png"); @@ -130,11 +135,23 @@ treechildren::-moz-tree-image(container, tagContainer) { list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png"); } +treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksToolbar) { + list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png"); +} + +treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksMenu) { + list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png"); +} + /* query-nodes should be styled even if they're not expandable */ treechildren::-moz-tree-image(query) { list-style-image: url("chrome://browser/skin/places/query.png"); } +treechildren::-moz-tree-image(query, OrganizerQuery_History) { + list-style-image: url("chrome://browser/skin/places/history.png"); +} + /* We want some queries to look like ordinary folders. This must come after the (title, query) selector, or it would get overridden. */ treechildren::-moz-tree-image(title, query, folder), diff --git a/mozilla/browser/themes/winstripe/browser/browser.css b/mozilla/browser/themes/winstripe/browser/browser.css index 190b372034f..00101336048 100644 --- a/mozilla/browser/themes/winstripe/browser/browser.css +++ b/mozilla/browser/themes/winstripe/browser/browser.css @@ -1888,3 +1888,8 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { list-style-image: url("chrome://browser/skin/Toolbar-small.png"); -moz-image-region: rect(0px 96px 16px 80px); } + +/* Bookmarks Toolbar menu-item */ +#bookmarksToolbarFolderMenu { + list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png"); +} diff --git a/mozilla/browser/themes/winstripe/browser/jar.mn b/mozilla/browser/themes/winstripe/browser/jar.mn index 462e5ad93a9..bf60e9d7635 100644 --- a/mozilla/browser/themes/winstripe/browser/jar.mn +++ b/mozilla/browser/themes/winstripe/browser/jar.mn @@ -56,6 +56,7 @@ classic.jar: skin/classic/browser/places/collapse.png (places/collapse.png) skin/classic/browser/places/expand.png (places/expand.png) skin/classic/browser/places/history.png (places/history.png) + skin/classic/browser/places/allBookmarks.png (places/allBookmarks.png) skin/classic/browser/places/importAndBackup.png (places/importAndBackup.png) skin/classic/browser/places/minus.png (places/minus.png) skin/classic/browser/places/plus.png (places/plus.png) @@ -139,6 +140,7 @@ classic.jar: skin/classic/aero/browser/places/collapse.png (places/collapse-aero.png) skin/classic/aero/browser/places/expand.png (places/expand-aero.png) skin/classic/aero/browser/places/history.png (places/history-aero.png) + skin/classic/aero/browser/places/allBookmarks.png (places/allBookmarks-aero.png) skin/classic/aero/browser/places/importAndBackup.png (places/importAndBackup-aero.png) skin/classic/aero/browser/places/minus.png (places/minus-aero.png) skin/classic/aero/browser/places/plus.png (places/plus-aero.png) diff --git a/mozilla/browser/themes/winstripe/browser/places/allBookmarks-aero.png b/mozilla/browser/themes/winstripe/browser/places/allBookmarks-aero.png new file mode 100644 index 0000000000000000000000000000000000000000..177c31c3cfe92b77e5b2b4fcc5f21b7179da460b GIT binary patch literal 612 zcmV-q0-ODbP)Qu8B!FtQiWmbbS%%u= zG)m_g;JXkfK*O?(v1qTpm%vndA7IN;9Pd4f=}3ymY32=-Rz!c-Q_W4INm5E((#aiVY}juzM_*&83$unJ4y* z!=)xWH>3nMFqIHOfFodh=P0h+evD6R>sVU(fRo2+ya6Zs0|7~a^nh=`DuXAlTkJUR zpOV+8>i+X}2_6bCT6JF+;CPi@9#0DJ9rN9F90G8>q9j4~c~v2}e?iO|Q}*aNcOKEj y=AF#|9$X=y4(@OK{`KEK@yo*-S#SMUfB^s%_kIsi!Q#;X0000a5$NLY(JHb1f zhxjzPXmK_n*lUTfSgs$#aC(+XKmvBEKxIqfiJEj z`Su=gqTuQCF7&@DG!uIII?cXro#NYGRY)j}fK5eZ{|v{6zcKP|pqaEXU%`)~Khgs& z!>5!$&e*lqT<(FL?QNf$@60~}8Cd({Z&#qh!tAWp_S{1(%#~3+|BLeO1^S-ltuH}e zB#l79WCXzX@`VAk`&XCO_*Ffz*{ILN{}kvfP<@ElhDhh5F<6bgPk#k9N~X^g=&cE% z5rxQdzbvn}63Ew_)(@re+Umxgzfr$&Bfb$}06oxEGIuCLga7~l07*qoM6N<$f^|s# AfB*mh literal 0 HcmV?d00001 diff --git a/mozilla/browser/themes/winstripe/browser/places/organizer.css b/mozilla/browser/themes/winstripe/browser/places/organizer.css index e0574c02b79..2d431036b80 100644 --- a/mozilla/browser/themes/winstripe/browser/places/organizer.css +++ b/mozilla/browser/themes/winstripe/browser/places/organizer.css @@ -50,17 +50,17 @@ /* organize button */ #organizeButton { - list-style-image: url("chrome://browser/skin/wrench.png"); + list-style-image: url("chrome://browser/skin/places/organize.png"); } /* view button */ #viewMenu { - list-style-image: url("chrome://browser/skin/wrench.png"); + list-style-image: url("chrome://browser/skin/places/view.png"); } /* maintenance button */ #maintenanceButton { - list-style-image: url("chrome://browser/skin/wrench.png"); + list-style-image: url("chrome://browser/skin/places/importAndBackup.png"); } /* Root View */ diff --git a/mozilla/browser/themes/winstripe/browser/places/places.css b/mozilla/browser/themes/winstripe/browser/places/places.css index ff4fe7a1b23..60188b9a981 100755 --- a/mozilla/browser/themes/winstripe/browser/places/places.css +++ b/mozilla/browser/themes/winstripe/browser/places/places.css @@ -22,13 +22,19 @@ /* Trees */ treechildren::-moz-tree-image(title) { + list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); padding-right: 2px; margin: 0px 2px; width: 16px; height: 16px; } +treechildren::-moz-tree-image(title, livemarkItem) { + list-style-image: url("chrome://browser/skin/livemark-item.png"); +} + treechildren::-moz-tree-image(title, separator) { + list-style-image: none; width: 0; height: 0; } @@ -52,12 +58,31 @@ treechildren::-moz-tree-image(title, container, tagContainer) { -moz-image-region: auto; } +treechildren::-moz-tree-image(container, OrganizerQuery_AllBookmarks) { + list-style-image: url("chrome://browser/skin/places/allBookmarks.png"); + -moz-image-region: auto; +} + +treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksToolbar) { + list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png"); + -moz-image-region: auto; +} + +treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksMenu) { + list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png"); + -moz-image-region: auto; +} + /* query-nodes should be styled even if they're not expandable */ treechildren::-moz-tree-image(title, query) { list-style-image: url("chrome://browser/skin/places/query.png"); -moz-image-region: auto; } +treechildren::-moz-tree-image(title, query, OrganizerQuery_History) { + list-style-image: url("chrome://browser/skin/places/history.png"); +} + /* We want some queries to look like ordinary folders. This must come after the (title, query) selector, or it would get overridden. */ treechildren::-moz-tree-image(title, query, folder) {