Bug 766392 - Style about:apps to match other about pages. r=mfinkle

This commit is contained in:
Wes Johnston 2012-08-07 09:49:30 -07:00
Родитель 37341d2906
Коммит 9382c1dea0
4 изменённых файлов: 47 добавлений и 8 удалений

Просмотреть файл

@ -687,4 +687,4 @@ pref("reader.margin_size", 5);
pref("reader.color_scheme", "light");
// Used to show a first-launch tip in reader
pref("reader.has_used_toolbar", false);
pref("reader.has_used_toolbar", false);

Просмотреть файл

@ -28,6 +28,15 @@ var AppsUI = {
shortcut: null
};
function openLink(aElement) {
try {
let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getService(Ci.nsIURLFormatter);
let url = formatter.formatURLPref(aElement.getAttribute("pref"));
let BrowserApp = gChromeWin.BrowserApp;
BrowserApp.addTab(url, { selected: true, parentId: BrowserApp.selectedTab.id });
} catch (ex) {}
}
function onLoad(aEvent) {
try {
let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getService(Ci.nsIURLFormatter);

Просмотреть файл

@ -24,15 +24,18 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>&aboutApps.title;</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="viewport" content="width=480; initial-scale=.6667; user-scalable=0" />
<link rel="icon" type="image/png" href="chrome://branding/content/favicon32.png" />
<link rel="stylesheet" type="text/css" href="chrome://browser/skin/aboutApps.css" media="all" />
<script type="text/javascript;version=1.8" src="chrome://browser/content/aboutApps.js"></script>
</head>
<body dir="&locale.dir;" onload="onLoad(event)" onunload="onUnload(event)">
<div id="main-container">
<div class="header">
<div>&aboutApps.title;</div>
<img src="chrome://browser/skin/images/addons-amo-hdpi.png" class="icon" pref="app.marketplaceURL" onclick="openLink(this);"/>
</div>
<div id="main-container">
<div id="noapps" class="hidden">
&aboutApps.noApps.pre;<a id="marketplaceURL" pref="app.marketplaceURL">&aboutApps.noApps.middle;</a>&aboutApps.noApps.post;
</div>

Просмотреть файл

@ -10,6 +10,33 @@ html {
-moz-text-size-adjust: none;
}
body {
margin: 0;
}
.header {
color: black;
padding: 15px 0px 0px;
-moz-padding-start: 25px;
font-size: 20px;
font-weight: bold;
border-bottom: 2px solid;
min-height: 44px;
-moz-border-bottom-colors: #ff9100 #f27900;
position: relative;
}
.header > .icon {
position: absolute;
top: 5px;
right: 15px;
}
.app:active,
.header > .icon:active {
background-color: #febc2b;
}
#main-container {
margin: 1em;
padding: 1em;
@ -27,14 +54,14 @@ html {
cursor: pointer;
text-align: center;
margin: 1em;
width: 70px;
height: 85px;
font-size: 10px;
width: 100px;
height: 121px;
font-size: 14px;
}
.app img {
width: 64px;
height: 64px;
width: 91px;
height: 91px;
pointer-events: none;
}