From e5d8974eb522c5b153b6aa9f171af57f826dae17 Mon Sep 17 00:00:00 2001 From: Allen Dang Date: Thu, 2 Jun 2022 16:32:50 +0800 Subject: [PATCH] Add ID setter to ImageWithFile widget. --- ImageWidgets.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ImageWidgets.go b/ImageWidgets.go index 912133a4..11453011 100644 --- a/ImageWidgets.go +++ b/ImageWidgets.go @@ -201,6 +201,12 @@ func ImageWithFile(imgPath string) *ImageWithFileWidget { } } +// ID sets the interval id of ImageWithFile widgets. +func (i *ImageWithFileWidget) ID(id string) *ImageWithFileWidget { + i.id = id + return i +} + // Size sets image's size. func (i *ImageWithFileWidget) Size(width, height float32) *ImageWithFileWidget { i.img.Size(width, height)