mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
+ Removed icons that exist elsewhere in the browser; now using them instead
+ Our toolbar button now uses the standard toolbar button styling; we just apply a glyph to it + Went through the code with http://caja.appspot.com/tools/index and fixed a number of minor issues it found + Added "refresh" to the dev menu (since you won't be able to just refresh the tabcandy page once it's in the xul:deck)
This commit is contained in:
parent
0976054f8a
commit
442793c33a
@ -222,7 +222,7 @@ window.Group = function(listOfEls, options) {
|
||||
self.adjustTitleSize();
|
||||
|
||||
self.save();
|
||||
}
|
||||
};
|
||||
|
||||
this.$title
|
||||
.css({backgroundRepeat: 'no-repeat'})
|
||||
@ -276,7 +276,7 @@ window.Group = function(listOfEls, options) {
|
||||
|
||||
// ___ Stack Expander
|
||||
this.$expander = iQ("<img/>")
|
||||
.attr('src', 'chrome://tabcandy/content/img/app/stack-expander.png')
|
||||
.attr('src', 'chrome://tabcandy/content/img/stack-expander.png')
|
||||
.addClass("stackExpander")
|
||||
.appendTo($container)
|
||||
.hide();
|
||||
|
@ -69,9 +69,9 @@ window.TabItem = function(container, tab) {
|
||||
// override dropOptions with custom tabitem methods
|
||||
// This is mostly to support the phantom groups.
|
||||
this.dropOptions.drop = function(e){
|
||||
$target = iQ(this.container);
|
||||
var $target = iQ(this.container);
|
||||
$target.removeClass("acceptsDrop");
|
||||
var phantom = $target.data("phantomGroup")
|
||||
var phantom = $target.data("phantomGroup");
|
||||
|
||||
var group = drag.info.item.parent;
|
||||
if( group == null ){
|
||||
@ -167,7 +167,6 @@ window.TabItem = function(container, tab) {
|
||||
this.setResizable(true);
|
||||
|
||||
TabItems.register(this);
|
||||
var self = this;
|
||||
this.tab.mirror.addOnClose(this, function(who, info) {
|
||||
TabItems.unregister(self);
|
||||
self.removeTrenches();
|
||||
@ -443,7 +442,7 @@ window.TabItem.prototype = iQ.extend(new Item(), {
|
||||
width: $tabEl.width(),
|
||||
height: $tabEl.height(),
|
||||
pos: $tabEl.position()
|
||||
}
|
||||
};
|
||||
|
||||
var scale = window.innerWidth/orig.width;
|
||||
|
||||
@ -550,9 +549,9 @@ window.TabItem.prototype = iQ.extend(new Item(), {
|
||||
var $div = iQ(this.container);
|
||||
var data;
|
||||
|
||||
var box = this.getBounds();
|
||||
if(value) {
|
||||
this._zoomPrep = true;
|
||||
var box = this.getBounds();
|
||||
|
||||
// The divide by two part here is a clever way to speed up the zoom-out code.
|
||||
// Because image scaling is slowest on big images, we cheat and start the image
|
||||
@ -573,9 +572,8 @@ window.TabItem.prototype = iQ.extend(new Item(), {
|
||||
});
|
||||
} else {
|
||||
this._zoomPrep = false;
|
||||
$div.removeClass('front')
|
||||
$div.removeClass('front');
|
||||
|
||||
var box = this.getBounds();
|
||||
this.reloadBounds();
|
||||
this.setBounds(box, true);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ Navbar = {
|
||||
}, 300);
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
// ##########
|
||||
// Class: Tabbar
|
||||
@ -786,6 +786,11 @@ UIClass.prototype = {
|
||||
Trenches.toggleShown();
|
||||
iQ(this).html((Trenches.showDebug ? 'hide' : 'show') + ' trenches');
|
||||
}
|
||||
}, {
|
||||
name: 'refresh',
|
||||
code: function() {
|
||||
location.href = 'index.html';
|
||||
}
|
||||
}, {
|
||||
name: 'code docs',
|
||||
code: function() {
|
||||
|
@ -148,18 +148,12 @@ iQ.fn = iQ.prototype = {
|
||||
if ( ret ) {
|
||||
if ( iQ.isPlainObject( context ) ) {
|
||||
Utils.assert('does not support HTML creation with context', false);
|
||||
selector = [ document.createElement( ret[1] ) ];
|
||||
/* iQ.fn.attr.call( selector, context, true ); */
|
||||
|
||||
} else {
|
||||
selector = [ doc.createElement( ret[1] ) ];
|
||||
}
|
||||
|
||||
} else {
|
||||
Utils.assert('does not support complex HTML creation', false);
|
||||
/* ret = doc.createDocumentFragment([match */
|
||||
ret = buildFragment( [ match[1] ], [ doc ] );
|
||||
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
|
||||
}
|
||||
|
||||
return iQ.merge( this, selector );
|
||||
@ -453,14 +447,15 @@ iQ.fn = iQ.prototype = {
|
||||
// ----------
|
||||
// Function: data
|
||||
data: function(key, value) {
|
||||
var data = null;
|
||||
if(value === undefined) {
|
||||
Utils.assert('does not yet support multi-objects (or null objects)', this.length == 1);
|
||||
var data = this[0].iQData;
|
||||
data = this[0].iQData;
|
||||
return (data ? data[key] : null);
|
||||
}
|
||||
|
||||
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
|
||||
var data = elem.iQData;
|
||||
data = elem.iQData;
|
||||
|
||||
if(!data)
|
||||
data = elem.iQData = {};
|
||||
@ -625,7 +620,7 @@ iQ.fn = iQ.prototype = {
|
||||
// The latest versions of Firefox do not animate from a non-explicitly set
|
||||
// css properties. So for each element to be animated, go through and
|
||||
// explicitly define 'em.
|
||||
rupper = /([A-Z])/g;
|
||||
var rupper = /([A-Z])/g;
|
||||
this.each(function(){
|
||||
var cStyle = window.getComputedStyle(this, null);
|
||||
for(var prop in css){
|
||||
@ -731,9 +726,9 @@ iQ.fn = iQ.prototype = {
|
||||
bind: function(type, func) {
|
||||
Utils.assert('does not support eventData argument', iQ.isFunction(func));
|
||||
|
||||
var handler = function(e) {
|
||||
var handler = function(event) {
|
||||
try {
|
||||
return func.apply(this, [e]);
|
||||
return func.apply(this, [event]);
|
||||
} catch(e) {
|
||||
Utils.log(e);
|
||||
}
|
||||
|
@ -53,7 +53,10 @@ function _isIframe(doc){
|
||||
// ##########
|
||||
// Class: TabCanvas
|
||||
// Takes care of the actual canvas for the tab thumbnail
|
||||
var TabCanvas = function(tab, canvas){ this.init(tab, canvas) }
|
||||
var TabCanvas = function(tab, canvas){
|
||||
this.init(tab, canvas);
|
||||
};
|
||||
|
||||
TabCanvas.prototype = {
|
||||
// ----------
|
||||
// Function: init
|
||||
@ -130,7 +133,7 @@ TabCanvas.prototype = {
|
||||
animate: function(options, duration){
|
||||
Utils.assert('this routine no longer exists', false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// ##########
|
||||
// Class: Mirror
|
||||
@ -213,7 +216,7 @@ var TabMirror = function() {
|
||||
self.init();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
TabMirror.prototype = {
|
||||
// ----------
|
||||
@ -273,12 +276,12 @@ TabMirror.prototype = {
|
||||
/* Utils.log('hasMirror'); */
|
||||
var iconUrl = tab.raw.linkedBrowser.mIconURL;
|
||||
if( iconUrl == null ){
|
||||
iconUrl = "chrome://tabcandy/content/img/core/default.png";
|
||||
iconUrl = "chrome://mozapps/skin/places/defaultFavicon.png";
|
||||
}
|
||||
|
||||
var label = tab.raw.label;
|
||||
$name = iQ(mirror.nameEl);
|
||||
$canvas = iQ(mirror.canvasEl);
|
||||
var $name = iQ(mirror.nameEl);
|
||||
var $canvas = iQ(mirror.canvasEl);
|
||||
|
||||
if(iconUrl != mirror.favEl.src) {
|
||||
mirror.favEl.src = iconUrl;
|
||||
|
@ -5,7 +5,7 @@
|
||||
<head>
|
||||
<title> </title>
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
||||
<link rel="icon" href="chrome://tabcandy/content/img/core/tabcandy.png"/>
|
||||
<link rel="icon" href="chrome://tabcandy/content/img/tabcandy.png"/>
|
||||
<link rel="stylesheet" href="css/app.css" type="text/css">
|
||||
</head>
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 51 KiB |
Binary file not shown.
Before Width: | Height: | Size: 491 B |
Binary file not shown.
Before Width: | Height: | Size: 490 B |
Binary file not shown.
Before Width: | Height: | Size: 186 B |
@ -93,7 +93,7 @@ body {
|
||||
right: 6px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: url(../img/app/closetab.png) no-repeat;
|
||||
background: url(chrome://global/skin/icons/closetab.png) no-repeat;
|
||||
opacity: 0.2;
|
||||
cursor: pointer;
|
||||
}
|
||||
@ -106,7 +106,7 @@ body {
|
||||
right: 6px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: url(../img/app/expand.png) no-repeat;
|
||||
background: url(chrome://global/skin/icons/resizer.png) no-repeat;
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ body {
|
||||
position: absolute !important;
|
||||
cursor: pointer;
|
||||
opacity: .3;
|
||||
background-image: url(../img/app/new-tab.png);
|
||||
background-image: url(../img/new-tab.png);
|
||||
z-index:99999;
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ input.name{
|
||||
color: #999;
|
||||
margin: 3px 0px 0px 3px;
|
||||
padding: 1px;
|
||||
background-image: url(../img/app/edit-light.png);
|
||||
background-image: url(../img/edit-light.png);
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ input.defaultName:hover{
|
||||
/* Resizable
|
||||
----------------------------------*/
|
||||
.resizer{
|
||||
background-image: url(../img/app/expand.png);
|
||||
background-image: url(chrome://global/skin/icons/resizer.png);
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
right: 6px;
|
||||
|
Loading…
Reference in New Issue
Block a user