Use Python built in method

Signed-off-by: Hollow Man <hollowman186@vip.qq.com>
master
Hollow Man 6 years ago
parent 2241aeb07f
commit 76b950d603
No known key found for this signature in database
GPG Key ID: 6CA2A0660F48F7A
  1. 2
      app/pdf-viewer/buffer.py

@ -328,7 +328,7 @@ class PdfViewerWidget(QWidget):
self.char_dict[index] = self.get_page_char_rect_list(index)
self.select_area_annot_cache_dict[index] = None
if self.emacs_var_dict["eaf-pdf-dark-mode"] == "follow" and self.url.split(".")[-1] == "pdf":
if self.emacs_var_dict["eaf-pdf-dark-mode"] == "follow" and os.path.splitext(self.url)[-1] == ".pdf":
col = self.handle_color(QColor(self.emacs_var_dict["eaf-emacs-theme-background-color"]), self.inverted_mode)
page.drawRect(page.rect, color=col, fill=col, overlay=False)

Loading…
Cancel
Save