Skip to content

Commit d4e2b37

Browse files
committed
Fix macro panel layout: console taking too much space on first open
The macro panel's vertical splitter now sets explicit initial sizes (70% for script editor, 30% for console) to ensure proper layout when first opened, instead of relying only on stretch factors which could result in the console taking excessive vertical space.
1 parent 84c404b commit d4e2b37

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

datalab/gui/panel/macro.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ def __init__(self, parent: QW.QMainWindow) -> None:
204204
self.addWidget(widget)
205205
self.setStretchFactor(0, 2)
206206
self.setStretchFactor(1, 1)
207+
# Set initial sizes: give more space to editor (70%) than console (30%)
208+
# This ensures proper layout on first open
209+
total_height = 600 # Default reasonable height
210+
self.setSizes([int(total_height * 0.7), int(total_height * 0.3)])
207211

208212
self.run_action = None
209213
self.stop_action = None

doc/locale/fr/LC_MESSAGES/release_notes/release_1.00.po

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: DataLab \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-12-04 15:05+0100\n"
10+
"POT-Creation-Date: 2025-12-04 15:55+0100\n"
1111
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language: fr\n"
@@ -27,6 +27,13 @@ msgstr ""
2727
msgid "🛠️ Bug Fixes since version 1.0.2"
2828
msgstr "🛠️ Correctifs depuis la version 1.0.2"
2929

30+
msgid "**Macro panel layout:**"
31+
msgstr "**Disposition du panneau des macros :**"
32+
33+
#, python-format
34+
msgid "Fixed macro console taking excessive vertical space on first open - the script editor now properly gets 70% of space and console 30% by default, ensuring comfortable editing without manual resizing"
35+
msgstr "Correction du panneau de la console des macros prenant un espace vertical excessif à la première ouverture - l'éditeur de scripts obtient désormais correctement 70 % de l'espace et la console 30 % par défaut, garantissant une édition confortable sans redimensionnement manuel"
36+
3037
msgid "**Macro execution:**"
3138
msgstr "**Exécution des macros :**"
3239

doc/release_notes/release_1.00.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
### 🛠️ Bug Fixes since version 1.0.2 ###
66

7+
**Macro panel layout:**
8+
9+
* Fixed macro console taking excessive vertical space on first open - the script editor now properly gets 70% of space and console 30% by default, ensuring comfortable editing without manual resizing
10+
711
**Macro execution:**
812

913
* Fixed syntax errors when using f-strings with nested quotes in macros (e.g., `f'text {func("arg")}'` now works correctly)

0 commit comments

Comments
 (0)