Esri / arcgis-maps-sdk-toolkit-qt

ArcGIS Maps SDK for Qt Toolkit
Apache License 2.0
132 stars 61 forks source link

Jared/media popup elements view(Images only) #648

Closed jared-2016 closed 3 weeks ago

jared-2016 commented 1 month ago

This PR adds the functionality for displaying MediaPopupElements with a PopupMediaType::Image. Titles, descriptions, captions still display for all types of PopupMedia but the Chart portion will be implemented next.

Updated all Controllers thus far to delete the default constructor as it's not currently designed to work with that since we have no way of setting the PopupElement to the Controller outside of the constructor. We can change this going forward if desired but in terms of the toolkit component it's not useful.

There is some other tidying up on previous PopupElement work that i included in this PR.

jared-2016 commented 1 month ago

@ldanzinger I will answer your color/darkmode/lightmode questions here.

Great question! I knew this would come up but forgot to explain my reasoning behind my decision on this.

Yes this works for Dark/Light mode. So the problem we run into here is that this text is overlayed on top of the Image. Dark/light mode does not impact images so the only way we can ensure the text is visible no matter the image(white or black image) is to give the text a contrasting background. So I decided to have a semi transparent white background for the text and the text is black. Here are some examples. If we left it up to the system to decide the color of the text, either dark or light mode wouldn't work since we would have to invert the label color and the background which I don't think adds anything over what I have already done.

Here are some examples.

2024-10-31_13-46-40 2024-10-31_13-48-38 2024-10-31_13-58-41 2024-10-31_13-58-59