Skip to content

Adding top gui to fpl - #999

Merged
kushalkolar merged 7 commits into
mainfrom
top-gui
Feb 23, 2026
Merged

kushalkolar merged 7 commits into
mainfrom
top-gui

Conversation

@clewis7

@clewis7 clewis7 commented Feb 20, 2026

Copy link
Copy Markdown
Member
image

I thought this would follow the patterns of the other guis (just change the y pos of where pygfx renders to), but the render space does not actually move down unless I manually set the rect

Maybe that is not something that needs to be done for bottom and right but does for a left or top gui

Have enough for the thing I need to do for clepio and can circle back to this

@kushalkolar thoughts welcome since you did the frame/rect manager stuff

@clewis7
clewis7 requested a review from kushalkolar as a code owner February 20, 2026 02:05
@clewis7
clewis7 marked this pull request as draft February 20, 2026 02:05
@kushalkolar

Copy link
Copy Markdown
Member

I'm brain fried I'll review tomorrow or this weekend, but if right and bottom imgui windows still work then it's probably fine, let's worry about left guis when there's a compelling use case?

Comment thread examples/guis/imgui_top.py Resolved
@clewis7

clewis7 commented Feb 20, 2026 •

Copy link
Copy Markdown
Member Author

Proper logic for setting the pyfgx render space and allowing space for guis is in _imgui_figure.py and ui/_base.py

The issue now is getting the rect manager and frame to obey the change in the y-coord

image

The height is changing appropriately but the y-coord to start rendering from is not being obeyed

@clewis7

clewis7 commented Feb 20, 2026

Copy link
Copy Markdown
Member Author

Okay, the reason that it is not shifting down is because updates to the layout use the fractional layout to resize, and the rect manager does not take into account x or y offset when doing this

@clewis7
clewis7 marked this pull request as ready for review February 20, 2026 21:28
@github-actions

github-actions Bot commented Feb 20, 2026 •

Copy link
Copy Markdown

📚 Docs preview built and uploaded! https://www.fastplotlib.org/ver/top-gui

@clewis7

clewis7 commented Feb 22, 2026

Copy link
Copy Markdown
Member Author

@kushalkolar gtg if you can give a review!

@kushalkolar kushalkolar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

small things

Comment thread fastplotlib/layouts/_imgui_figure.py Resolved
Comment thread fastplotlib/layouts/_frame.py Resolved
Comment thread fastplotlib/layouts/_rect.py Resolved
Comment thread fastplotlib/layouts/_rect.py Resolved
Comment thread fastplotlib/layouts/_rect.py Resolved
@kushalkolar

kushalkolar commented Feb 23, 2026 •

Copy link
Copy Markdown
Member

Tested that the window layouts subplots move and resize properly with these changes? We can make automated tests for that later.

@clewis7

clewis7 commented Feb 23, 2026

Copy link
Copy Markdown
Member Author

Tested that the window layouts subplots move and resize properly with these changes? We can make automated tests for that later.

I tested locally that the window layout examples are still working (resizing and moving subplots around)

@clewis7

clewis7 commented Feb 23, 2026

Copy link
Copy Markdown
Member Author
image

Since I didn't post what it looked like after the changes

@kushalkolar
kushalkolar merged commit 9a8a1b8 into main Feb 23, 2026
38 of 52 checks passed
@kushalkolar
kushalkolar deleted the top-gui branch February 23, 2026 18:05
@kushalkolar

Copy link
Copy Markdown
Member

The example png file got committed directly to git instead of git lfs, no idea why 🤦‍♂️ . I wonder if there's CI action we can use to catch this in the future. Since this was a recent commit to main I think we can undo it without too much trouble.

@clewis7

clewis7 commented Mar 4, 2026

Copy link
Copy Markdown
Member Author

🤦

Wow that is totally my fault

I can open a PR to fix today. I need to go in and fix the contrib docs so that they are a little clearer on the screenshot uploads.

@kushalkolar

Copy link
Copy Markdown
Member

It shouldn't be possible, seems git just ignored the .gitattributes for some reason

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