#NEWLINE# def _reset_stylesheet( self ) : #NEWLINE# #INDENT# ' Resets stylesheet' #NEWLINE# self . setFont ( QtGui . QFont ( self . _font_family , ( self . _font_size + self . _zoom_level ) ) ) #NEWLINE# flg_stylesheet = hasattr ( self , '_flg_stylesheet' ) #NEWLINE# if ( QtWidgets . QApplication . instance ( ) . styleSheet ( ) or flg_stylesheet ) : #NEWLINE# #INDENT# self . _flg_stylesheet = True #NEWLINE# try : #NEWLINE# #INDENT# plasma = ( os . environ [ 'DESKTOP_SESSION' ] == 'plasma' ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# plasma = False #NEWLINE# #UNINDENT# if ( ( sys . platform == 'win32' ) or plasma ) : #NEWLINE# #INDENT# self . setStyleSheet ( ( 'QPlainTextEdit\n                {\n                    background-color: %s;\n                    color: %s;\n                }\n                ' % ( self . background . name ( ) , self . foreground . name ( ) ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . setStyleSheet ( '' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# p = self . palette ( ) #NEWLINE# p . setColor ( QtGui . QPalette . Base , self . background ) #NEWLINE# p . setColor ( QtGui . QPalette . Text , self . foreground ) #NEWLINE# p . setColor ( QtGui . QPalette . Highlight , self . selection_background ) #NEWLINE# p . setColor ( QtGui . QPalette . HighlightedText , self . selection_foreground ) #NEWLINE# self . setPalette ( p ) #NEWLINE# #UNINDENT# self . repaint ( )