Skip to content

Commit 4f519ad

Browse files
Improved vertical scroll in Grid Editor (#2957)
* Remove always show scrollbars * Improved vertical scroll in Grid Editor
1 parent 43232cb commit 4f519ad

File tree

8 files changed

+21
-12
lines changed

8 files changed

+21
-12
lines changed

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni
1818
when selecting in Tree shows the filename in StatusBar.
1919

2020
=== Changed
21+
- Improved vertical scroll in Grid Editor, by having main scroll bars out of cells
2122
- Changed arguments parser to allow ``--version`` and ``--help`` functional in Windows
2223
- Improved auto-complete in Grid Editor, to allow several matches
2324
- Changed some informative dialogs and JSON Editor to use the customized colors.

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Likewise, the current version of wxPython, is 4.2.3, but RIDE is known to work w
4141

4242
`pip install -U robotframework-ride`
4343

44-
(3.8 <= python <= 3.13) Install current development version (**2.2dev28**) with:
44+
(3.8 <= python <= 3.13) Install current development version (**2.2dev29**) with:
4545

4646
`pip install -U https://github.com/robotframework/RIDE/archive/develop.zip`
4747

src/robotide/application/CHANGELOG.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
Added divided Status Bar. Left side for main window, right side for Plugins. Working example in Text Editor,
1515
when selecting in Tree shows the filename in StatusBar.
1616
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_changed"></a>1.2. Changed</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
17+
Improved vertical scroll in Grid Editor, by having main scroll bars out of cells
18+
</li><li class="listitem">
1719
Changed arguments parser to allow ``--version`` and ``--help`` functional in Windows
1820
</li><li class="listitem">
1921
Improved auto-complete in Grid Editor, to allow several matches

src/robotide/application/releasenotes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ def set_content(self, html_win, content):
172172
</ul>
173173
<p><strong>New Features and Fixes Highlights</strong></p>
174174
<ul class="simple">
175+
<li>Improved vertical scroll in Grid Editor, by having main scroll bars out of cells.</li>
175176
<li>Fixed Create Desktop Shortcut by pointing executable to <b>python -m robotide</b>.</li>
176177
<li>Changed arguments parser to allow <b>--version</b> and <b>--help</b> functional in Windows.</li>
177178
<li>Improved auto-complete in Grid Editor, to allow several matches.</li>
@@ -240,7 +241,7 @@ def set_content(self, html_win, content):
240241
<pre class="literal-block">python -m robotide.postinstall -install</pre>
241242
<p>or</p>
242243
<pre class="literal-block">ride_postinstall.py -install</pre>
243-
<p>RIDE {VERSION} was released on 25/May/2025.</p>
244+
<p>RIDE {VERSION} was released on 28/May/2025.</p>
244245
<!-- <br/>
245246
<h3>May The Fourth Be With You!</h3>
246247
<h3>Celebrate the bank holiday, 10th June, Day of Portugal, Portuguese Communities and Camões!!</h3>

src/robotide/editor/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ def on_file_deleted(self, message):
193193
self._create_editor()
194194

195195

196-
class _EditorTab(wx.Panel):
196+
class _EditorTab(wx.ScrolledWindow):
197197

198198
def __init__(self, plugin):
199-
wx.Panel.__init__(self, plugin.notebook, style=wx.SUNKEN_BORDER)
199+
wx.ScrolledWindow.__init__(self, plugin.notebook, style=wx.SUNKEN_BORDER)
200200
self.plugin = plugin
201201
self.sizer = wx.BoxSizer(wx.VERTICAL)
202202
self.SetSizer(self.sizer)

src/robotide/editor/editors.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class EditorPanel(wx.lib.scrolledpanel.ScrolledPanel):
6060
= show_content_assist = lambda self: None
6161

6262
def __init__(self, plugin, parent, controller, tree):
63-
wx.lib.scrolledpanel.ScrolledPanel.__init__(self, parent, style=wx.HSCROLL|wx.VSCROLL|wx.ALWAYS_SHOW_SB)
63+
wx.lib.scrolledpanel.ScrolledPanel.__init__(self, parent, style=wx.HSCROLL|wx.VSCROLL)
6464
from ..preferences import RideSettings
6565
_settings = RideSettings()
6666
self.general_settings = _settings['General']
@@ -98,6 +98,7 @@ def __init__(self, plugin, parent, controller, tree):
9898
self.sizer = wx.BoxSizer(wx.VERTICAL)
9999
self.Bind(wx.EVT_IDLE, self.on_idle)
100100
self.SetSizer(self.sizer)
101+
self.SetupScrolling()
101102
if self.title:
102103
self.sizer.Add(self._create_header(self.title),
103104
0, wx.EXPAND | wx.ALL, 6)
@@ -189,8 +190,10 @@ def _restore_settings_open_status(self):
189190
def _collabsible_changed(self, event=None):
190191
self._store_settings_open_status()
191192
self.GetSizer().Layout()
193+
self.EnableScrolling(True, True)
192194
self.Refresh()
193195
self.Parent.GetSizer().Layout()
196+
self.Parent.EnableScrolling(True, True)
194197
self.Parent.Refresh()
195198
if event:
196199
event.Skip()

src/robotide/editor/kweditor.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import builtins
1717
import json
18+
from typing import Iterable
1819
from json.decoder import JSONDecodeError
1920
from multiprocessing import shared_memory
2021

@@ -91,7 +92,8 @@ def __init__(self, parent, controller, tree):
9192
self.color_background_help = self.general_settings['background help']
9293
self.color_foreground_text = self.general_settings['foreground text']
9394
GridEditor.__init__(self, parent, len(controller.steps) + 5, max((controller.max_columns + 1), 5),
94-
parent.plugin.grid_popup_creator)
95+
parent.plugin.grid_popup_creator)
96+
self._grid = self.GetGridWindow()
9597
self._popup_items = ([
9698
_('Insert Cells\tCtrl-Shift-I'), _('Delete Cells\tCtrl-Shift-D'),
9799
_(INS_ROWS), _(DEL_ROWS), '---',
@@ -192,10 +194,10 @@ def __init__(self, parent, controller, tree):
192194
self._namespace_updated = None
193195
self.InheritAttributes()
194196
self.col_label_element = None
195-
if hasattr(self, 'SetupScrolling'):
196-
self.SetupScrolling(scrollToTop=True, scrollIntoView=True)
197-
self.ShowScrollbars(wx.SHOW_SB_ALWAYS, wx.SHOW_SB_ALWAYS)
198-
print("DEBUG: GridBase init at SELF SetupScrolling\n")
197+
# if hasattr(self, 'SetupScrolling'):
198+
# self.SetupScrolling(scrollToTop=True, scrollIntoView=True)
199+
# # self.ShowScrollbars(wx.SHOW_SB_ALWAYS, wx.SHOW_SB_ALWAYS)
200+
# print("DEBUG: KwEditor init at SELF SetupScrolling\n")
199201
# self.Refresh()
200202
PUBLISHER.subscribe(self._before_saving, RideBeforeSaving)
201203
PUBLISHER.subscribe(self._data_changed, RideItemStepsChanged)
@@ -698,7 +700,7 @@ def _execute_clipboard_command(self, command_class):
698700
data = self._get_main_data(data)
699701
self._execute(command_class(self.selection.topleft, data))
700702

701-
def _get_main_data(self, data: []) -> []:
703+
def _get_main_data(self, data: Iterable) -> list:
702704
main_data = []
703705
for ldata in data:
704706
new_data = []

src/robotide/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
#
1616
# Automatically generated by `tasks.py`.
1717

18-
VERSION = 'v2.2dev28'
18+
VERSION = 'v2.2dev29'

0 commit comments

Comments
 (0)