Closed qmfrederik closed 5 months ago
The decoding of the missing values is fine. What I am worried about is the opaque method. The code here really cannot know what the theme is going to do with the box. There all the set colours could get ignored. A proper solution would be to move your code (which is the old code) into the theme and have themes that behave differently override that method.
A proper solution would be to move your code (which is the old code) into the theme and have themes that behave differently override that method.
I don't know much about themes in GNUstep, so where would that code go? In GSThemeDrawing drawBoxInClipRect
or somewhere else?
What would be needed is a new method isBoxOpaque:
close to the other one you mentioned. The code being just like the one you tried to put here. And the method in NSBox would call the theme method with itself as an argument. Annoying and complicated, but the only way the behaviour matches.
Thanks, @fredkiefer . I've updated the PR, let me know if this what you had in mind.
This (re-)implements logic where a box is marked as opaque if it is a custom box which is not transparent and adds the decoding of the
NSBorderColor2
andNSFillColor2
attributes.This fixes the rendering of custom boxes with a custom fill color; the current implementation would mark them as non-opaque and hence the fill color would not be rendered.
YES
(53bcb5024020fe85e370d9d49297aca4320d7768)NO
was hardcoded (02bc49e2d5336e9092001e3d56cb43750a8466a3, by @ericwa)