Skip to content

Commit 701e432

Browse files
committed
Merge branch 'development' into watches_saving
2 parents 8cfd4a7 + 32aeaf9 commit 701e432

File tree

55 files changed

+546
-242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+546
-242
lines changed

External/3rdParty/Aga-1.7/Aga.Controls/Tree/Input/ReorderColumnState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ReorderColumnState(TreeViewAdv tree, TreeColumn column, Point initialMous
4141
{
4242
_location = new Point(initialMouseLocation.X + Tree.OffsetX, 0);
4343
_dragOffset = tree.GetColumnX(column) - initialMouseLocation.X;
44-
_ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ActualColumnHeaderHeight), tree.Font);
44+
_ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ActualColumnHeaderHeight), tree.Font, tree.ForeColor);
4545
}
4646

4747
public override void KeyDown(KeyEventArgs args)

External/3rdParty/Aga-1.7/Aga.Controls/Tree/TreeColumn.cs

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -288,23 +288,22 @@ private static void CreateRenderers()
288288
}
289289
}
290290

291-
internal Bitmap CreateGhostImage(Rectangle bounds, Font font)
291+
internal Bitmap CreateGhostImage(Rectangle bounds, Font font, Color color)
292292
{
293293
Bitmap b = new Bitmap(bounds.Width, bounds.Height, PixelFormat.Format32bppArgb);
294294
Graphics gr = Graphics.FromImage(b);
295295
gr.FillRectangle(SystemBrushes.ControlDark, bounds);
296-
DrawContent(gr, bounds, font);
296+
DrawContent(gr, bounds, font, color);
297297
BitmapHelper.SetAlphaChanelValue(b, 150);
298298
return b;
299299
}
300300

301-
internal void Draw(Graphics gr, Rectangle bounds, Font font, bool pressed, bool hot)
301+
internal void Draw(Graphics gr, Rectangle bounds, Font font, bool pressed, bool hot, Color color)
302302
{
303-
DrawBackground(gr, bounds, pressed, hot);
304-
DrawContent(gr, bounds, font);
303+
DrawContent(gr, bounds, font, color);
305304
}
306305

307-
private void DrawContent(Graphics gr, Rectangle bounds, Font font)
306+
private void DrawContent(Graphics gr, Rectangle bounds, Font font, Color color)
308307
{
309308
Rectangle innerBounds = new Rectangle(bounds.X + HeaderLeftMargin, bounds.Y,
310309
bounds.Width - HeaderLeftMargin - HeaderRightMargin,
@@ -331,9 +330,9 @@ private void DrawContent(Graphics gr, Rectangle bounds, Font font)
331330
}
332331

333332
if (textSize.Width < maxTextSize.Width)
334-
TextRenderer.DrawText(gr, Header, font, innerBounds, SystemColors.ControlText, _baseHeaderFlags | TextFormatFlags.Left);
333+
TextRenderer.DrawText(gr, Header, font, innerBounds, color, _baseHeaderFlags | TextFormatFlags.Left);
335334
else
336-
TextRenderer.DrawText(gr, Header, font, innerBounds, SystemColors.ControlText, _headerFlags);
335+
TextRenderer.DrawText(gr, Header, font, innerBounds, color, _headerFlags);
337336
}
338337

339338
private void DrawSortMark(Graphics gr, Rectangle bounds, int x)
@@ -391,11 +390,20 @@ internal static void DrawBackground(Graphics gr, Rectangle bounds, bool pressed,
391390
}
392391
}
393392

394-
#endregion
393+
internal static void DrawCustomBackground(Graphics gr, Color back, Color fore, Rectangle bounds, bool pressed, bool hot)
394+
{
395+
gr.FillRectangle(new SolidBrush(back), bounds);
396+
Pen p1 = new Pen(fore);
397+
gr.DrawLine(p1, bounds.X, bounds.Y - 1, bounds.Right, bounds.Y - 1);
398+
gr.DrawLine(p1, bounds.Right - 1, bounds.Y + 3, bounds.Right - 1, bounds.Bottom - 4);
399+
gr.DrawLine(p1, bounds.X, bounds.Bottom, bounds.Right, bounds.Bottom);
400+
}
401+
402+
#endregion
395403

