Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Issue 5488: Selecting in Command Editor doesn't work well

  • Loading branch information...
commit 52b3560b51cd72504f3a14f58978120df011d5b2 1 parent 482c0f3
Jan Odvarko authored May 21, 2012
12  extension/content/firebug/console/commandEditor.js
@@ -7,8 +7,9 @@ define([
7 7
     "firebug/chrome/menu",
8 8
     "firebug/lib/dom",
9 9
     "firebug/lib/locale",
  10
+    "firebug/lib/css",
10 11
 ],
11  
-function(Obj, Firebug, Events, Menu, Dom, Locale) {
  12
+function(Obj, Firebug, Events, Menu, Dom, Locale, Css) {
12 13
 
13 14
 // ********************************************************************************************* //
14 15
 // Constants
@@ -61,7 +62,6 @@ Firebug.CommandEditor = Obj.extend(Firebug.Module,
61 62
         {
62 63
             mode: MODE_JAVASCRIPT,
63 64
             showLineNumbers: false,
64  
-            theme: "chrome://firebug/skin/orion-firebug.css"
65 65
         };
66 66
 
67 67
         // Custom shortcuts for Orion editor
@@ -115,9 +115,17 @@ Firebug.CommandEditor = Obj.extend(Firebug.Module,
115 115
             // This event is not supported in Fx11 so, catch the exception
116 116
             // which is thrown.
117 117
             this.editor.addEventListener("keypress", this.onKeyPress);
  118
+
  119
+            // Customize the default theme. Source Editor component doesn't have public
  120
+            // API for customizing existing themes. So, use this construct, but be aware
  121
+            // that _view and _frameDocument are private variables and could change.
  122
+            var editorDoc = this.editor._view._frameDocument;
  123
+            Css.appendStylesheet(editorDoc, "chrome://firebug/skin/orion-firebug.css");
118 124
         }
119 125
         catch (err)
120 126
         {
  127
+            if (FBTrace.DBG_ERROR)
  128
+                FBTrace.sysout("commandEditor.onEditorLoad; EXCEPTION " + err, err);
121 129
         }
122 130
 
123 131
         // xxxHonza: Context menu support is going to change in SourceEditor
126  extension/skin/classic/orion-firebug.css
... ...
@@ -1,133 +1,19 @@
1  
-/* Any copyright is dedicated to the Public Domain.
2  
-   http://creativecommons.org/publicdomain/zero/1.0/ */
  1
+/* See license.txt for terms of usage */
3 2
 
4  
-.viewContainer {
5  
-  background: #cddae5; /* This will be seen as the continuation of the ruler */
6  
-  font-family: monospace;
7  
-  font-size: 11px; /* inherit browser's default monospace font size */
8  
-}
  3
+/************************************************************************************************/
  4
+/* Custom Styles for Command Editor (Orion) */
9 5
 
10 6
 .view {
11  
-  color: black; /* Default text color */
12  
-  background: white; /* Background of the editor */
13  
-  padding-left: 0;
14  
-}
15  
-
16  
-.readonly > .view {
17  
-  background: #f0f0ff;
18  
-}
19  
-
20  
-/* One line */
21  
-.viewContent > div {
22  
-  padding-left: 4px; /* Margin between the ruler and the editor */
23  
-}
24  
-
25  
-/* Styles for rulers */
26  
-.ruler.lines {
27  
-  text-align: right;
28  
-}
29  
-
30  
-/* Styles for the line number ruler */
31  
-.rulerLines {
32  
-  border-right: 1px solid #CCCCCC;
33  
-  /*border-right: 1px solid #b4c4d3;*/
34  
-  background: rgb(238, 238, 238);
35  
-  color: #7a8a99;
36  
-  min-width: 1.4em;
37  
-  /*padding-left: 4px;
38  
-  padding-right: 4px;*/
39  
-  padding: 0px 4px 0 20px;
40  
-  text-align: end;
41  
-}
42  
-
43  
-.token_singleline_comment {
44  
-  color: #45a946; /* green */
45  
-}
46  
-
47  
-.token_multiline_comment {
48  
-  color: #45a946; /* green */
49  
-}
50  
-
51  
-.token_doc_comment {
52  
-  color: #45a946; /* green */
53  
-}
54  
-
55  
-.token_doc_html_markup {
56  
-  color: #dd0058; /* purple */
57  
-}
58  
-
59  
-.token_doc_tag {
60  
-  color: #dd0058; /* purple */
61  
-}
62  
-
63  
-.token_task_tag { /* "TODO" */
64  
-  color: black;
65  
-  background: yellow;
  7
+  background: white;
66 8
 }
67 9
 
68 10
 .token_string {
69  
-  /*color: #1e66b1;  blue */
70 11
   color: red;
71  
-  /*font-style: italic;*/
  12
+  font-style: normal;
72 13
 }
73 14
 
74 15
 .token_keyword {
75  
-  /*color: #dd0058; purple */
76 16
   color: blue;
77 17
 }
78 18
 
79  
-.token_space {
80  
-  /* images/white_space.png */
81  
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAABnRSTlMA/wAAAACkwsAdAAAAIUlEQVR4nGP4z8CAC+GUIEXuABhgkTuABEiRw2cmae4EAH05X7xDolNRAAAAAElFTkSuQmCC");
82  
-  background-repeat: no-repeat;
83  
-  background-position: center center;
84  
-}
85  
-
86  
-.token_tab {
87  
-  /* images/white_tab.png */
88  
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAJCAIAAACJ2loDAAAABnRSTlMA/wD/AP83WBt9AAAAMklEQVR4nGP4TwRgoK6i52c3bz5w6zMSA6tJn28d2Lx589nnCAYu63AaSLxJRLoJPwAAeNk0aG4opfMAAAAASUVORK5CYII=");
89  
-  background-repeat: no-repeat;
90  
-  background-position: left center;
91  
-}
92  
-
93  
-.line_caret { /* Current line */
94  
-  /*background: #dae2ee;  lighter than the background */
95  
-}
96  
-
97  
-.readonly .line_caret {
98  
-  background: #cddae5; /* a bit darker than the background */
99  
-}
100  
-
101  
-/* Styling for html syntax highlighting */
102  
-.entity-name-tag {
103  
-  color: #dd0058; /* purple */
104  
-}
105  
-
106  
-.entity-other-attribute-name {
107  
-  color: #dd0058; /* purple */
108  
-}
109  
-
110  
-.punctuation-definition-comment {
111  
-  color: #45a946; /* green */
112  
-}
113  
-
114  
-.comment {
115  
-  color: #45a946; /* green */
116  
-}
117  
-
118  
-.string-quoted {
119  
-  color: #1e66b1; /* blue */
120  
-  font-style: italic;
121  
-}
122  
-
123  
-.invalid {
124  
-  color: red;
125  
-  font-weight: bold;
126  
-}
127  
-
128  
-.annotationRange.currentBracket {
129  
-}
130  
-
131  
-.annotationRange.matchingBracket {
132  
-  outline: 1px solid grey;
133  
-}
  19
+/************************************************************************************************/

0 notes on commit 52b3560

Please sign in to comment.
Something went wrong with that request. Please try again.