Get dark mode fix working for avatars in Et2Email & Et2SelectEmail

This commit is contained in:
nathan 2023-12-13 14:23:07 -07:00 committed by hadi
parent 3acbd1401f
commit 00ceb8a32d
4 changed files with 6 additions and 4 deletions

View File

@ -932,6 +932,7 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
return html`
<et2-email-tag
exportparts="image"
part="tag"
class=${classMap({
"et2-select-draggable": !this.readonly && this.allowDragAndDrop,
@ -985,7 +986,7 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
return html`
<sl-option
part="option"
exportparts="prefix:tag__prefix, suffix:tag__suffix"
exportparts="prefix:tag__prefix, suffix:tag__suffix, image"
title="${!option.title || this.noLang ? option.title : this.egw().lang(option.title)}"
class=${classMap({
...classes
@ -994,7 +995,7 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI
.option=${option}
?disabled=${option.disabled}
>
<et2-lavatar slot="prefix" part="icon" size="1.8em"
<et2-lavatar slot="prefix" exportparts="image" part="icon" size="1.8em"
lname=${option.lname || nothing}
fname=${option.fname || nothing}
image=${option.icon || nothing}

View File

@ -1005,7 +1005,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
return html`
${this._styleTemplate()}
<sl-select
exportparts="prefix, tags, display-input, expand-icon, combobox, listbox, option"
exportparts="prefix, tags, display-input, expand-icon, combobox, listbox, option, image"
label=${this.label}
placeholder=${this.placeholder || (this.multiple && this.emptyLabel ? this.emptyLabel : "")}
?multiple=${this.multiple}

View File

@ -300,6 +300,7 @@ export class Et2SelectEmail extends Et2Select
return html`
<et2-email-tag
exportparts="image"
class=${classMap({
...option.classList,
"et2-select-draggable": !this.readonly && this.allowFreeEntries && this.allowDragAndDrop,

View File

@ -264,7 +264,7 @@ export class Et2EmailTag extends Et2Tag
const option = Et2EmailTag.email_cache[this.value];
button_or_avatar = html`
<et2-lavatar slot="prefix" part="icon" tabindex="-1"
<et2-lavatar slot="prefix" exportparts="image" part="icon" tabindex="-1"
@mousedown=${this.handleContactMouseDown}
.size=${style.getPropertyValue("--icon-width")}
lname=${option.lname || nothing}