Fix positioning of buttons

This commit is contained in:
Henrik Giesel 2021-02-27 17:22:55 +01:00
parent 81d1f2906a
commit a66b0fbd84
2 changed files with 11 additions and 8 deletions

View File

@ -179,19 +179,16 @@ class Editor:
"colour",
tr(TR.EDITING_SET_FOREGROUND_COLOUR_F7),
"""
<div id="forecolor"
style="display: inline-block; background: #000; border-radius: 5px;"
class="topbut"
>""",
<span id="forecolor" class="topbut topbut--rounded" style="background: #000"></span>
"""
),
self._addButton(
None,
"changeCol",
tr(TR.EDITING_CHANGE_COLOUR_F8),
"""
<div style="display: inline-block; border-radius: 5px;"
class="topbut rainbow"
>""",
<span class="topbut topbut--rounded rainbow"></span>
"""
),
self._addButton(
"text_cloze", "cloze", tr(TR.EDITING_CLOZE_DELETION_CTRLANDSHIFTANDC)
@ -321,7 +318,7 @@ class Editor:
else:
imgelm = ""
if label or not imgelm:
labelelm = f"""<span class=blabel>{label or cmd}</span>"""
labelelm = label or cmd
else:
labelelm = ""
if id:

View File

@ -56,9 +56,15 @@ body {
}
.topbut {
display: inline-block;
width: 16px;
height: 16px;
margin-top: 4px;
vertical-align: -.125em;
}
.topbut--rounded {
border-radius: 5px;
}
.rainbow {