Skip to content

Commit

Permalink
Add zoom in/out buttons and functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntoll committed Dec 9, 2015
1 parent 0e31d90 commit c7576a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions mu/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,42 +196,29 @@ def configure(self):
"REPL", self,
statusTip="Connect to the MicroPython REPL for live coding of the micro:bit.",
triggered=self.editor.repl)
#self.run_python_file_act = QAction(
# load_icon("run"),
# "Run", self,
# statusTip="Run your Python file",
# triggered=self.editor.project.run)
# self.build_python_file_act = QAction(
# load_icon("build"),
# "Build", self,
# statusTip="Build Python into Hex file",
# triggered=self._build_python_file)
"""

self.zoom_in_act = QAction(
load_icon("zoom-in"),
"Zoom in", self,
statusTip="Make the text bigger",
"Zoom In", self,
statusTip="Zoom in (to make the text bigger).",
triggered=self.editor.zoom_in)

self.zoom_out_act = QAction(
load_icon("zoom-out"),
"Zoom out", self,
statusTip="Make the text smaller",
"Zoom Out", self,
statusTip="Zoom out (to make the text smaller).",
triggered=self.editor.zoom_out)
"""
# Add the actions to the button bar.
self.addAction(self.new_script_act)
self.addAction(self.load_python_file_act)
self.addAction(self.save_python_file_act)
self.addSeparator()
self.addAction(self.snippets_act)
self.addAction(self.flash_act)
self.addAction(self.repl_act)
#self.addAction(self.run_python_file_act)
# self.addAction(self.build_python_file_act)
"""
self.addSeparator()
self.addAction(self.zoom_in_act)
self.addAction(self.zoom_out_act)
"""

def _new_python_file():
"""
Expand Down
Binary file modified mu/resources/images/zoom-in.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified mu/resources/images/zoom-out.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c7576a8

Please sign in to comment.