[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 283/483: Eye candy: style keys in tooltips like actual keyboard keys

David Prévot taffit at moszumanska.debian.org
Thu Jan 22 21:41:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus-element-hiding-helper.

commit 964db5f5926d4b07355cc4983a7e8d3794d88302
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Sat Oct 30 21:10:16 2010 +0200

    Eye candy: style keys in tooltips like actual keyboard keys
---
 chrome/content/overlay.xul | 10 ++++++----
 chrome/skin/overlay.css    | 28 ++++++++++++++++++++++++----
 modules/Aardvark.jsm       |  8 ++++----
 3 files changed, 34 insertions(+), 12 deletions(-)

diff --git a/chrome/content/overlay.xul b/chrome/content/overlay.xul
index 5f5349d..6ff376e 100644
--- a/chrome/content/overlay.xul
+++ b/chrome/content/overlay.xul
@@ -44,10 +44,12 @@
         <rows id="ehh-helpbox-rows"/>
       </grid>
     </tooltip>
-    <tooltip id="ehh-commandlabel" noautohide="true" orient="horizontal">
-      <description id="ehh-commandlabel-key"/>
-      <description id="ehh-commandlabel-alternativeKey"/>
-      <description id="ehh-commandlabel-label"/>
+    <tooltip id="ehh-commandlabel" noautohide="true">
+      <hbox align="center">
+        <description id="ehh-commandlabel-key"/>
+        <description id="ehh-commandlabel-alternativeKey"/>
+        <description id="ehh-commandlabel-label"/>
+      </hbox>
     </tooltip>
     <tooltip id="ehh-viewsource" noautohide="true" orient="vertical"/>
     <tooltip id="ehh-elementmarker">
diff --git a/chrome/skin/overlay.css b/chrome/skin/overlay.css
index 8b2d26c..771fa3c 100644
--- a/chrome/skin/overlay.css
+++ b/chrome/skin/overlay.css
@@ -30,10 +30,22 @@
   padding: 5px;
 }
 
-#ehh-helpbox .key
+#ehh-helpbox row
+{
+  -moz-box-align: center;
+}
+
+#ehh-helpbox .key:not(:empty)
 {
   font-weight: bold;
-  margin-right: 10px;
+  margin: 2px 10px 2px 0px;
+  border: 1px solid black;
+  text-align: start;
+  width: 30px;
+  height: 30px;
+  padding: 2px;
+  background-color: white;
+  -moz-border-radius: 3px;
 }
 
 #ehh-helpbox-title
@@ -44,12 +56,20 @@
 
 #ehh-commandlabel
 {
-  font-size: 200%;
+  font-size: 150%;
 }
 
-#ehh-commandlabel-key, #ehh-commandlabel-alternativeKey
+#ehh-commandlabel-key:not(:empty), #ehh-commandlabel-alternativeKey:not(:empty)
 {
   font-weight: bold;
+  margin: 0px 10px 0px 0px;
+  border: 1px solid black;
+  text-align: start;
+  width: 45px;
+  height: 45px;
+  padding: 2px;
+  background-color: white;
+  -moz-border-radius: 4px;
 }
 
 #ehh-viewsource description,
diff --git a/modules/Aardvark.jsm b/modules/Aardvark.jsm
index fee4414..832b295 100644
--- a/modules/Aardvark.jsm
+++ b/modules/Aardvark.jsm
@@ -141,8 +141,8 @@ var Aardvark =
     if (this.commandLabelTimer)
       this.commandLabelTimer.cancel();
   
-    E("ehh-commandlabel-key").setAttribute("value", key);
-    E("ehh-commandlabel-alternativeKey").setAttribute("value", alternativeKey);
+    E("ehh-commandlabel-key").textContent = key.toUpperCase();
+    E("ehh-commandlabel-alternativeKey").textContent = alternativeKey.toUpperCase();
     E("ehh-commandlabel-label").setAttribute("value", label);
   
     var commandLabel = E("ehh-commandlabel");
@@ -180,12 +180,12 @@ var Aardvark =
       helpBoxRows.appendChild(row);
   
       var element = this.window.document.createElement("description");
-      element.setAttribute("value", key);
+      element.textContent = key.toUpperCase();
       element.className = "key";
       row.appendChild(element);
   
       var element = this.window.document.createElement("description");
-      element.setAttribute("value", alternativeKey);
+      element.textContent = alternativeKey.toUpperCase();
       element.className = "key";
       row.appendChild(element);
   

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus-element-hiding-helper.git



More information about the Pkg-mozext-commits mailing list