Skip to content

Commit

Permalink
Allows to use Ctrl-Mouse Wheel to Zoom IN/out in Log windows (#2650)
Browse files Browse the repository at this point in the history
  • Loading branch information
HelioGuilherme66 authored Oct 7, 2023
1 parent 45d62b8 commit b455031
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni

=== Changed

- Improved **RIDE Log** and **Parser Log** windows to allow Zoom In/Out with ``Ctrl-Mouse Wheel``
- Hide continuation markers in Project Tree
- Improved content assistance in Text Editor by allowing to filter list as we type
- Improved file changes detection to only consider valid formats
Expand Down
11 changes: 6 additions & 5 deletions src/robotide/application/CHANGELOG.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
</li><li class="listitem">
Added support for JSON variables, by using the installed Robot Framework import method
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_fixed"></a>1.2. Fixed</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">Hide continuation markers in Project Tree
</li><li class="listitem">Improved content assistance in Text Editor by allowing to filter list as we type
</li><li class="listitem">Fixed resource files dissapearing from Project tree on Windows
<li class="listitem">Fixed resource files dissapearing from Project tree on Windows
</li><li class="listitem">
Fixed missing indication of link for User Keyword, when pressing ``Ctrl`` in Grid Editor
</li><li class="listitem">
Expand All @@ -28,8 +26,11 @@
Position of cursor in Text Editor auto-suggestions when line contains multibyte characters
</li><li class="listitem">
Drag and drop of variables defined with comments between resource files
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_changed"></a>1.3. Changed</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Improved file changes detection to only consider valid formats
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_changed"></a>1.3. Changed</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">Improved RIDE Log and Parser Log windows to allow Zoom In/Out with ``Ctrl-Mouse Wheel``
</li><li class="listitem">Hide continuation markers in Project Tree
</li><li class="listitem">Improved content assistance in Text Editor by allowing to filter list as we type
</li><li class="listitem">Improved file changes detection to only consider valid formats
</li><li class="listitem">
Improved keyword ``Find Usages`` to return more matches. Fails to find mixed spaces and ``_``
</li><li class="listitem">
Expand Down
3 changes: 2 additions & 1 deletion src/robotide/application/releasenotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def set_content(self, html_win, content):
</ul>
<p><strong>New Features and Fixes Highlights</strong></p>
<ul class="simple">
<li>Improved <b>RIDE Log</b> and <b>Parser Log</b> windows to allow Zoom In/Out with <b>Ctrl-Mouse Wheel</b></li>
<li>Hide continuation markers in Project Tree</li>
<li>Improved content assistance in Text Editor by allowing to filter list as we type</li>
<li>Fixed resource files dissapearing from Project tree on Windows</li>
Expand Down Expand Up @@ -241,6 +242,6 @@ def set_content(self, html_win, content):
<pre class="literal-block">
python -m robotide.postinstall -install
</pre>
<p>RIDE {VERSION} was released on 6/Oct/2023.</p>
<p>RIDE {VERSION} was released on 7/Oct/2023.</p>
</div>
"""
20 changes: 16 additions & 4 deletions src/robotide/log/logwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

from .. import widgets
from ..widgets import RIDEDialog
from wx.stc import StyledTextCtrl


def message_to_string(msg, parserlog=False):
Expand All @@ -32,9 +33,13 @@ def __init__(self, notebook, title, log):
self.dlg = RIDEDialog()
self.title = title
self._removetabs = self.title == 'Parser Log'
self._output = wx.TextCtrl(self, style=wx.TE_READONLY | wx.TE_MULTILINE | wx.TE_NOHIDESEL)
self._output.SetBackgroundColour(Colour(self.dlg.color_background))
self._output.SetForegroundColour(Colour(self.dlg.color_foreground))
self._output = StyledTextCtrl(self, wx.ID_ANY, style=wx.TE_READONLY | wx.TE_MULTILINE | wx.TE_NOHIDESEL)
fore = self.dlg.color_foreground
backg = self.dlg.color_background
self._output.SetBackgroundColour(Colour(backg))
self._output.SetForegroundColour(Colour(fore))
self._output.StyleSetSpec(wx.stc.STC_STYLE_DEFAULT, f"fore:{fore}, back:{backg}")
self._output.StyleSetBackground(wx.stc.STC_STYLE_DEFAULT, backg)
self._output.Bind(wx.EVT_KEY_DOWN, self.on_key_down)
self._log = log
self._add_to_notebook(notebook)
Expand All @@ -51,10 +56,17 @@ def _add_to_notebook(self, notebook):
self._output.SetSize(self.Size)

def close(self, notebook):
self._output.Close()
notebook.delete_tab(self)

def update_log(self):
self._output.SetValue(self._decode_log(self._log))
content = self._decode_log(self._log)
text_size = len(content)
self._output.SetReadOnly(False)
self._output.SetText(content)
self._output.SetStyling(text_size, wx.stc.STC_STYLE_DEFAULT)
self._output.SetReadOnly(True)
self._output.Refresh()

def _decode_log(self, log):
result = ''
Expand Down
2 changes: 1 addition & 1 deletion src/robotide/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# limitations under the License.
#
# Automatically generated by `tasks.py`.
VERSION = 'v2.0.8dev17'
VERSION = 'v2.0.8dev18'

0 comments on commit b455031

Please sign in to comment.