Author: mkrueger
Date: 2008-01-24 17:50:25 -0500 (Thu, 24 Jan 2008)
New Revision: 93855
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/C64Style.xml
trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor.Highlighting/DefaultStyle.cs
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor.Highlighting/Style.cs
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSegmentTree.cs
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/RedBlackTree.cs
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
trunk/monodevelop/main/src/addins/Mono.Texteditor/OblivionStyle.xml
Log:
* OblivionStyle.xml, Mono.TextEditor/RedBlackTree.cs,
Mono.TextEditor/LineSegmentTree.cs, Mono.TextEditor/TextEditor.cs,
Mono.TextEditor.Highlighting/Style.cs,
Mono.TextEditor.Highlighting/DefaultStyle.cs, C64Style.xml:
Selected foreground colors are now part of the highlighting style.
Modified: trunk/monodevelop/main/src/addins/Mono.Texteditor/C64Style.xml
===================================================================
--- trunk/monodevelop/main/src/addins/Mono.Texteditor/C64Style.xml
2008-01-24 22:33:44 UTC (rev 93854)
+++ trunk/monodevelop/main/src/addins/Mono.Texteditor/C64Style.xml
2008-01-24 22:50:25 UTC (rev 93855)
@@ -26,6 +26,7 @@
<Color name="Default">#97A0EF</Color>
<Color name="Background">#3F3FDF</Color>
<Color name="SelectedBackground">#000000</Color>
+ <Color name="SelectedForeground">#FFFFFF</Color>
<Color name="LineMarker">#0088FF</Color>
<Color name="Ruler">#CC44CC</Color>
Modified: trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-01-24
22:33:44 UTC (rev 93854)
+++ trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-01-24
22:50:25 UTC (rev 93855)
@@ -1,3 +1,19 @@
+2008-01-25 Mike Krüger <[EMAIL PROTECTED]>
+
+ * OblivionStyle.xml, Mono.TextEditor/RedBlackTree.cs,
+ Mono.TextEditor/LineSegmentTree.cs, Mono.TextEditor/TextEditor.cs,
+ Mono.TextEditor.Highlighting/Style.cs,
+ Mono.TextEditor.Highlighting/DefaultStyle.cs, C64Style.xml: Selected
+ foreground colors are now part of the highlighting style.
+
+2008-01-25 Mike Krüger <[EMAIL PROTECTED]>
+
+ * OblivionStyle.xml, Mono.TextEditor/RedBlackTree.cs,
+ Mono.TextEditor/LineSegmentTree.cs, Mono.TextEditor/TextEditor.cs,
+ Mono.TextEditor.Highlighting/Style.cs,
+ Mono.TextEditor.Highlighting/DefaultStyle.cs, C64Style.xml: Selected
+ foreground colors are now part of the highlighting style.
+
2008-01-25 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* Mono.TextEditor/TextEditor.cs: Changes the mouse cursor to text when
the
@@ -9,10 +25,6 @@
* Mono.TextEditor/TextEditor.cs: Worked on code completion.
-2008-01-23 Mike Krüger <[EMAIL PROTECTED]>
-
- * Mono.TextEditor/TextEditor.cs: Worked on code completion.
-
2008-01-22 Mike Krüger <[EMAIL PROTECTED]>
* Mono.TextEditor.Highlighting/SyntaxModeService.cs: Worked on style
panel.
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSegmentTree.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSegmentTree.cs
2008-01-24 22:33:44 UTC (rev 93854)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSegmentTree.cs
2008-01-24 22:50:25 UTC (rev 93855)
@@ -98,8 +98,8 @@
public void Clear ()
{
- tree.root = new RedBlackTree<TreeNode>.RedBlackTreeNode
(new TreeNode (0, 0));
- tree.root.value.TreeNode = tree.root;
+ tree.Root = new RedBlackTree<TreeNode>.RedBlackTreeNode
(new TreeNode (0, 0));
+ tree.Root.value.TreeNode = tree.Root;
tree.Count = 1;
}
@@ -110,8 +110,8 @@
RedBlackTree<TreeNode>.RedBlackTreeNode newNode = new
RedBlackTree<TreeNode>.RedBlackTreeNode (result);
RedBlackTree<TreeNode>.RedBlackTreeIterator iter =
segment != null ? segment.Iter : null;
if (iter == null) {
- tree.root = newNode;
- result.TreeNode = tree.root;
+ tree.Root = newNode;
+ result.TreeNode = tree.Root;
tree.Count = 1;
return result;
}
@@ -162,10 +162,10 @@
public TreeNode GetNodeAtOffset (int offset)
{
- Debug.Assert (0 <= offset && offset <=
tree.root.value.totalLength);
- if (offset == tree.root.value.totalLength)
- return tree.root.OuterRight.value;
- RedBlackTree<TreeNode>.RedBlackTreeNode node =
tree.root;
+ Debug.Assert (0 <= offset && offset <=
tree.Root.value.totalLength);
+ if (offset == tree.Root.value.totalLength)
+ return tree.Root.OuterRight.value;
+ RedBlackTree<TreeNode>.RedBlackTreeNode node =
tree.Root;
int i = offset;
while (true) {
if (node == null)
@@ -193,7 +193,7 @@
public TreeNode GetNode (int index)
{
Debug.Assert (0 <= index && index < tree.Count);
- RedBlackTree<TreeNode>.RedBlackTreeNode node =
tree.root;
+ RedBlackTree<TreeNode>.RedBlackTreeNode node =
tree.Root;
int i = index;
while (true) {
if (node == null)
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/RedBlackTree.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/RedBlackTree.cs
2008-01-24 22:33:44 UTC (rev 93854)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/RedBlackTree.cs
2008-01-24 22:50:25 UTC (rev 93855)
@@ -35,7 +35,16 @@
public class RedBlackTree<T> : ICollection<T>
{
int count;
- public RedBlackTreeNode root;
+ RedBlackTreeNode root;
+
+ public RedBlackTreeNode Root {
+ get {
+ return root;
+ }
+ set {
+ root = value;
+ }
+ }
public void Add (RedBlackTreeNode node)
{
@@ -335,6 +344,7 @@
public bool IsReadOnly {
get { return false; }
}
+
public void CopyTo (T[] array, int arrayIndex)
{
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
2008-01-24 22:33:44 UTC (rev 93854)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
2008-01-24 22:50:25 UTC (rev 93855)
@@ -630,7 +630,7 @@
int start = offset;
int xStart = xPos;
offset = line.Offset +
line.EditableLength - offset;
- Gdk.Color selectedTextColor =
this.Style.Foreground (Gtk.StateType.Selected);
+ Gdk.Color selectedTextColor =
ColorStyle.SelectedFg;
int selectionStart =
textEditorData.SelectionStart != null ?
textEditorData.SelectionStart.Segment.Offset +
textEditorData.SelectionStart.Column : -1;
int selectionEnd =
textEditorData.SelectionEnd != null ?
textEditorData.SelectionEnd.Segment.Offset + textEditorData.SelectionEnd.Column
: -1;
if (selectionStart > selectionEnd) {
@@ -754,7 +754,6 @@
DrawText (win, gc, ref x, y, "~");
}
-
public Gdk.Point DocumentToVisualLocation (DocumentLocation loc)
{
Gdk.Point result = new Point ();
@@ -846,7 +845,6 @@
int oldRequest = -1;
int charWidth;
-
protected override bool OnExposeEvent (Gdk.EventExpose e)
{
Gdk.Window win = e.Window;
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor.Highlighting/DefaultStyle.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor.Highlighting/DefaultStyle.cs
2008-01-24 22:33:44 UTC (rev 93854)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor.Highlighting/DefaultStyle.cs
2008-01-24 22:50:25 UTC (rev 93855)
@@ -96,6 +96,11 @@
return widget.Style.Background
(StateType.Selected);
}
}
+ public override Color SelectedFg {
+ get {
+ return widget.Style.Foreground
(StateType.Selected);
+ }
+ }
public override Color LineMarker {
get {
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor.Highlighting/Style.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor.Highlighting/Style.cs
2008-01-24 22:33:44 UTC (rev 93854)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor.Highlighting/Style.cs
2008-01-24 22:50:25 UTC (rev 93855)
@@ -36,7 +36,7 @@
string name;
string description;
- Color def, background, selectedBg;
+ Color def, background, selectedBg, selectedFg;
Color lineMarker, ruler, whitespaceMarker, invalidLineMarker;
Color lineNumberFg, lineNumberBg, lineNumberFgHighlighted;
@@ -109,6 +109,12 @@
return selectedBg;
}
}
+
+ public virtual Color SelectedFg {
+ get {
+ return selectedFg;
+ }
+ }
public virtual Color LineMarker {
get {
@@ -174,6 +180,7 @@
background = new Gdk.Color (255, 255, 255);
selectedBg = new Gdk.Color (96, 87, 210);
+ selectedFg = new Gdk.Color (255, 255, 255);
lineMarker = new Gdk.Color (200, 255, 255);
ruler = new Gdk.Color (187, 187, 187);
whitespaceMarker = new Gdk.Color (187, 187, 187);
@@ -220,6 +227,9 @@
case "SelectedBackground":
this.selectedBg = color;
break;
+ case "SelectedForeground":
+ this.selectedFg = color;
+ break;
case "LineMarker":
this.lineMarker = color;
break;
Modified: trunk/monodevelop/main/src/addins/Mono.Texteditor/OblivionStyle.xml
===================================================================
--- trunk/monodevelop/main/src/addins/Mono.Texteditor/OblivionStyle.xml
2008-01-24 22:33:44 UTC (rev 93854)
+++ trunk/monodevelop/main/src/addins/Mono.Texteditor/OblivionStyle.xml
2008-01-24 22:50:25 UTC (rev 93855)
@@ -26,6 +26,7 @@
<Color name="Default">#d3d7cf</Color>
<Color name="Background">#2e3436</Color>
<Color name="SelectedBackground">#888a85</Color>
+ <Color name="SelectedForeground">#000000</Color>
<Color name="LineMarker">#555753</Color>
<Color name="Ruler">#CC44CC</Color>
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches