Trying to improve x49gp
|
05-13-2018, 10:27 PM
Post: #26
|
|||
|
|||
RE: Trying to improve x49gp
Good news, I found and fixed the menu text color bug. It was actually an old issue from the grayscale patch, where it replaced an even older issue. The root cause was that the dot-matrix pixels were drawn using a GdkGC from the current theme. It seems that this GdkGC is the one usually used for standard texts.
Before the grayscale patch, the pixels were drawn with this GdkGC as-is if a pixel was on, skipping it otherwise. This caused pixels to be drawn in funny colors when using certain themes (white for me since I switched to a dark GTK+ theme a few years ago). I actually saw this issue in action while checking out some other forks a while back, but I didn't track it down because I deemed the forks uninteresting. When I wrote the grayscale patch, I didn't know enough about GDK to spot the bug even though I was touching the relevant line. My replacement code for drawing a pixel (always setting the GdkGC's color depending on the pixel's effective color value to one of 16 precalculated colors) inadvertently fixed the issue described above before I even saw it for the first time. Back then x49gp didn't have any standard themed UI components, so the issue with overwriting part of the theme was hidden. Until the menu came, that is. The fix is straight-forward: make the pixel drawing loop use its own GdkGC so changing the color doesn't affect anything else. I looked at the glyph drawing functions in ui.c to get an idea of how to do it. The diff of my resulting local commit is attached; the commit message is: Code: Fix the text color in the popup menu In other news, I managed to replicate your issue with stepping over function calls. It happens quite rarely for me, which doesn't exactly make debugging this any easier, so it's still not tracked down. The issue about setting breakpoints while running hasn't been touched yet, and I didn't have the courage to get back into the QEMU upgrade mess either. I also witnessed some minor UI corruption yesterday, and there are some inconsequential typos I made in the patch series. That's the todo list for the near future, though perhaps not in the exact order. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)