Opened 17 months ago

Last modified 17 months ago

#13781 assigned bug

Glitch with some widget after the introduction of Set*UIcolor feature

Reported by: Janus Owned by: looncraz
Priority: normal Milestone: Unscheduled
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by Janus)

After the introduction of the new feature Set*UIcolor some ui elements like BStringView have problems with the High/Low Color selected by the user in replicants, before I did not see this problem. I think this happen because the B_TRANSPARENT_COLOR is used to set a default color (for an example see https://github.com/HaikuArchives/Weather/issues/18). A similar problem is present in the BButton, now it has a border that the developer is unable to set properly. An example is present in the same Weather app issue.

Screenshot from the weather app issue 18

Another example is the dragger:

Attachments (3)

fontshot.png (146.1 KB) - added by Janus 17 months ago.
Screenshot from the weather app issue 18
Before.png (24.5 KB) - added by Janus 17 months ago.
After.png (22.8 KB) - added by Janus 17 months ago.

Download all attachments as: .zip

Change History (13)

Changed 17 months ago by Janus

Attachment: fontshot.png added

Screenshot from the weather app issue 18

comment:1 Changed 17 months ago by Janus

Description: modified (diff)

comment:2 Changed 17 months ago by Janus

Description: modified (diff)

comment:3 Changed 17 months ago by humdinger

With commit cabf506, Janus fixed/worked-around(?) the issue, so if anyone wants to investigate, pic a revision before that.

Changed 17 months ago by Janus

Attachment: Before.png added

Changed 17 months ago by Janus

Attachment: After.png added

comment:4 Changed 17 months ago by Janus

Description: modified (diff)

comment:5 Changed 17 months ago by diver

Owner: changed from nobody to looncraz
Status: newassigned

comment:6 Changed 17 months ago by looncraz

I will look at this tomorrow. The problem seems familiar, so this may be a duplicate - or something I already fixed on my side and never pushed.

comment:7 Changed 17 months ago by looncraz

In the image, the low color of the Weather applet appears to be standard gray (216 RGB). Looking at how the app responds to panel color changes, the low color is not updated (which only happens by default if adopting system colors or resetting the low color with B_COLORS_UPDATED). The fix for this would be to update the Weather app to use the new API. A simple call to AdoptSystemColors() would probably resolve it fully while automatically bringing in live color changes. I'll examine that in a few minutes.

The replicant dragger icon background appears to be a different issue entirely. Not sure where the 119,116,119 color is coming from for NetworkStatus and ProcessController, but the dragger looks correct for PowerStatus and Weather, and has a white background for Workspaces... I'll dig into that after I examine the Weather app code while I clone the latest Haiku source.

comment:8 Changed 17 months ago by Janus

The code of the Weather app is now different and the problem is solved. The Weather app had a feature that allows the user to customize the color for each replicant, this is why there is not live updated. Before the introduction of the live update the low color was fine. if I remember correctly in the method attached if the color is B_TRANSPARENT_COLOR the color is set to B_PANEL_ can be this the problem?

comment:9 Changed 17 months ago by looncraz

Okay, so the Weather app issue is resolved - that's good, because I can't replicate the issue at all.

AFAIK, transparent color must always be changed to a real color by the time it hits the app_server, otherwise the drawing is ignored and you get artifacts. I tried to maintain the previous behavior regarding B_TRANSPARENT_COLOR. I also tried to mimic what BeOS 5.1dan0 did, since Be had clearly addressed many of the issues with live color updating.

The layout kit added a few extra issues, but usually just recompiling apps using the layout API would resolve it - and, presumably, any app that new would be easily recompiled, so strict preservation of compatibility for those apps was not a goal given the effort involved to do so.

We also have the fact that Haiku seemed to set colors when Be did not and vice versa.

I'll focus on the replicant dragger background, now, and visit some other tickets this evening and tomorrow.

I think some of these tickets are more closely related than it seems from the effects (one logic error somewhere mucking up the works).

comment:10 in reply to:  7 Changed 17 months ago by Janus

Replying to looncraz:

The replicant dragger icon background appears to be a different issue entirely. Not sure where the 119,116,119 color is coming from for NetworkStatus and ProcessController, but the dragger looks correct for PowerStatus and Weather, and has a white background for Workspaces... I'll dig into that after I examine the Weather app code while I clone the latest Haiku source.

I don't know if can help you, but after further investigation I have discovered that the background of the dragger is transparent when the replicant view has the flag B_DRAW_ON_CHILDREN, without the flag we have that strange color.

Last edited 17 months ago by Janus (previous) (diff)
Note: See TracTickets for help on using tickets.