Beispiel #1
0
    def setupUi(self):
        Ui_TransactionDlg.setupUi(self, self)
        self.setWindowTitle('Transaction')
        self.chb_word_wrap.setChecked(
            app_cache.get_value(CACHE_ITEM_DETAILS_WORD_WRAP, False, bool))
        self.apply_word_wrap(self.chb_word_wrap.isChecked())
        self.edt_recipients.viewport().setAutoFillBackground(False)

        if sys.platform == 'win32':
            self.base_font_size = '11'
            self.title_font_size = '15'
        elif sys.platform == 'linux':
            self.base_font_size = '11'
            self.title_font_size = '17'
        else:  # mac
            self.base_font_size = '13'
            self.title_font_size = '20'

        self.edt_raw_transaction.setStyleSheet(
            f'font: {self.base_font_size}pt "Courier New";')
        doc = QTextDocument(self)
        doc.setDocumentMargin(0)
        doc.setHtml(
            f'<span style=" font-size:{self.title_font_size}pt;white-space:nowrap">AAAAAAAAAAAAAAAAAA'
        )
        self.edt_recipients.setStyle(ProxyStyleNoFocusRect())
        default_width = int(doc.size().width()) * 3
        default_height = int(default_width / 2)
        app_cache.restore_window_size(self,
                                      default_width=default_width,
                                      default_height=default_height)
        self.prepare_tx_view()
 def setupUi(self):
     Ui_TransactionDlg.setupUi(self, self)
     self.setWindowTitle('Transaction')
     self.chb_word_wrap.setChecked(app_cache.get_value(CACHE_ITEM_DETAILS_WORD_WRAP, False, bool))
     self.apply_word_wrap(self.chb_word_wrap.isChecked())
     self.edt_recipients.setOpenExternalLinks(True)
     self.edt_recipients.viewport().setAutoFillBackground(False)
     self.prepare_tx_view()