-
Notifications
You must be signed in to change notification settings - Fork 38.6k
[QT] Fixes feel when resizing the last column on tables (issue #2862) #3738
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
[QT] Fixes feel when resizing the last column on tables (issue #2862) #3738
Conversation
|
ACK on code changes, haven't tested yet. |
|
@laanwj there's one more small detail I think you will notice when you test that I need to fix (so no rush on merging yet, I'm hoping to get sometime to fix this hopefully today) Basically the issue is after resizing the window, only the visible table is adjusting, if you switch to another view, the other table won't be adjusted until you interact with it. I'm looking for a signal that I can use to notify the table fixing object atm, if not my guess is that I'll have to override another onSomeEvent method, but I want to stay away from that to keep the fixes outside the TableViewLastColumnResizingFixer to a minimum. |
added last fix for glitch when window was resized and tab switches were performed. code simplified, no need for `geometriInitialized` state to be kept anymore.
|
this should be done now. I tried to squash my 2 commits into one using any git help would be appreciated. |
|
@gubatron I am also wrestling this bear to the ground here : Take a look and see if it helps. (scroll down a bit to get to the part that may be of assistance ) |
|
git push --force origin branchname |
|
thank you guys (man do I love this community) |
|
yay. Solved with
|
|
Here's a video of what the patch does. has anybody been able to test on a windows machine? I don't have a windows development environment. I'll test in Ubuntu in the meantime. |
|
Works for me on Ubuntu + Qt 5.0.2. |
|
BTW: needs rebase for some changes in receivecoinsdialog |
|
Just tested on qt4 and qt5.2. The resizing works very good, would be great if the stretching behavior could be improved. Start bitcoin-qt without a config file, so in window mode. and then maximize the window: The column amount gets stretched instead of message. |
|
@laanwj will fix it. |
…blic method stretchColumnWidth added.
|
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/449694f0ecaed68a2b2f9c6560fd7a3c25fd15cb for binaries and test log. |
…er class 3913d1e qt: Drop buggy TableViewLastColumnResizingFixer class (Hennadii Stepanov) Pull request description: In Qt 5 the last column resizing with dragging its left edge works out-of-the-box. The current `TableViewLastColumnResizingFixer` implementation could put the last column content out of the view port and confuse a user:  Historical context: - #2862 - #3626 - #3738 - #3920 #205 is a nice addition. ACKs for top commit: jarolrod: ACK 3913d1e, tested on macOS 11.1 Qt 5.15.2 Talkless: tACK 3913d1e, tested on Debian Sid. Can confirm that behavior in previous commit does not produce scroll bar, last column gets "hidden". This PR makes clear that there's more to see in the view. promag: Tested ACK 3913d1e on macos. Tree-SHA512: 12582dfce54bb1db3d9934ae092e305d32e9760cc99b0265322e161fa7f54b7d6fb6cefedf700783f767d5c3a56a8545c8d2f5ade66596c4e67b8a5287063e8a
…er class 3913d1e qt: Drop buggy TableViewLastColumnResizingFixer class (Hennadii Stepanov) Pull request description: In Qt 5 the last column resizing with dragging its left edge works out-of-the-box. The current `TableViewLastColumnResizingFixer` implementation could put the last column content out of the view port and confuse a user:  Historical context: - bitcoin#2862 - bitcoin#3626 - bitcoin#3738 - bitcoin#3920 #205 is a nice addition. ACKs for top commit: jarolrod: ACK 3913d1e, tested on macOS 11.1 Qt 5.15.2 Talkless: tACK 3913d1e, tested on Debian Sid. Can confirm that behavior in previous commit does not produce scroll bar, last column gets "hidden". This PR makes clear that there's more to see in the view. promag: Tested ACK 3913d1e on macos. Tree-SHA512: 12582dfce54bb1db3d9934ae092e305d32e9760cc99b0265322e161fa7f54b7d6fb6cefedf700783f767d5c3a56a8545c8d2f5ade66596c4e67b8a5287063e8a


Re-submitting this pull request with a single commit.
This patch introduces a GUIUtil class that is used when setting up the 2 tables we have so far on the Qt-GUI.
In the past you could only resize the last column, which has BTC amounts from the right border of the column header, something that was rather unnatural.
If a new table were ever to be added to the interface, fixing the last columns resizing behavior is rather simple. Just look at how we initialize here a TableViewLastColumnResizingFixer object when setting up the table header's behavior, and then how we override the resize event of the component (can be the table, or the dialog) and we invoke
columnResizingFixer->adjustTableColumnsWidth();