예제 #1
0
 def __init__(self, parent=None):
     QLineEdit.__init__(self, parent)
     self.setAttribute(Qt.WidgetAttribute.WA_MacShowFocusRect, False)
     self.setStyleSheet(
         'QLineEdit { background: transparent; color: %s; selection-background-color: %s }'
         % (
             color('status bar foreground', 'palette(window-text)'),
             color('status bar selection', 'palette(window-text)'),
         ))
     self.search_forward = True
     self.textEdited.connect(self.text_edited)
예제 #2
0
파일: ask.py 프로젝트: kovidgoyal/vise
 def __init__(self, parent=None):
     QLineEdit.__init__(self, parent)
     self.setAttribute(Qt.WidgetAttribute.WA_MacShowFocusRect, False)
     self.setStyleSheet('''
     QLineEdit {
         border-radius: 8px;
         padding: 1px 6px;
         background: BG;
         color: FG;
         selection-background-color: SEL;
     }
     '''.replace('BG', color('status bar background',
                             'palette(window)')).replace(
                                 'FG',
                                 color('status bar foreground',
                                       'palette(window-text)')).replace(
                                           'SEL',
                                           color('status bar selection',
                                                 'palette(highlight)')))
     self.setPlaceholderText(_('Enter command'))