зеркало из https://github.com/mozilla/snowl.git
add a header type of richlistitem to the sources list
--HG-- extra : rebase_source : b1883536d96f8e04e85c8b7e965bc4ff0daeb918
This commit is contained in:
Родитель
0d46de1faa
Коммит
7c30249c61
|
@ -207,17 +207,21 @@ a > img {
|
|||
background-color: -moz-dialog;
|
||||
}
|
||||
|
||||
richlistitem {
|
||||
richlistitem.header {
|
||||
-moz-binding: url("chrome://snowl/content/sources.xml#header");
|
||||
}
|
||||
|
||||
richlistitem.source {
|
||||
-moz-binding: url("chrome://snowl/content/sources.xml#source");
|
||||
}
|
||||
|
||||
richlistitem[selected="true"],
|
||||
richlistitem[selected="true"]:hover {
|
||||
richlistitem.source[selected="true"],
|
||||
richlistitem.source[selected="true"]:hover {
|
||||
-moz-binding: url("chrome://snowl/content/sources.xml#source-selected");
|
||||
color: -moz-dialogtext;
|
||||
background-color: #aaaaaa;
|
||||
}
|
||||
|
||||
richlistitem:hover {
|
||||
richlistitem.source:hover {
|
||||
background-color: #cccccc;
|
||||
}
|
||||
|
|
|
@ -883,15 +883,23 @@ let Sources = {
|
|||
// ??? select all feeds at once once multi-select is working?
|
||||
let item = this._list.appendItem(feedToPreview.title);
|
||||
item.source = feed;
|
||||
item.className = "source";
|
||||
this._list.selectItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
let item = document.createElementNS(XUL_NS, "richlistitem");
|
||||
// FIXME: make this localizable.
|
||||
item.setAttribute("label", "Subscriptions");
|
||||
item.className = "header";
|
||||
this._list.appendChild(item);
|
||||
|
||||
for each (let source in SnowlService.sources) {
|
||||
//let item = document.createElement("richlistitem");
|
||||
let item = this._list.appendItem(source.name);
|
||||
item.source = source;
|
||||
item.setAttribute("subscription", "true");
|
||||
item.className = "source";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
.header {
|
||||
margin-top: 0.5em;
|
||||
-moz-user-focus: ignore;
|
||||
-moz-user-select: -moz-none;
|
||||
}
|
||||
|
||||
.header label {
|
||||
color: #666666;
|
||||
}
|
|
@ -58,6 +58,18 @@
|
|||
</implementation>
|
||||
</binding>
|
||||
|
||||
<binding id="header" extends="chrome://snowl/content/sources.xml#source-base">
|
||||
<resources>
|
||||
<stylesheet src="chrome://snowl/content/sources.css"/>
|
||||
</resources>
|
||||
<content>
|
||||
<xul:hbox flex="1" align="center">
|
||||
<xul:image height="16" width="16"/>
|
||||
<xul:label xbl:inherits="value=label"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="source" extends="chrome://snowl/content/sources.xml#source-base">
|
||||
<resources>
|
||||
<stylesheet src="chrome://snowl/skin/sources.css"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче