diff --git a/assets/arrow_refresh.png b/assets/arrow_refresh.png new file mode 100644 index 0000000..0de2656 Binary files /dev/null and b/assets/arrow_refresh.png differ diff --git a/images.go b/images.go index f5d60ac..7c8d288 100644 --- a/images.go +++ b/images.go @@ -10,7 +10,8 @@ import ( var assetsFs embed.FS const ( - imgChartBar int32 = iota + imgArrowRefresh int32 = iota + imgChartBar imgDatabase imgDatabaseAdd imgDatabaseDelete @@ -46,6 +47,7 @@ func loadImages(owner vcl.IComponent) *vcl.TImageList { } ilist := vcl.NewImageList(owner) + ilist.Add(mustLoad("assets/arrow_refresh.png"), nil) ilist.Add(mustLoad("assets/chart_bar.png"), nil) ilist.Add(mustLoad("assets/database.png"), nil) ilist.Add(mustLoad("assets/database_add.png"), nil) diff --git a/main.go b/main.go index 1e123d7..30a4ae5 100644 --- a/main.go +++ b/main.go @@ -387,9 +387,11 @@ func (f *TMainForm) OnNavContextPopup(sender vcl.IObject, mousePos types.TPoint, } mnu := vcl.NewPopupMenu(f.Buckets) + mnu.SetImages(f.ImageList) mnuRefresh := vcl.NewMenuItem(mnu) mnuRefresh.SetCaption("Refresh") + mnuRefresh.SetImageIndex(imgArrowRefresh) mnuRefresh.SetOnClick(f.OnNavContextRefresh) mnu.Items().Add(mnuRefresh) @@ -424,6 +426,7 @@ func (f *TMainForm) OnNavContextPopup(sender vcl.IObject, mousePos types.TPoint, mnuClose := vcl.NewMenuItem(mnu) mnuClose.SetCaption("Close") mnuClose.SetOnClick(f.OnNavContextClose) + mnuClose.SetImageIndex(imgDatabaseDelete) mnu.Items().Add(mnuClose) }