@@ -184,6 +184,7 @@ def __init__(self):
184184 self .memReplaceBtn .setEnabled (False )
185185 self .memReplacePattern .setEnabled (False )
186186 self .hexViewer .wheelupsig .connect (self .wheelupsig_func )
187+ self .defaultcolor = QLabel ().palette ().color (QPalette .ColorRole .WindowText )
187188 self .listImgViewer .modulenamesig .connect (self .modulenamesig_func )
188189 self .memSearchResult .searchresultaddrsig .connect (self .searchresultaddrsig_func )
189190 self .arrangedresult = None
@@ -275,7 +276,7 @@ def il2cppdumpsig_func(self, il2cppdumpsig: str):
275276 self .listImgViewer .moveCursor (QTextCursor .MoveOperation .Start , QTextCursor .MoveMode .MoveAnchor )
276277 self .listImgViewer .setTextColor (QColor ("Red" ))
277278 self .listImgViewer .insertPlainText ("Dumped file at: " + il2cppdumpsig + "\n \n " )
278- self .listImgViewer .setTextColor (QColor ( "Black" ) )
279+ self .listImgViewer .setTextColor (self . defaultcolor )
279280 # after il2cpp dump some android apps crash
280281 self .il2cppdumpworker .terminate ()
281282
@@ -960,16 +961,13 @@ def dump_module(self):
960961 self .statusBar ().showMessage ("dump fail. try again" , 3000 )
961962 else :
962963 self .listImgViewer .moveCursor (QTextCursor .MoveOperation .Start , QTextCursor .MoveMode .MoveAnchor )
963- # Create a temporary QLabel to get the default text color
964- temp_label = QLabel ()
965- default_color = temp_label .palette ().color (QPalette .ColorRole .WindowText )
966964 self .listImgViewer .setTextColor (QColor ("Red" ))
967965 if self .platform == 'darwin' :
968966 self .listImgViewer .insertPlainText ('Dumped file at: ' + result + "\n \n " )
969967 elif self .platform == 'linux' :
970968 self .listImgViewer .insertPlainText (
971969 'Dumped file at: ' + result + "\n \n You need to fix so file using SoFixer\n \n " )
972- self .listImgViewer .setTextColor (default_color ) # Revert to the default color
970+ self .listImgViewer .setTextColor (self . defaultcolor ) # Revert to the default color
973971 revert_frida_script ()
974972
975973 def search_img (self ):
0 commit comments