Skip to content

Commit

Permalink
Comments editor: Use a single line for all three toolbars if they fit
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Nov 13, 2021
1 parent 0c77d88 commit 796034a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/calibre/gui2/comments_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
)
from calibre.gui2.book_details import css
from calibre.gui2.widgets import LineEditECM
from calibre.gui2.widgets2 import to_plain_text
from calibre.gui2.widgets2 import to_plain_text, FlowLayout
from calibre.utils.cleantext import clean_xml_chars
from calibre.utils.config import tweaks
from calibre.utils.imghdr import what
Expand Down Expand Up @@ -1092,9 +1092,10 @@ def __init__(self, parent=None, one_line_toolbar=False, toolbar_prefs_name=None)
l.setContentsMargins(0, 0, 0, 0)
if one_line_toolbar:
tb = QHBoxLayout()
l.addLayout(tb)
else:
tb = l
tb = FlowLayout()
tb.setContentsMargins(0, 0, 0, 0)
l.addLayout(tb)
tb.addWidget(self.toolbar1)
tb.addWidget(self.toolbar2)
tb.addWidget(self.toolbar3)
Expand Down

0 comments on commit 796034a

Please sign in to comment.