brain-child / moobo

Visualize your ideas on moodboards
GNU General Public License v3.0
22 stars 4 forks source link

Feature Request: Make window size depending on screen resolution #13

Closed Zoldyako closed 2 years ago

Zoldyako commented 3 years ago

My notebook has a resolution of 1366x768 (HD) and the app don't fit in the entire screen

pthrrr commented 3 years ago

Thank you for the report. This is a more general problem, which I want to tackle in the future.

NathanBnm commented 3 years ago

Would be great, here is how it renders on my laptop screen:

Capture d'écran du 2021-11-10 11 28 31

pthrrr commented 2 years ago

I did change the title, because the issue relates more to the problem that the window does not fully fit on your screen. And this is different to let the user resize the window.

For now, I implemented a way to solve your issue. It will be published in the next release. One thing to solve is that some widgets from the demo board (and other boards as well) are placed outside the board for smaller screens like yours. Theoretically there are different approaches to change that. The easiest would be to drop the demo board at all and another is to calculate the coordinates of the widgets.

However, a solution will be found soon.

ChildishGiant commented 2 years ago

Or to allow for the board to be scrolled (or even zoomed)

pthrrr commented 2 years ago

@ChildishGiant That is the plan in the future. Normally one would simply add a Gtk.ScrolledWindow, but in connection with the Gtk.Overlay this is not that simple. I think the problem is, that the widgets placed on each overlay-layer do not communicate their position to the ScrolledWindow. So the ScrolledWindow does not know when to add scrollbars or not. A work around would be to update the ScrolledWindow manually with each movement of a widget. Using the ScrolledWindow would solve the resizing problem of the app window.

Another approach, could be this.

ChildishGiant commented 2 years ago

Maybe it'd be worth having a look at how Akira implemented their canvas. I had a quick crack at it the other night but ran into the issues you've mentioned.

pthrrr commented 2 years ago

@ChildishGiant I looked into the implementation of Akira too, but I honestly had no clue how it was functioning. I tend to take the approach of the link I posted. It will may take some time though. Scrolling and zooming is what I plan for version 1.0.0.

Let's cut the discussion for now. This issue might not be the best place for that. I suggest to open a new issue.

pthrrr commented 2 years ago

@Zoldyako solved with version 0.1.2