396-
#region Events
404+
#region Events
397405

398-
public event EventHandler HeaderChanged;
406+
public event EventHandler HeaderChanged;
399407
private void OnHeaderChanged()
400408
{
401409
if (HeaderChanged != null)

External/3rdParty/Aga-1.7/Aga.Controls/Tree/TreeViewAdv.Draw.cs

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public void AutoSizeColumn(TreeColumn column)
4040
private void CreatePens()
4141
{
4242
CreateLinePen();
43-
CreateMarkPen();
43+
CreateMarkPen();
44+
CreateLine2Pen();
4445
}
4546

4647
private void CreateMarkPen()
@@ -61,6 +62,11 @@ private void CreateLinePen()
6162
_linePen.DashStyle = DashStyle.Dot;
6263
}
6364

65+
private void CreateLine2Pen()
66+
{
67+
_line2Pen = new Pen(_lineColor);
68+
}
69+
6470
protected override void OnPaintBackground(PaintEventArgs pevent)
6571
{
6672
if (this.BackgroundPaintMode == Tree.BackgroundPaintMode.Gradiant)
@@ -90,7 +96,7 @@ protected override void OnPaint(PaintEventArgs e)
9096

9197
if (UseColumns)
9298
{
93-
DrawColumnHeaders(e.Graphics);
99+
DrawColumnHeaders(e.Graphics, this.ColumnHeaderBackColor, this.ColumnHeaderBorderColor, this.ColumnHeaderTextColor);
94100
y += ActualColumnHeaderHeight;
95101
if (Columns.Count == 0 || e.ClipRectangle.Height + e.ClipRectangle.Top <= y)
96102
return;
@@ -169,7 +175,7 @@ private void DrawRow(PaintEventArgs e, ref DrawContext context, int row, Rectang
169175
}
170176

171177
if ((GridLineStyle & GridLineStyle.Horizontal) == GridLineStyle.Horizontal)
172-
e.Graphics.DrawLine(SystemPens.InactiveBorder, 0, rowRect.Bottom, e.Graphics.ClipBounds.Right, rowRect.Bottom);
178+
e.Graphics.DrawLine(_line2Pen, 0, rowRect.Bottom, e.Graphics.ClipBounds.Right, rowRect.Bottom);
173179

174180
if (ShowLines)
175181
DrawLines(e.Graphics, node, rowRect);
@@ -185,18 +191,21 @@ private void DrawVerticalGridLines(Graphics gr, int y)
185191
if (c.IsVisible)
186192
{
187193
x += c.Width;
188-
gr.DrawLine(SystemPens.InactiveBorder, x - 1, y, x - 1, gr.ClipBounds.Bottom);
194+
gr.DrawLine(_line2Pen, x - 1, y, x - 1, gr.ClipBounds.Bottom);
189195
}
190196
}
191197
}
192198

