mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix button paddings
This commit is contained in:
parent
e40f1fd11a
commit
115bf0af4d
@ -1,8 +1,8 @@
|
|||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
|
||||||
const TPL = `<button class="button-widget no-print" data-toggle="tooltip">
|
const TPL = `<span class="button-widget bx"
|
||||||
<span class="bx"></span>
|
data-toggle="tooltip"
|
||||||
</button>`;
|
title=""></span>`;
|
||||||
|
|
||||||
export default class AbstractButtonWidget extends NoteContextAwareWidget {
|
export default class AbstractButtonWidget extends NoteContextAwareWidget {
|
||||||
isEnabled() {
|
isEnabled() {
|
||||||
@ -22,7 +22,6 @@ export default class AbstractButtonWidget extends NoteContextAwareWidget {
|
|||||||
|
|
||||||
doRender() {
|
doRender() {
|
||||||
this.$widget = $(TPL);
|
this.$widget = $(TPL);
|
||||||
this.$iconSpan = this.$widget.find("span");
|
|
||||||
|
|
||||||
if (this.settings.onContextMenu) {
|
if (this.settings.onContextMenu) {
|
||||||
this.$widget.on("contextmenu", e => {
|
this.$widget.on("contextmenu", e => {
|
||||||
@ -52,9 +51,9 @@ export default class AbstractButtonWidget extends NoteContextAwareWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
refreshIcon() {
|
refreshIcon() {
|
||||||
for (const className of this.$iconSpan[0].classList) {
|
for (const className of this.$widget[0].classList) {
|
||||||
if (className.startsWith("bx-")) {
|
if (className.startsWith("bx-")) {
|
||||||
this.$iconSpan.removeClass(className);
|
this.$widget.removeClass(className);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +61,7 @@ export default class AbstractButtonWidget extends NoteContextAwareWidget {
|
|||||||
? this.settings.icon()
|
? this.settings.icon()
|
||||||
: this.settings.icon;
|
: this.settings.icon;
|
||||||
|
|
||||||
this.$iconSpan.addClass(icon);
|
this.$widget.addClass(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
initialRenderCompleteEvent() {
|
initialRenderCompleteEvent() {
|
||||||
|
@ -21,12 +21,12 @@ const TPL = `
|
|||||||
background-position: 50% 45%;
|
background-position: 50% 45%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.global-menu-button:hover {
|
.global-menu-button:hover {
|
||||||
background-image: url("${window.glob.assetPath}/images/icon-color.png");
|
background-image: url("${window.glob.assetPath}/images/icon-color.png");
|
||||||
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.global-menu-button-update-available {
|
.global-menu-button-update-available {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user