Notes Example Icon Color

I was using the similar to below in XOJONotes IOSView to change the color of the icons which seemed to work fine. In the Mobile version It has no effect and I end up with Blue icons on the Listview and black icons on the detailed view??

If System.Version >= "13.0.0" Then
  Var SFimage As Picture = Picture.SystemImage("hand.thumbsup.fill", 24, Picture.SystemImageWeights.Regular, ColorGroupBeach2)
  Var SFimage2 As Picture = Picture.SystemImage("flag.fill", 24, Picture.SystemImageWeights.Regular, ColorGroupBeach2)
  Var SFimage3 As Picture = Picture.SystemImage("lightbulb.fill", 24, Picture.SystemImageWeights.Regular, ColorGroupBeach2)
  Return Array(SFImage, SFImage2, SFImage3)
else
  Return Array(PlaneImage, HeartImage, YieldImage)
end if

Look for pictureOriginal in iOSdesignExtensions
Not at my desk right now so I can’t find the exact function name

FYI - you don’t need to specify all of the segments here. Using just “13” is the equivalent.

1 Like

I tried the following in Xojo Notes Detailscreen to color the icons yellow. It shows that it has colored it correctly in the contents of the debugger but doesn’t display any icons in the segment??

Me.RemoveAllSegments

For Each icon As Picture In Note.Icons
  icon =ImageExtensionsXC.ImageWithColorXC(icon,color.Yellow)
  Me.AddSegment(New MobileSegment(icon))
Next

When I add this to the Note Class Icons shared method it shows the icons correctly yellow on the ListScreen so not sure what the difference is

Var SFimage As Picture = Picture.SystemImage("hand.thumbsup.fill", 24, Picture.SystemImageWeights.Regular, ColorGroupBeach2)
SFimage =ImageExtensionsXC.ImageWithColorXC(SFimage,color.Yellow)

While ImageExtensionsXC worked in the Listscreen I had to resort to the following to get it show up in the MobileSegment of the Detailscreen

Var SFimage As Picture = Picture.SystemImage("hand.thumbsup.fill", 24, Picture.SystemImageWeights.Regular, ColorGroupBeach2)
Declare Function imageWithRenderingMode Lib "UIKit.framework" selector "imageWithRenderingMode:" (id As ptr, RenderingMode As Integer) As ptr
SFimage = Picture.FromHandle(imageWithRenderingMode(SFimage.Handle, 1))