Bug 339413 - kate scrollbar does not extend to screen edge
Summary: kate scrollbar does not extend to screen edge
Status: RESOLVED FIXED
Alias: None
Product: Breeze
Classification: Plasma
Component: QStyle (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-26 08:37 UTC by Nikola Kovacs
Modified: 2014-10-02 21:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikola Kovacs 2014-09-26 08:37:53 UTC
With the oxygen style, kate's scrollbar extends to the right edge of the screen. With breeze, there's a border around the scrollbar, and if you hit the right edge of the screen and click and drag, you won't drag the scrollbar like in oxygen, instead you'll probably end up moving the window (if drag windows from empty areas is enabled, though it doesn't always work)

Reproducible: Always

Steps to Reproduce:
1. Open kate
2. Maximize it.
3. Write enough text so it doesn't fit on your screen.
4. Move the mouse to the right edge of the screen, where the thumb is.
5. Click and drag.

Actual Results:  
Sometimes you drag the entire window, unmaximizing it, sometimes nothing happens.

Expected Results:  
You should be able to grab and drag the scrollbar thumb.
Comment 1 Hugo Pereira Da Costa 2014-09-26 08:54:24 UTC
This is a consequence of Breeze 'design' choice to put scrollbars _inside_ a scrollarea frame, and not outside of it (in oxygen). Because of this design choice, what you require necessitate to extend the scrollbars hit area on top of the frame, which is not foreseen in Qt.
The path from there:
- either change the design (alake ?)
- hack Qt to have a fake, extended hit area above the frame. (I have some code to do that locally, but it is buggy at the moment)
Comment 2 Hugo Pereira Da Costa 2014-10-01 11:38:03 UTC
Git commit 817ac7cd00ffc11f47822bf73c95f10463d1ae45 by Hugo Pereira Da Costa.
Committed on 29/09/2014 at 16:11.
Pushed by hpereiradacosta into branch 'master'.

propagate mouse events from scrollarea to scrollbar if matching to respect Fitt's law

M  +82   -21   kstyle/breezestyle.cpp

http://commits.kde.org/breeze/817ac7cd00ffc11f47822bf73c95f10463d1ae45
Comment 3 Hugo Pereira Da Costa 2014-10-01 11:39:34 UTC
Only thing that does not work from patch above is mouseOver effet on scrollbar handle. 
Aside from that, mouse scrolling, pressing, dragging, on either scrollbar or buttons, should work.
Still some love is needed for right-to-left layouts, which I'll commit soon
Comment 4 Nikola Kovacs 2014-10-02 10:01:43 UTC
According to synaptic I have breeze version 0.0+git20141002.0308+neon4~4d46e59~14.04, so this fix should be in it, but it's still the same.
Comment 5 Hugo Pereira Da Costa 2014-10-02 10:18:39 UTC
ah yes
its not working for kate (because kate is custom widget), yet.
Will see if I can do something about it (not sure I can).

it is working for standard QScrollArea however (e.g. dolphin, though here, the wheel events are not propagated) ... all in all the patch is just a hack (real issue being the design choice), and I am still considering wether it should be kept or reverted.
Comment 6 Hugo Pereira Da Costa 2014-10-02 21:53:20 UTC
Git commit 661932614bc5002865df57c098162f34ac89d7a2 by Hugo Pereira Da Costa.
Committed on 02/10/2014 at 21:41.
Pushed by hpereiradacosta into branch 'master'.

improved scrollbar extended hit area
properly deal with KTextEditor scrollbars

M  +43   -40   kstyle/breezestyle.cpp
M  +1    -1    kstyle/breezestyle.h

http://commits.kde.org/breeze/661932614bc5002865df57c098162f34ac89d7a2