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

Add QScrollArea to support resizing the main window #251

Merged
merged 2 commits into from
Jan 5, 2017

Conversation

fredg02
Copy link
Member

@fredg02 fredg02 commented May 16, 2016

Inspired by this forum request:
https://forum.bitcraze.io/viewtopic.php?f=11&t=2002

@ataffanel
Copy link
Member

Nice Fred! I have 2 comments:

  • It would be nice to keep a default size bigger than the limit for the scroll bar to appear
  • Is it possible to make the scroll box invisible? Currently it is visible even when the window is big enough

@fredg02
Copy link
Member Author

fredg02 commented May 18, 2016

Hi Arnaud,
I will try to fix both issues.

Make default size big enough to not have scroll bars, make scroll box
border invisible
@fredg02
Copy link
Member Author

fredg02 commented Jun 15, 2016

Both issues should be fixed now.

@ataffanel
Copy link
Member

👍 Looks good, the box is not visible anymore :).

For the size though it does not seems to work: the window is still too small for me. I am afraid this is dependent of the particular OS/WM/Font. There should be a way to calculate the size of all the widgets and set that as default. I will look a bit at it.

@fredg02
Copy link
Member Author

fredg02 commented Jun 15, 2016

OK. It works for me, but I will definitely try to fix it.

@ataffanel
Copy link
Member

ataffanel commented Jun 16, 2016

One way to test is in the new VM, it starts that way:
client_in_vm

@krichardsson
Copy link
Contributor

Hi @fredg02 !

I just want to check the status on this PR.
We are trying to clean out PRs that are not active and this is a candidate as it has not been touched since June. Do you have any plans on fixing the last touches or should we close it for now and reopen it when you find time to work on it?

  • Kristoffer

@mikezter
Copy link
Contributor

Today i learned: The cfclient has a status bar :)

I agree, the default size should show everything, if enough space is availlable. On my 1280x800 screen, however, there just isn't enough vertical space. So in general i really like having the scrollbar.

I fiddled a bit in QtCreator and managed to give the window more height, but unfortunately i could not figure out how to calculate the size dynamically. Setting MainWindow and centralwidget to a height of 1000 will not trigger the scrollbar on startup. I'm still figuring out Qt Layouts, but i suspect that the apps layout needs an overhaul to allow Qt to dynamically resize the window based on user preferences like font size.

I was thinking about moving the "Auto Reconnect" and "Address" widgets in between "Scan" and "Battery" to save some vertical space.

@ataffanel ataffanel merged commit 6f24f19 into bitcraze:develop Jan 5, 2017
@ataffanel
Copy link
Member

Lets merge this and fix the window size somehow :-). Thanks fred!

@fredg02
Copy link
Member Author

fredg02 commented Jan 6, 2017

Sorry @krichardsson, I somehow missed your comment. Unfortunately I did not find a solution how the window can be resized dynamically.

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.

4 participants