summaryrefslogtreecommitdiff
path: root/python/examples
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples')
-rw-r--r--python/examples/triage/byte.py10
-rw-r--r--python/examples/triage/view.py3
2 files changed, 8 insertions, 5 deletions
diff --git a/python/examples/triage/byte.py b/python/examples/triage/byte.py
index 4caf228f..fe887fb4 100644
--- a/python/examples/triage/byte.py
+++ b/python/examples/triage/byte.py
@@ -207,8 +207,7 @@ class ByteView(QAbstractScrollArea, View):
areaSize = self.viewport().size()
self.adjustSize(areaSize.width(), areaSize.height())
- def createRenderContext(self):
- render = RenderContext(self)
+ def getFont(self):
userFont = binaryninjaui.getMonospaceFont(self)
if sys.platform == "darwin":
# Some fonts aren't fixed width across all characters, use a known good one
@@ -216,7 +215,11 @@ class ByteView(QAbstractScrollArea, View):
font.setKerning(False)
else:
font = userFont
- render.setFont(font)
+ return font
+
+ def createRenderContext(self):
+ render = RenderContext(self)
+ render.setFont(self.getFont())
return render
def adjustSize(self, width, height):
@@ -314,6 +317,7 @@ class ByteView(QAbstractScrollArea, View):
self.lines.insert(0, line)
self.topLine += 1
self.topAddr = prevEnd
+ return True
def cacheNextLines(self):
lastAddr = self.data.start
diff --git a/python/examples/triage/view.py b/python/examples/triage/view.py
index f5e5ac70..d6d3588f 100644
--- a/python/examples/triage/view.py
+++ b/python/examples/triage/view.py
@@ -127,8 +127,7 @@ class TriageView(QScrollArea, View):
def navigate(self, addr):
if self.byteView:
return self.byteView.navigate(addr)
- else:
- return self.navigate(addr)
+ return False
def startFullAnalysis(self):
Settings().set_string("analysis.mode", "full", self.data)