Artefacts in borderless widgets

Zini

21-01-2008 16:16:18

With the new version of QuickGUI I am getting strange artefacts:





The artefacts appeared only after I removed the border image files for the relevant widgets. I was under the impression that if a widget does not have border image files, it won't show a border.
But even after calling the setUseBorder function, I am still getting these artefacts.

thecaptain

23-01-2008 06:11:10

I was having the same problem even when using setUseBorders(false), and discovered that there was a bug in the loop in widget::_destoryBorders() which caused it to miss half of the borders!

I committed a fix for this to the SVN, so update and see if you still have the problem. As far as the image glitches without using setUseBorders(false), I'm not sure why it defaults to the whole skinset when no image is present... but it's not really a problem, because it should create an ugly result anyway to warn users that no image has been specified for borders.

There are still some issues with borders though, especially with a small 1 pixel overlap between each segment (e.g. top border's edge with top-right border element). I'm going to look into this more after I get some more serious bugs fixed.

thecaptain

23-01-2008 08:53:45

On the topic of strange artifacts, I noticed that if I create a textbox, the text cursor is rendered in the upper left corner of the screen. Once I click on the textbox, it disappears, but it is still a small annoyance.

I looked into the problem, and it turns out that the _clip() method is making the mTextCursor visible again after the constructor calls mTextCursor->setVisible(false).

I came up with a fix by adding a bool mOverrideVisible variable, and having the Quad::visible() function return (mVisible && mOverrideVisible) instead. That way the user can have a final say on whether a quad will be visible, without having to worry about _clip() changing it. :D

Kungfoomasta, let me know if this makes sense and you would like me to commit it.

Zini

23-01-2008 10:20:02

Your fix removed some of the artifacts, but not all (the strange stuff in the upper window is still visible).

Zini

23-01-2008 12:21:12

Minor correction: I hadn't disabled the borders in the upper window. After doing that, the remaining artifacts disappeared too. Thanks.

kungfoomasta

23-01-2008 17:32:48

My current code base isn't working, I have to finish refactoring the code. :wink:

I'm trying to put in a few hours each day on this, the clipping needs to be fixed.

thecaptain

24-01-2008 02:45:40

So you're coming up with an entirely new implementation of clipping? What issues are you trying to fix?

Sounds like a lot of work... :?

kungfoomasta

24-01-2008 04:13:56

It is a lot of work! :(

Hopefully I can pull it off without any problems. The basic idea is that Quads will clip to their parent WidgetContainer (which is synonymous with QuadContainer). So all child widgets inside a Panel/Window/Sheet/List, will be clipped to these bounds.

I hope to have results soon.