[gtk-doc] annotation: allow to style annotations with css



commit 506fa23e75550fe3aa9a022fcc37e94346ea4aae
Author: Stefan Kost <ensonic users sf net>
Date:   Wed Apr 21 22:29:16 2010 +0300

    annotation: allow to style annotations with css
    
    Format the annotation using [] and style them using css. Hopefully
    fixes #615860.

 gtkdoc-mkdb.in    |    9 ++++++---
 style-classic.css |    8 ++++++++
 style.css         |    8 ++++++++
 3 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 0c7c8a7..7e0a6a6 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -2619,18 +2619,21 @@ sub ExpandAnnotation {
                     $annotation_extra = " $1";
                 }
                 $AnnotationsUsed{$match_annotation} = 1;
-                $param_annotations .= "<acronym>$match_annotation</acronym>$annotation_extra. ";
+                $param_annotations .= "[<acronym>$match_annotation</acronym>$annotation_extra]";
             }
             else {
                 &LogWarning (&GetSymbolSourceFile ($symbol), &GetSymbolSourceLine($symbol),
                     "unknown annotation \"$annotation\" in documentation for $symbol.");
-                $param_annotations=$annotation;
+                $param_annotations .= "[$annotation]";
             }
         }
         chomp($param_desc);
         $param_desc =~ m/^(.*)\.*\s*$/s;
         $param_desc = "$1. ";
-    }    
+    }
+    if ($param_annotations ne "") {
+        $param_annotations = "<emphasis role=\"annotation\">$param_annotations</emphasis>";
+    }
     return ($param_desc, $param_annotations);
 }
 
diff --git a/style-classic.css b/style-classic.css
index 08b4a62..1214302 100644
--- a/style-classic.css
+++ b/style-classic.css
@@ -172,6 +172,14 @@ hr
   margin-bottom: 0.0em
 }
 
+.annotation
+{
+  color: #555555;
+  font-size: 80%;
+  font-weight: normal;
+}
+
+
 /* code listings */
 
 .listing_frame {
diff --git a/style.css b/style.css
index 82115eb..d544a2c 100644
--- a/style.css
+++ b/style.css
@@ -209,6 +209,14 @@ h2 .extralinks, h3 .extralinks
   font-weight: normal;
 }
 
+.annotation
+{
+  /* tango:aluminium 5 */
+  color: #555753;
+  font-size: 80%;
+  font-weight: normal;
+}
+
 /* code listings */
 
 .listing_code .programlisting .cbracket   { color: #a40000; } /* tango: scarlet red 3 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]