Skip to content

Conversation

@madeleinesong
Copy link
Collaborator

@madeleinesong madeleinesong commented Aug 4, 2022

3 new options improving the highlight visibility of a very small widget:

-highlight the content of the widget itself (shade it)
-highlight the area around the widget not including the widget
-add a pulse effect. i think that this is breaking the tutorial. i have a feeling that i am incorrectly calling the update method for the highlight widget.

Song and others added 16 commits June 28, 2022 09:52
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Song <jmadeson@amazon.com>
Signed-off-by: Madeleine <madeleinejsong@gmail.com>
Signed-off-by: Madeleine <madeleinejsong@gmail.com>

#option 3: add a pulse effect
if self.width < 50 and self.height < 50:
update_widget(self, event)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The update_widget only needs to be called when you are choosing a new widget/item to highlight. I think what you meant to use was update which will trigger the highlight to be repainted. Instead of calling it in the paintEvent method though, you should call it outside of here on a timed loop at a certain interval (maybe 500ms?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants