Beispiel #1
0
 def remove_fonts(self):
     fonts = self.get_selected_data()
     if not fonts:
         return
     changed = False
     for font in fonts:
         changed |= change_font(current_container(), font)
     if changed:
         self.model.build()
         self.container_changed.emit()
 def remove_fonts(self):
     fonts = self.get_selected_data()
     if not fonts:
         return
     changed = False
     for font in fonts:
         changed |= change_font(current_container(), font)
     if changed:
         self.model.build()
         self.container_changed.emit()
Beispiel #3
0
 def change_fonts(self):
     fonts = self.get_selected_data()
     if not fonts:
         return
     d = ChangeFontFamily(', '.join(fonts), {f for f, embedded in iteritems(self.model.font_data) if embedded}, self)
     if d.exec_() != d.Accepted:
         return
     changed = False
     new_family = d.normalized_family
     for font in fonts:
         changed |= change_font(current_container(), font, new_family)
     if changed:
         self.model.build()
         self.container_changed.emit()
 def change_fonts(self):
     fonts = self.get_selected_data()
     if not fonts:
         return
     d = ChangeFontFamily(', '.join(fonts), {f for f, embedded in iteritems(self.model.font_data) if embedded}, self)
     if d.exec_() != QDialog.DialogCode.Accepted:
         return
     changed = False
     new_family = d.normalized_family
     for font in fonts:
         changed |= change_font(current_container(), font, new_family)
     if changed:
         self.model.build()
         self.container_changed.emit()