Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 52b3560b51cd72504f3a14f58978120df011d5b2 1 parent 482c0f3
@janodvarko janodvarko authored
View
12 extension/content/firebug/console/commandEditor.js
@@ -7,8 +7,9 @@ define([
"firebug/chrome/menu",
"firebug/lib/dom",
"firebug/lib/locale",
+ "firebug/lib/css",
],
-function(Obj, Firebug, Events, Menu, Dom, Locale) {
+function(Obj, Firebug, Events, Menu, Dom, Locale, Css) {
// ********************************************************************************************* //
// Constants
@@ -61,7 +62,6 @@ Firebug.CommandEditor = Obj.extend(Firebug.Module,
{
mode: MODE_JAVASCRIPT,
showLineNumbers: false,
- theme: "chrome://firebug/skin/orion-firebug.css"
};
// Custom shortcuts for Orion editor
@@ -115,9 +115,17 @@ Firebug.CommandEditor = Obj.extend(Firebug.Module,
// This event is not supported in Fx11 so, catch the exception
// which is thrown.
this.editor.addEventListener("keypress", this.onKeyPress);
+
+ // Customize the default theme. Source Editor component doesn't have public
+ // API for customizing existing themes. So, use this construct, but be aware
+ // that _view and _frameDocument are private variables and could change.
+ var editorDoc = this.editor._view._frameDocument;
+ Css.appendStylesheet(editorDoc, "chrome://firebug/skin/orion-firebug.css");
}
catch (err)
{
+ if (FBTrace.DBG_ERROR)
+ FBTrace.sysout("commandEditor.onEditorLoad; EXCEPTION " + err, err);
}
// xxxHonza: Context menu support is going to change in SourceEditor
View
126 extension/skin/classic/orion-firebug.css
@@ -1,133 +1,19 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
+/* See license.txt for terms of usage */
-.viewContainer {
- background: #cddae5; /* This will be seen as the continuation of the ruler */
- font-family: monospace;
- font-size: 11px; /* inherit browser's default monospace font size */
-}
+/************************************************************************************************/
+/* Custom Styles for Command Editor (Orion) */
.view {
- color: black; /* Default text color */
- background: white; /* Background of the editor */
- padding-left: 0;
-}
-
-.readonly > .view {
- background: #f0f0ff;
-}
-
-/* One line */
-.viewContent > div {
- padding-left: 4px; /* Margin between the ruler and the editor */
-}
-
-/* Styles for rulers */
-.ruler.lines {
- text-align: right;
-}
-
-/* Styles for the line number ruler */
-.rulerLines {
- border-right: 1px solid #CCCCCC;
- /*border-right: 1px solid #b4c4d3;*/
- background: rgb(238, 238, 238);
- color: #7a8a99;
- min-width: 1.4em;
- /*padding-left: 4px;
- padding-right: 4px;*/
- padding: 0px 4px 0 20px;
- text-align: end;
-}
-
-.token_singleline_comment {
- color: #45a946; /* green */
-}
-
-.token_multiline_comment {
- color: #45a946; /* green */
-}
-
-.token_doc_comment {
- color: #45a946; /* green */
-}
-
-.token_doc_html_markup {
- color: #dd0058; /* purple */
-}
-
-.token_doc_tag {
- color: #dd0058; /* purple */
-}
-
-.token_task_tag { /* "TODO" */
- color: black;
- background: yellow;
+ background: white;
}
.token_string {
- /*color: #1e66b1; blue */
color: red;
- /*font-style: italic;*/
+ font-style: normal;
}
.token_keyword {
- /*color: #dd0058; purple */
color: blue;
}
-.token_space {
- /* images/white_space.png */
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAABnRSTlMA/wAAAACkwsAdAAAAIUlEQVR4nGP4z8CAC+GUIEXuABhgkTuABEiRw2cmae4EAH05X7xDolNRAAAAAElFTkSuQmCC");
- background-repeat: no-repeat;
- background-position: center center;
-}
-
-.token_tab {
- /* images/white_tab.png */
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAJCAIAAACJ2loDAAAABnRSTlMA/wD/AP83WBt9AAAAMklEQVR4nGP4TwRgoK6i52c3bz5w6zMSA6tJn28d2Lx589nnCAYu63AaSLxJRLoJPwAAeNk0aG4opfMAAAAASUVORK5CYII=");
- background-repeat: no-repeat;
- background-position: left center;
-}
-
-.line_caret { /* Current line */
- /*background: #dae2ee; lighter than the background */
-}
-
-.readonly .line_caret {
- background: #cddae5; /* a bit darker than the background */
-}
-
-/* Styling for html syntax highlighting */
-.entity-name-tag {
- color: #dd0058; /* purple */
-}
-
-.entity-other-attribute-name {
- color: #dd0058; /* purple */
-}
-
-.punctuation-definition-comment {
- color: #45a946; /* green */
-}
-
-.comment {
- color: #45a946; /* green */
-}
-
-.string-quoted {
- color: #1e66b1; /* blue */
- font-style: italic;
-}
-
-.invalid {
- color: red;
- font-weight: bold;
-}
-
-.annotationRange.currentBracket {
-}
-
-.annotationRange.matchingBracket {
- outline: 1px solid grey;
-}
+/************************************************************************************************/
Please sign in to comment.
Something went wrong with that request. Please try again.