Skip to content

Conversation

@gubatron
Copy link
Contributor

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();

@laanwj laanwj added this to the 0.10.0 milestone Feb 28, 2014
@laanwj
Copy link
Member

laanwj commented Mar 1, 2014

ACK on code changes, haven't tested yet.

@gubatron
Copy link
Contributor Author

gubatron commented Mar 3, 2014

@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.
@gubatron
Copy link
Contributor Author

this should be done now.

I tried to squash my 2 commits into one using git rebase -i HEAD~2 everything went fine, but when I tried to push my changes, I was told to pull, and when I pulled that empty 'merge' commit would be added to the history, no clue how to remove it and make it all look as a single commit.

any git help would be appreciated.

@int03h
Copy link

int03h commented Mar 11, 2014

@gubatron I am also wrestling this bear to the ground here :
bitcoin-core/gitian.sigs#19

Take a look and see if it helps. (scroll down a bit to get to the part that may be of assistance )

@cozz
Copy link
Contributor

cozz commented Mar 11, 2014

git push --force origin branchname

@gubatron
Copy link
Contributor Author

thank you guys (man do I love this community)

@gubatron
Copy link
Contributor Author

yay.

Solved with

git reset --hard HEAD~1 #to get rid of the merge
git push --force #overwrite my remote fork. always scary to do push force.

@gubatron
Copy link
Contributor Author

Here's a video of what the patch does.
https://www.youtube.com/watch?v=BhidXDza7sU&feature=youtu.be

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.

@laanwj
Copy link
Member

laanwj commented Mar 17, 2014

Works for me on Ubuntu + Qt 5.0.2.

@laanwj
Copy link
Member

laanwj commented Mar 17, 2014

BTW: needs rebase for some changes in receivecoinsdialog

@cozz
Copy link
Contributor

cozz commented Mar 17, 2014

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:

Before:
resize1

After:
resize2

The column amount gets stretched instead of message.
@gubatron Is it possible to fix this, to get the old stretching behavior back?

@gubatron
Copy link
Contributor Author

@laanwj will fix it.

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/449694f0ecaed68a2b2f9c6560fd7a3c25fd15cb for binaries and test log.
This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/
Contact BlueMatt on freenode if something looks broken.

@gubatron gubatron closed this Mar 21, 2014
@gubatron gubatron deleted the QT-issue-2862-fix-tables-last-column-resize-feel branch March 21, 2014 05:31
maflcko pushed a commit that referenced this pull request Feb 22, 2021
…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:
  ![Screenshot from 2021-01-31 18-04-32](https://user-images.githubusercontent.com/32963518/106390022-fd6bd180-63ee-11eb-9216-6e5117f8dc96.png)

  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
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 22, 2021
…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:
  ![Screenshot from 2021-01-31 18-04-32](https://user-images.githubusercontent.com/32963518/106390022-fd6bd180-63ee-11eb-9216-6e5117f8dc96.png)

  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
@bitcoin bitcoin locked and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants