Coder Social home page Coder Social logo

Comments (5)

jdeere5220 avatar jdeere5220 commented on May 30, 2024

@int-bio I wrote a little test using our demo_guix_widget_types and it seems that it is working as it should. A little bit of detail:

  1. demo_guix_widget_types inclues a screen with a bunch of different text widgets, including transparent prompts and a numeric prompt.
  2. I added a custom drawing function to Text_Screen to draw a pixelmap wallpaper background.
  3. The numeric prompt still works, it's updating and the pixelmap shows through.
  4. I modified "Transparent prompt without border" so that when you click on it I assign a new text id using gx_prompt_text_id_set. That also works as expected:
    image

I changed the text to "September" using the gx_prompt_text_id_set() api.

As to HOW it works, if you look at the function gx_system_canvas_refresh(), in the file of the same name, around line 145 we check to see if the widget to be re-drawn is transparent. If it is, we back up to the nearest non-transparent widget and invoke that widget's drawing function (with the same invalid rectangle). This is how the prompt background gets erased, if you will, when you change the text. Then the prompt draws the new text over this blank background.

So I think it should be working, and we might need to step into your application code and see what is different than my test case. So far I don't see anything wrong. The best case would be if you can send me a test case that I can build that duplicates the problem. If you like I can send you my modified demo_guix_widget_types so that you can confirm a transparent prompt should indeed be working.

from guix.

jdeere5220 avatar jdeere5220 commented on May 30, 2024

@int-bio one more thing we could check, you could step into the gx_prompt_draw() function. It will eventually end up at a generic gx_widget_border_draw(), which is where the widget border and background are drawn. At line 231 of gx_widget_border_draw.c, we test to see if the widget is transparent. If so, we don't invoke the gx_canvas_rectangle_draw() API, i.e. we don't fill the widget so that background should show through. I'm curious what happens when you step through this code.

from guix.

int-bio avatar int-bio commented on May 30, 2024

We have a simple setup here. The following window is created under root.

-> (win)
image

Prompt is created under (win)
-> (prompt)

image

I am trying to set a break point to follow changes when the widget-id = ID_SELFTEST_STR

from guix.

int-bio avatar int-bio commented on May 30, 2024

After thinking about this issue, it may be an artifact of a different issue we are having. In our current boot sequence, we go from splash-screen-1 to splash-screen-2 (self-test) to main screen. During the transition from splash-screen-2 to main, our wallpaper transitions from the bitmap (dark) to all white.

I had thought this wallpaper issue was due to an invalid widget in the main screen, but what if the issue is actually occurring in splash-screen-2 and only shows up when we issue the text update. The wall paper image gets cleared out (or the pointer to wallpaper points to a different location) and so the update pulls the bitmap region from the wrong location and stuffs it with WHITE. I will be checking into this a little deeper.

Can you remove the "bug" flag for now?

from guix.

int-bio avatar int-bio commented on May 30, 2024

I was able to trace the bug back to one of our modules.

from guix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.