From c1ee773480fccdd16b7a1a66d1a80436ad662b12 Mon Sep 17 00:00:00 2001 From: sepa Date: Mon, 24 Aug 2015 10:30:01 +0300 Subject: [PATCH] python colors tune --- SynNotes/Form.Designer.cs | 6 +++--- SynNotes/Form.cs | 11 ++++++++--- SynNotes/Form.resx | 2 +- SynNotes/Properties/AssemblyInfo.cs | 2 +- SynNotes/themes/Visual Studio.xml | 30 ++++++++++++++--------------- 5 files changed, 28 insertions(+), 23 deletions(-) diff --git a/SynNotes/Form.Designer.cs b/SynNotes/Form.Designer.cs index 1c67217..ae5a0de 100644 --- a/SynNotes/Form.Designer.cs +++ b/SynNotes/Form.Designer.cs @@ -333,7 +333,7 @@ private void InitializeComponent() this.panelFind.Controls.Add(this.tbFind); this.panelFind.Location = new System.Drawing.Point(567, 0); this.panelFind.Name = "panelFind"; - this.panelFind.Padding = new System.Windows.Forms.Padding(3); + this.panelFind.Padding = new System.Windows.Forms.Padding(3, 0, 0, 3); this.panelFind.Size = new System.Drawing.Size(200, 27); this.panelFind.TabIndex = 3; this.panelFind.Visible = false; @@ -343,9 +343,9 @@ private void InitializeComponent() this.tbFind.BorderStyle = System.Windows.Forms.BorderStyle.None; this.tbFind.Dock = System.Windows.Forms.DockStyle.Fill; this.tbFind.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.tbFind.Location = new System.Drawing.Point(3, 3); + this.tbFind.Location = new System.Drawing.Point(3, 0); this.tbFind.Name = "tbFind"; - this.tbFind.Size = new System.Drawing.Size(194, 19); + this.tbFind.Size = new System.Drawing.Size(197, 19); this.tbFind.TabIndex = 0; this.tbFind.TextChanged += new System.EventHandler(this.tbFind_TextChanged); // diff --git a/SynNotes/Form.cs b/SynNotes/Form.cs index fd17996..09122b1 100644 --- a/SynNotes/Form.cs +++ b/SynNotes/Form.cs @@ -122,6 +122,7 @@ private void Form1_Shown(object sender, EventArgs e) { hook.SetHotkey(2, s); ToolTip tt = new ToolTip(); tt.SetToolTip(tbFind, "Enter/F3: FindNext, Shift-F3: FindPrevious"); + panelFind.Height = tbFind.Height + 3; }, ui); } @@ -320,9 +321,13 @@ private void Form1_KeyDown(object sender, KeyEventArgs e) { treeSelLine = tree.SelectedIndex; this.WindowState = FormWindowState.Minimized; } + e.SuppressKeyPress = true; } // Ctrl-F else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.F) { + panelFind.Left = (scEdit.LinesOnScreen >= scEdit.Lines.Count) ? + scEdit.Width - 200 : + scEdit.Width - 199 - SystemInformation.VerticalScrollBarWidth; panelFind.Visible = true; tbFind.Focus(); tbFind.SelectAll(); @@ -1446,7 +1451,7 @@ private void scEdit_UpdateUI(object sender, UpdateUIEventArgs e) { if ((e.Change & UpdateChange.Selection) > 0) { string ss = scEdit.SelectedText; if (ss.Length > 3 && ss.IndexOfAny(new char[] { ' ', '(', ')' }) == -1) HighlightText(ss); - else HighlightText(""); + else if(!tbFind.Visible) HighlightText(""); } //caret moved - brace matching var caretPos = scEdit.CurrentPosition; @@ -1774,7 +1779,7 @@ private void FindNext() { scEdit.Lines[scEdit.CurrentLine].EnsureVisible(); //unfold scEdit.FirstVisibleLine = scEdit.CurrentLine - 3; HighlightText(tbFind.Text); - } + } } private void FindPrev() { @@ -1802,7 +1807,7 @@ internal void HighlightText(string text, bool scrollToFirst=false) { scEdit.TargetStart = 0; scEdit.TargetEnd = scEdit.TextLength; while (scEdit.SearchInTarget(item) != -1) { - scEdit.IndicatorFillRange(scEdit.TargetStart, scEdit.TargetEnd - scEdit.TargetStart); + if (scEdit.TargetStart != scEdit.SelectionStart) scEdit.IndicatorFillRange(scEdit.TargetStart, scEdit.TargetEnd - scEdit.TargetStart); scEdit.TargetStart = scEdit.TargetEnd; scEdit.TargetEnd = scEdit.TextLength; if (scrollToFirst && scEdit.LineFromPosition(scEdit.TargetStart) < top) top = scEdit.LineFromPosition(scEdit.TargetStart); diff --git a/SynNotes/Form.resx b/SynNotes/Form.resx index fb88023..ea91119 100644 --- a/SynNotes/Form.resx +++ b/SynNotes/Form.resx @@ -149,7 +149,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM - CwAAAk1TRnQBSQFMAgEBCgEAAaABAQGgAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CwAAAk1TRnQBSQFMAgEBCgEAAbABAQGwAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/SynNotes/Properties/AssemblyInfo.cs b/SynNotes/Properties/AssemblyInfo.cs index 54f391a..4693bb0 100644 --- a/SynNotes/Properties/AssemblyInfo.cs +++ b/SynNotes/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("15.04.30.0")] +[assembly: AssemblyFileVersion("15.08.24.0")] [assembly: NeutralResourcesLanguageAttribute("en-US")] diff --git a/SynNotes/themes/Visual Studio.xml b/SynNotes/themes/Visual Studio.xml index 5bfad7f..7a07802 100644 --- a/SynNotes/themes/Visual Studio.xml +++ b/SynNotes/themes/Visual Studio.xml @@ -20,14 +20,14 @@ Theme name : Visual Studio - alignas alignof noexcept nullptr static_assert thread_local final override - - + alignas alignof noexcept nullptr static_assert thread_local final override + + True False - + @@ -258,17 +258,17 @@ Theme name : Visual Studio - - - - XmlUtil loadXmlString TopologyXmlTree NotificationArea loadXmlFile debug - - - - - - alert appendChild arguments array blur checked childNodes className confirm dialogArguments event focus getElementById getElementsByTagName innerHTML keyCode length location null number parentNode push RegExp replace selectNodes selectSingleNode setAttribute split src srcElement test undefined value window - + + + + XmlUtil loadXmlString TopologyXmlTree NotificationArea loadXmlFile debug + + + + + + alert appendChild arguments array blur checked childNodes className confirm dialogArguments event focus getElementById getElementsByTagName innerHTML keyCode length location null number parentNode push RegExp replace selectNodes selectSingleNode setAttribute split src srcElement test undefined value window +