Skip to content

Commit

Permalink
Add fontsize and bottom options to IPython Console prefs
Browse files Browse the repository at this point in the history
  • Loading branch information
jitseniesen committed Jan 2, 2024
1 parent 526acd5 commit 932db0f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions spyder/config/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-

#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
Expand Down Expand Up @@ -151,6 +152,8 @@
'pylab/inline/resolution': 72,
'pylab/inline/width': 6,
'pylab/inline/height': 4,
'pylab/inline/fontsize': 10.0,
'pylab/inline/bottom': 0.11,
'pylab/inline/bbox_inches': True,
'startup/run_lines': '',
'startup/use_run_file': False,
Expand Down
15 changes: 14 additions & 1 deletion spyder/plugins/ipythonconsole/confpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,18 @@ def setup_page(self):
_("Height:")+" ", " "+_("inches"),
'pylab/inline/height', min_=1, max_=20, step=1,
tip=_("Default is 4"))
fontsize_spin = self.create_spinbox(
_("Font size:")+" ", " "+_("points"),
'pylab/inline/fontsize', min_=5, max_=48, step=1.0,
tip=_("Default is 10"))
bottom_spin = self.create_spinbox(
_("Bottom edge:")+" ",
" "+_("of figure height"),
'pylab/inline/bottom', min_=0, max_=0.3, step=0.01,
tip=_("The position of the bottom edge of the "
"subplots,\nas a fraction of the figure "
"height.\nThe default is 0.11."))
bottom_spin.spinbox.setDecimals(2)
bbox_inches_box = newcb(
_("Use a tight layout for inline plots"),
'pylab/inline/bbox_inches',
Expand All @@ -186,7 +198,8 @@ def setup_page(self):
inline_layout.addWidget(format_box.label, 1, 0)
inline_layout.addWidget(format_box.combobox, 1, 1)

spinboxes = [resolution_spin, width_spin, height_spin]
spinboxes = [resolution_spin, width_spin, height_spin,
fontsize_spin, bottom_spin]
for counter, spinbox in enumerate(spinboxes):
inline_layout.addWidget(spinbox.plabel, counter + 2, 0)
inline_layout.addWidget(spinbox.spinbox, counter + 2, 1)
Expand Down

0 comments on commit 932db0f

Please sign in to comment.