Add a fonts sub-menu to the comments editor context menu

Matches the v3 context menu
This commit is contained in:
Kovid Goyal 2019-09-19 15:28:32 +05:30
parent 268f36b8cc
commit ba89de0def
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -730,6 +730,10 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{
else: else:
menu.addAction(self.action_paste_and_match_style) menu.addAction(self.action_paste_and_match_style)
st = self.text() st = self.text()
m = QMenu(_('Fonts'))
m.addAction(self.action_bold), m.addAction(self.action_italic), m.addAction(self.action_underline)
menu.addMenu(m)
if st and st.strip(): if st and st.strip():
self.create_change_case_menu(menu) self.create_change_case_menu(menu)
parent = self._parent() parent = self._parent()