Skip to content

Commit

Permalink
ColorSchemeIDA: Use configured color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
mborgerson committed Sep 24, 2023
1 parent af720fe commit 3126e6e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions angrmanagement/ui/widgets/qccode_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
from angr.sim_type import SimType
from angr.sim_variable import SimTemporaryVariable, SimVariable
from pyqodeng.core import api, modes, panels
from pyqodeng.core.api.syntax_highlighter import COLOR_SCHEME_KEYS
from PySide6.QtCore import QEvent, Qt
from PySide6.QtGui import QAction, QKeySequence, QTextCharFormat
from PySide6.QtGui import QAction, QKeySequence
from PySide6.QtWidgets import QApplication, QInputDialog, QLineEdit, QMenu

from angrmanagement.ui.dialogs.rename_node import RenameNode
Expand All @@ -28,7 +29,7 @@
from angrmanagement.ui.documents.qcodedocument import QCodeDocument
from angrmanagement.ui.menus.menu import Menu
from angrmanagement.ui.views.disassembly_view import DisassemblyView
from angrmanagement.ui.widgets.qccode_highlighter import QCCodeHighlighter
from angrmanagement.ui.widgets.qccode_highlighter import FORMATS, QCCodeHighlighter

if TYPE_CHECKING:
from PySide6.QtGui import QTextDocument
Expand All @@ -43,11 +44,10 @@ class ColorSchemeIDA(api.ColorScheme):

def __init__(self):
super().__init__("default")

# override existing formats
function_format = QTextCharFormat()
function_format.setForeground(self._get_brush("0000ff"))
self.formats["function"] = function_format
for k, v in FORMATS.items():
if k in COLOR_SCHEME_KEYS:
self.formats[COLOR_SCHEME_KEYS[k]] = v
self.formats[k] = v


class QCCodeEdit(api.CodeEdit):
Expand Down

0 comments on commit 3126e6e

Please sign in to comment.