193-
private void DrawColumnHeaders(Graphics gr)
199+
private void DrawColumnHeaders(Graphics gr, Color back, Color fore, Color text)
194200
{
195201
PerformanceAnalyzer.Start("DrawColumnHeaders");
196202
ReorderColumnState reorder = Input as ReorderColumnState;
197203
int x = 0;
198-
TreeColumn.DrawBackground(gr, new Rectangle(0, 0, ClientRectangle.Width + 2, ActualColumnHeaderHeight - 1), false, false);
199-
gr.TranslateTransform(-OffsetX, 0);
204+
205+
if (this.CustomDrawHeaders) TreeColumn.DrawCustomBackground(gr, back, fore, new Rectangle(0, 0, ClientRectangle.Width + 2, ActualColumnHeaderHeight - 1), false, false);
206+
else TreeColumn.DrawBackground(gr, new Rectangle(0, 0, ClientRectangle.Width + 2, ActualColumnHeaderHeight - 1), false, false);
207+
208+
gr.TranslateTransform(-OffsetX, 0);
200209
foreach (TreeColumn c in Columns)
201210
{
202211
if (c.IsVisible)
@@ -206,7 +215,12 @@ private void DrawColumnHeaders(Graphics gr)
206215
Rectangle rect = new Rectangle(x, 0, c.Width, ActualColumnHeaderHeight - 1);
207216
gr.SetClip(rect);
208217
bool pressed = ((Input is ClickColumnState || reorder != null) && ((Input as ColumnState).Column == c));
209-
c.Draw(gr, rect, Font, pressed, _hotColumn == c);
218+
219+
if (this.CustomDrawHeaders) TreeColumn.DrawCustomBackground(gr, back, fore, rect, pressed, _hotColumn == c);
220+
else TreeColumn.DrawBackground(gr, rect, pressed, _hotColumn == c);
221+
222+
c.Draw(gr, rect, Font, pressed, _hotColumn == c, text);
223+
210224
gr.ResetClip();
211225

212226
if (reorder != null && reorder.DropColumn == c)

External/3rdParty/Aga-1.7/Aga.Controls/Tree/TreeViewAdv.Properties.cs

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ namespace Aga.Controls.Tree
1313
public partial class TreeViewAdv
1414
{
1515
private Cursor _innerCursor = null;
16+
public bool CustomDrawHeaders = false;
1617

17-
public override Cursor Cursor
18+
public override Cursor Cursor
1819
{
1920
get
2021
{
@@ -657,7 +658,43 @@ public int Indent
657658
}
658659
}
659660

660-
private Color _lineColor = SystemColors.ControlDark;
661+
private Color _columnTextColor = SystemColors.ControlText;
662+
[Category("Behavior")]
663+
public Color ColumnHeaderTextColor
664+
{
665+
get { return _columnTextColor; }
666+
set
667+
{
668+
_columnTextColor = value;
669+
UpdateView();
670+
}
671+
}
672+
673+
private Color _columnBackColor = SystemColors.Control;
674+
[Category("Behavior")]
675+
public Color ColumnHeaderBackColor
676+
{
677+
get { return _columnBackColor; }
678+
set
679+
{
680+
_columnBackColor = value;
681+
UpdateView();
682+
}
683+
}
684+
685+
private Color _columnBorderColor = SystemColors.ActiveBorder;
686+
[Category("Behavior")]
687+
public Color ColumnHeaderBorderColor
688+
{
689+
get { return _columnBorderColor; }
690+
set
691+
{
692+
_columnBorderColor = value;
693+
UpdateView();
694+
}
695+
}
696+
697+
private Color _lineColor = SystemColors.ControlDark;
661698
[Category("Behavior")]
662699
public Color LineColor
663700
{
@@ -670,7 +707,20 @@ public Color LineColor
670707
}
671708
}
672709

673-
private Color _dragDropMarkColor = Color.Black;
710+
private Color _lineColor2 = SystemColors.ControlDark;
711+
[Category("Behavior")]
712+
public Color LineColor2
713+
{
714+
get { return _lineColor2; }
715+
set
716+
{
717+
_lineColor2 = value;
718+
CreateLine2Pen();
719+
UpdateView();
720+
}
721+
}
722+
723+
private Color _dragDropMarkColor = Color.Black;
674724
[Category("Behavior")]
675725
public Color DragDropMarkColor
676726
{

External/3rdParty/Aga-1.7/Aga.Controls/Tree/TreeViewAdv.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public partial class TreeViewAdv : Control
2929
private const int DividerCorrectionGap = -2;
3030

3131
private Pen _linePen;
32-
private Pen _markPen;
32+
private Pen _line2Pen;
33+
private Pen _markPen;
3334
private bool _suspendUpdate;
3435
private bool _needFullUpdate;
3536
private bool _fireSelectionEvent;
@@ -491,7 +492,8 @@ protected override void Dispose(bool disposing)
491492
if (_dragBitmap != null) _dragBitmap.Dispose();
492493
if (_dragTimer != null) _dragTimer.Dispose();
493494
if (_linePen != null) _linePen.Dispose();
494-
if (_markPen != null) _markPen.Dispose();
495+
if (_line2Pen != null) _linePen.Dispose();
496+
if (_markPen != null) _markPen.Dispose();
495497
}
496498
base.Dispose(disposing);
497499
}

External/Plugins/ASCompletion/Completion/ASDocumentation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ static public string GetTipShortDetails(CommentBlock cb, string highlightParam)
457457
static private string GetShortcutDocs()
458458
{
459459
Color themeForeColor = PluginBase.MainForm.GetThemeColor("MethodCallTip.InfoColor");
460-
string foreColorString = themeForeColor != Color.Empty ? ColorTranslator.ToHtml(themeForeColor) : "#666666:MULTIPLY";
460+
string foreColorString = themeForeColor != Color.Empty ? DataConverter.ColorToHex(themeForeColor).Replace("0x", "#") : "#666666:MULTIPLY";
461461
return "\n[COLOR=" + foreColorString + "][i](" + TextHelper.GetString("Info.ShowDetails") + ")[/i][/COLOR]";
462462
}
463463

External/Plugins/ASCompletion/Completion/Reformater.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ public static bool lookupXML(string txt, ref int index)
455455
// AS expression
456456
if (c == '{')
457457
{
458-
if ((inTag && (c2 == '<' || c2 == ' ' || c2 == '=' || c2 == '/'))
458+
if ((inTag && (c2 == '<' || c2 == ' ' || c2 == '=' || c2 == '/' || c2 == '$'))
459459
|| isXML && (c2 == '>'))
460460
{
461461
inExpr = true;

External/Plugins/ASCompletion/CustomControls/ModelsExplorer.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -471,21 +471,15 @@ private void SetMatch(TreeNode node)
471471
{
472472
if (lastMatch != null)
473473
{
474-
//lastMatch.BackColor = SystemColors.Window;
475-
//lastMatch.ForeColor = SystemColors.WindowText;
476-
Color back = PluginBase.MainForm.GetThemeColor("FixedTreeView.BackColor");
477-
Color fore = PluginBase.MainForm.GetThemeColor("FixedTreeView.ForeColor");
478-
if (back == Color.Empty) lastMatch.BackColor = System.Drawing.SystemColors.Window;
479-
else lastMatch.BackColor = back;
480-
if (fore == Color.Empty) lastMatch.ForeColor = System.Drawing.SystemColors.WindowText;
481-
else lastMatch.ForeColor = fore;
474+
lastMatch.BackColor = PluginBase.MainForm.GetThemeColor("TreeView.BackColor", SystemColors.Window);
475+
lastMatch.ForeColor = PluginBase.MainForm.GetThemeColor("TreeView.ForeColor", SystemColors.WindowText);
482476

483477
}
484478
lastMatch = node;
485479
if (lastMatch != null)
486480
{
487-
lastMatch.BackColor = PluginBase.MainForm.GetThemeColor("Global.Highlight", SystemColors.Highlight);
488-
lastMatch.ForeColor = PluginBase.MainForm.GetThemeColor("Global.HighlightText", SystemColors.HighlightText);
481+
lastMatch.BackColor = PluginBase.MainForm.GetThemeColor("TreeView.Highlight", SystemColors.Highlight);
482+
lastMatch.ForeColor = PluginBase.MainForm.GetThemeColor("TreeView.HighlightText", SystemColors.HighlightText);
489483
outlineTreeView.SelectedNode = node;
490484
}
491485
}

External/Plugins/ASCompletion/PluginUI.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ private void SetHighlight(TreeNode node)
504504
outlineTree.State.highlight = currentHighlight.FullPath;
505505

506506
//currentHighlight.BackColor = System.Drawing.Color.LightGray;
507-
currentHighlight.ForeColor = PluginBase.MainForm.GetThemeColor("Global.Highlight", Color.Blue);
507+
currentHighlight.ForeColor = PluginBase.MainForm.GetThemeColor("TreeView.Highlight", SystemColors.Highlight);
508508

509509
}
510510
}
@@ -1037,8 +1037,8 @@ private void ShowAndHilightNode(TreeNode node, bool hilight)
10371037
if (hilight)
10381038
{
10391039
node.EnsureVisible();
1040-
node.BackColor = PluginBase.MainForm.GetThemeColor("Global.Highlight", SystemColors.Highlight);
1041-
node.ForeColor = PluginBase.MainForm.GetThemeColor("Global.HighlightText", SystemColors.HighlightText);
1040+
node.BackColor = PluginBase.MainForm.GetThemeColor("TreeView.Highlight", SystemColors.Highlight);
1041+
node.ForeColor = PluginBase.MainForm.GetThemeColor("TreeView.HighlightText", SystemColors.HighlightText);
10421042
}
10431043
else
10441044
{
@@ -1097,9 +1097,7 @@ void FindProcTxtEnter(object sender, System.EventArgs e)
10971097
if (findProcTxt.Text == searchInvitation)
10981098
{
10991099
findProcTxt.Text = "";
1100-
Color fore = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.ForeColor");
1101-
if (fore == Color.Empty) findProcTxt.ForeColor = System.Drawing.SystemColors.WindowText;
1102-
else findProcTxt.ForeColor = fore;
1100+
findProcTxt.ForeColor = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.ForeColor", SystemColors.WindowText);
11031101
}
11041102
}
11051103

@@ -1108,7 +1106,7 @@ void FindProcTxtLeave(object sender, System.EventArgs e)
11081106
if (findProcTxt.Text == "")
11091107
{
11101108
findProcTxt.Text = searchInvitation;
1111-
findProcTxt.ForeColor = PluginBase.MainForm.GetThemeColor("Global.GrayText", SystemColors.GrayText);
1109+
findProcTxt.ForeColor = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.GrayText", SystemColors.GrayText);
11121110
clearButton.Enabled = false;
11131111
}
11141112
}
@@ -1127,7 +1125,7 @@ private void clearButton_Click(object sender, EventArgs e)
11271125
// Update colors on start after theme engine
11281126
public void UpdateAfterTheme()
11291127
{
1130-
findProcTxt.ForeColor = PluginBase.MainForm.GetThemeColor("Global.GrayText", SystemColors.GrayText);
1128+
findProcTxt.ForeColor = PluginBase.MainForm.GetThemeColor("ToolStripTextBoxControl.GrayText", SystemColors.GrayText);
11311129
}
11321130

11331131
protected override Boolean ProcessDialogKey(Keys keyData)
@@ -1177,7 +1175,7 @@ private TreeNode FindMatch(TreeNodeCollection nodes)
11771175
{
11781176
foreach (TreeNode node in nodes)
11791177
{
1180-
if (node.BackColor == PluginBase.MainForm.GetThemeColor("Global.Highlight", SystemColors.Highlight)) return node;
1178+
if (node.BackColor == PluginBase.MainForm.GetThemeColor("TreeView.Highlight", SystemColors.Highlight)) return node;
11811179
if (node.Nodes.Count > 0)
11821180
{
11831181
TreeNode subnode = FindMatch(node.Nodes);

External/Plugins/ASCompletion/Settings/GeneralSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public int DescriptionLinesLimit
7171
const int DEFAULT_ALWAYSCOMPLETELENGTH = 2;
7272
const bool DEFAULT_DISABLECALLTIP = false;
7373
const string DEFAULT_COMPACTCHARS = ",;.():[]";
74-
const string DEFAULT_SPACEDCHARS = ",;{}*+-=/%<>|&!^";
74+
const string DEFAULT_SPACEDCHARS = ",;*+-=/%<>|&!^";
7575
const string DEFAULT_ADDSPACEAFTER = "if for while do catch with";
7676

7777
private bool disableAutoCloseBraces = DEFAULT_DISABLE_CLOSEBRACE;

0 commit comments

Comments
 (0)