Instead of having to make sure we check both content rects
everywhere, we can just use the normal QWidget content
rect. Also some tiny cleanup where I was touching anyways.
Details
- Reviewers
hindenburg - Group Reviewers
Konsole
Tested with various styles, turning scrollbars on/off,
various margins, primary and secondary screen.
Diff Detail
- Repository
- R319 Konsole
- Lint
Lint Skipped - Unit
Unit Tests Skipped
This would be better if this diff only changed _contentRect; the other changes should be done w/ a later patch.
src/TerminalDisplay.cpp | ||
---|---|---|
1614 | hmm, the only difference between rect() and contentsRect() should be whether it takes into account the margins, I think? Not sure why it would impact the scrollbar. | |
2035 | yeah, I think it worked mostly by accident (I don't think many people use explicit extra margin), and I can't see why you would want to remove it twice. |
src/TerminalDisplay.cpp | ||
---|---|---|
1614 | rect() returns whole widget's area, including scrollbar (it is drawn inside rect()). _contentRect (now contentsRect()) represents the actual terminal contents (characters), so scrollbar width is added to one of the margins (see line 2248). | |
2035 | It was a mistake. _contentRect's margins were including possible contentsMargins(). |