Skip to content

Commit

Permalink
Renaming SetTint method
Browse files Browse the repository at this point in the history
  • Loading branch information
boggydigital committed Nov 10, 2024
1 parent d0df6a7 commit 6c3b55f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rest/compton_fragments/product_card.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func ProductCard(r compton.Registrar, id string, hydrated bool, rdx kevlar.Reada

pc := compton.Card(r, id)

SetTintedBackgroundColor(id, pc, rdx)
SetTint(id, pc, rdx)

if viSrc, ok := rdx.GetLastVal(vangogh_local_data.VerticalImageProperty, id); ok {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/boggydigital/kevlar"
)

func SetTintedBackgroundColor(id string, p compton.Element, rdx kevlar.ReadableRedux) {
func SetTint(id string, p compton.Element, rdx kevlar.ReadableRedux) {
if repColor, ok := rdx.GetLastVal(vangogh_local_data.RepImageColorProperty, id); ok {
p.SetAttribute("style", "background-color:color-mix(in display-p3,"+repColor+" var(--cma),var(--c-background))")
}
Expand Down
2 changes: 1 addition & 1 deletion rest/compton_pages/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func Product(id string, rdx kevlar.ReadableRedux, hasSections []string) compton.
p.RegisterStyles(compton_styles.Styles, "product.css")

// tinting document background color to the representative product color
compton_fragments.SetTintedBackgroundColor(id, p, rdx)
compton_fragments.SetTint(id, p, rdx)

/* App navigation */

Expand Down
2 changes: 1 addition & 1 deletion rest/compton_pages/tags_editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TagsEditor(
p.RegisterStyles(compton_styles.Styles, "tag-editors.css")

// tinting document background color to the representative product color
compton_fragments.SetTintedBackgroundColor(id, p, rdx)
compton_fragments.SetTint(id, p, rdx)

/* App navigation */

Expand Down

0 comments on commit 6c3b55f

Please sign in to comment.