Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window opens too low on monitor #73

Open
MtnBiker opened this issue Dec 29, 2024 · 2 comments
Open

Window opens too low on monitor #73

MtnBiker opened this issue Dec 29, 2024 · 2 comments

Comments

@MtnBiker
Copy link

I have a 400 x 300 window that opens up with part of it below the monitor window (hiding the bottom). Can I tell the window where to open on the monitor?

And is there a Glimmer forum? I'm just getting into Glimmer and have questions. For one my app has hundreds of lines of code and the windows are too set options. I don't want my views with a lot of code. I guess I'm thinking Ruby logic which calls up a View from a separate file But passing the variables back and forth, etc. are issues I need to work through.

@AndyObtiva
Copy link
Owner

Hi,

I have a 400 x 300 window that opens up with part of it below the monitor window (hiding the bottom). Can I tell the window where to open on the monitor?

The downstream libui C project recently added support for setting the window position (like being able to start an app with the window in the center of the screen). Unfortunately, that release created a bug, and I am waiting for it to get resolved before adding that support to Glimmer DSL for LibUI in Ruby.

More details are available about that at this issue:
#53

And is there a Glimmer forum? I'm just getting into Glimmer and have questions.

Yes, Gitter Chat (mentioned at the top and bottom of the README, which you might have missed):
https://gitter.im/AndyObtiva/glimmer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

For one my app has hundreds of lines of code and the windows are too set options. I don't want my views with a lot of code. I guess I'm thinking Ruby logic which calls up a View from a separate file But passing the variables back and forth, etc. are issues I need to work through.

Yes, breaking down the View into multiple smaller View components is fully supported in Custom Controls. In fact, the whole point of using Glimmer DSL for LibUI is to follow MVC/MVP architecture correctly and split View code between multiple smaller View components while pushing View presentation logic into Presenters and pushing Model logic into Models. I explain how to do this in the RubyConf 2024 Workshop "How To Build Basic Desktop Applications in Ruby" and the RubyConf 2022 Talk "Building Native GUI Apps in Ruby". There are many examples that demonstrate the Custom Controls feature. For example: https://github.com/AndyObtiva/glimmer-dsl-libui/blob/668a72e7b67931c5882f016a076014c45ff37039/examples/class_based_custom_controls.rb

I'd be happy to help you further with that regard on Gitter Chat. And, if your project is open-source, I could make recommendations after looking at its code.

@MtnBiker
Copy link
Author

MtnBiker commented Dec 30, 2024

Andy
Thank you. I'll watch the talks again. Probably because I know so little I miss much of what's going on.
Earlier versions are on GitHub. I'll start pushing it up.
And I'll check in on Gitter Chat. I was unaware of it.
I'm sure I'll be back
Thank you for being so responsive.
Greg

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

No branches or pull requests

2 participants