Bug 283143 - Extra border added to outer edge of scrollbars GTK apps
Summary: Extra border added to outer edge of scrollbars GTK apps
Status: CLOSED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk2-engine (show other bugs)
Version: 4.0
Platform: Gentoo Packages Linux
: NOR minor
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-01 16:03 UTC by Jared B.
Modified: 2011-10-04 15:46 UTC (History)
3 users (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 Jared B. 2011-10-01 16:03:19 UTC
Version:           4.0 (using KDE 4.6.5) 
OS:                Linux

oxygen-gtk adds an extra 1 or 2px border to the outer edge of scrollbars in GTK apps.  An easy way to see this is to run Firefox in a maximized or fullscreen window, load a long web page, and notice that you cannot simply push your cursor against the right edge of the screen and scroll up or down; you click on the border rather than the scrollbar.  This similarly affects the bottom scrollbar when viewing wide pages in fullscreen mode.

This is, admittedly, a minor cosmetic issue, but I tend to run into this problem a lot while browsing, so much so that I've reverted to using QtCurve, which doesn't have this problem.  It'd be great if you could remove this unnecessary padding around the outer border.  Everything else about oxygen-gtk is great; this is the one thing preventing me from switching.

Thanks.

Reproducible: Always

Steps to Reproduce:
1. Run Firefox (and presumably other GTK browsers)
2. Maximize window or run in fullscreen mode
3. Load long web page
4. Notice extra border along outer edge of scrollbar drawn by theme rather than window manager

Optional:
6. Run in fullscreen mode
5. Load wide web page
7. Notice similar problem along bottom border

Actual Results:  
Excess padding prevents easy scrolling

Expected Results:  
Should not have excess padding so the edge of the screen can be used for scrolling
Comment 1 Ruslan Kabatsayev 2011-10-01 16:13:07 UTC
I can also reproduce this issue with real GTK apps, e.g. gnome-terminal, as well as with KDE/Qt ones, like konsole.
So, this looks like a problem of the style in general.
Hugo, any comments?
Comment 2 Hugo Pereira Da Costa 2011-10-02 10:18:51 UTC
well, the pixel is here and will stay, for design reason (and was made identical for gtk and qt style). Now, We could increase the "hit" area of the scrollbars so that it includes this pixel, and fix the reported issue without changing the actual design ... Will see what I can do.
Comment 3 Jared B. 2011-10-02 14:31:02 UTC
Huh, that's a neat idea.  Would definitely be cool with that, too, if it's possible.  Appreciate you looking into it.
Comment 4 Hugo Pereira Da Costa 2011-10-03 10:17:36 UTC
Git commit 22195ec424bdedfd39ab115a6c9167563d3338c3 by Hugo Pereira Da Costa.
Committed on 03/10/2011 at 11:20.
Pushed by hpereiradacosta into branch '1.1'.

improved hit area for scrollbars.
CCBUG: 283143

M  +1    -1    rc/gtkrc
M  +1    -1    src/oxygenqtsettings.cpp
M  +9    -4    src/oxygenstyle.cpp

http://commits.kde.org/oxygen-gtk/22195ec424bdedfd39ab115a6c9167563d3338c3
Comment 5 Hugo Pereira Da Costa 2011-10-03 10:17:37 UTC
Git commit afae7a89a2e404c5d64f5dd5888e26eeeeed5f71 by Hugo Pereira Da Costa.
Committed on 03/10/2011 at 11:26.
Pushed by hpereiradacosta into branch 'gtk3'.

improved hit area for scrollbars.
CCBUG: 283143

M  +1    -1    rc/gtk.css
M  +1    -1    src/oxygenqtsettings.cpp
M  +9    -4    src/oxygenstyle.cpp

http://commits.kde.org/oxygen-gtk/afae7a89a2e404c5d64f5dd5888e26eeeeed5f71
Comment 6 Hugo Pereira Da Costa 2011-10-03 10:17:37 UTC
Git commit a2ca550bd1a3e29acdbfc52fb13630339fa17de0 by Hugo Pereira Da Costa.
Committed on 03/10/2011 at 11:20.
Pushed by hpereiradacosta into branch 'master'.

improved hit area for scrollbars.
CCBUG: 283143

M  +1    -1    rc/gtkrc
M  +1    -1    src/oxygenqtsettings.cpp
M  +9    -4    src/oxygenstyle.cpp

http://commits.kde.org/oxygen-gtk/a2ca550bd1a3e29acdbfc52fb13630339fa17de0
Comment 7 Hugo Pereira Da Costa 2011-10-03 10:19:22 UTC
Git commit b08811b6365e58cbf1f68a496a9ab9083e6bf876 by Hugo Pereira Da Costa.
Committed on 03/10/2011 at 10:52.
Pushed by hpereiradacosta into branch 'KDE/4.7'.

improved hit area for scrollbars.
CCBUG: 283143

M  +37   -17   kstyles/oxygen/oxygenstyle.cpp

http://commits.kde.org/kde-workspace/b08811b6365e58cbf1f68a496a9ab9083e6bf876
Comment 8 Hugo Pereira Da Costa 2011-10-03 10:19:23 UTC
Git commit 9ebbe99188043c87ab007087cb5061723f31463a by Hugo Pereira Da Costa.
Committed on 03/10/2011 at 10:52.
Pushed by hpereiradacosta into branch 'master'.

improved hit area for scrollbars.
CCBUG: 283143

M  +37   -17   kstyles/oxygen/oxygenstyle.cpp

http://commits.kde.org/kde-workspace/9ebbe99188043c87ab007087cb5061723f31463a
Comment 9 Hugo Pereira Da Costa 2011-10-03 10:21:19 UTC
ok. 
That fixes it in gtk (all branches) and in Qt.
I also backported to earlier version, considering its a bug fix.
As a matter of fact this is quite an improvement, for fullscreen windows, usability wise, So ... thanks for posting.

Closing.
Feel free to reopen if issue still appears (should not, unless applications set extra margins).

Hugo
Comment 10 Ruslan Kabatsayev 2011-10-03 12:40:39 UTC
Great improvement. Thanks, Hugo.
Comment 11 Jared B. 2011-10-04 04:32:47 UTC
Wow, Hugo, thanks so much.  This is by far the fastest I've ever had anyone even look at one of my KDE bug reports, let alone actually fix it!  :-)

One question:  when you say backported it, are you referring to 1.1.3?  If so, is there a tarball of this update available, or would I need to pull it from the repo?  I checked the tarball linked from kde-look.org, but it doesn't seem to have the update, so I may have simply misunderstood what you meant.
Comment 12 Jared B. 2011-10-04 04:46:06 UTC
Well, nevermind.  I got impatient and just pulled the git source.  Works great!  Thanks again.

Btw, I do have one other comment/suggestion:  your manual build and install directions work great, but there seems to be no way to automatically uninstall oxygen-gtk (eg., make uninstall).  Am I maybe just overlooking that?  If not, have you considered adding that feature to make manually testing and uninstalling easier on users?

That's not related to this bug, of course, but I didn't a separate bug report was necessary for the question.  If you think it's worthwhile, though, I'll be happy to create one for this.
Comment 13 Ruslan Kabatsayev 2011-10-04 06:08:08 UTC
> when you say backported it, are you referring to 1.1.3?
Backporting here means cherry-picking the commit from master to 1.1 branch.

> there seems to be no way to automatically uninstall oxygen-gtk
Well, it's as easy as this (assuming defaults):
rm -r /usr/share/themes/oxygen-gtk /usr/lib/gtk-2.0/2.10.0/engines/liboxygen-gtk.so /usr/bin/oxygen-gtk-de?o
Comment 14 Hugo Pereira Da Costa 2011-10-04 09:27:12 UTC
@Jared

http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F

By default, cmake does not support uninstall.
Easiest way is to remove all files that are listed in the "install_manifest.txt" manifest file, generated by cmake, in your build area.

There are also instruction in the link to allow CMake to do that. Should I add it?
Ruslan ? What do you think ?
Comment 15 Jared B. 2011-10-04 13:51:17 UTC
Thanks for the tips.  I think manual removal is a perfectly fine option, but I didn't see any instructions for that, either (the install_manifest.txt file is new to me).  The problem was that I didn't know what had been installed, so I didn't know what to remove.  A quick note in the INSTALL file or something about install_manifest.txt should be just as effective.
Comment 16 Hugo Pereira Da Costa 2011-10-04 13:59:50 UTC
Agreed. Will do.
Comment 17 Ruslan Kabatsayev 2011-10-04 14:05:57 UTC
> There are also instruction in the link to allow CMake to do that. Should I add
> it?
> Ruslan ? What do you think ?
I'd rather just provide an 'uninstall' make target, to automate this simple task, if you don't have real reasons to not do this.
Comment 18 Hugo Pereira Da Costa 2011-10-04 15:43:21 UTC
Git commit a2d10bcadefc75d3a18bb4c332d354da04f32fb1 by Hugo Pereira Da Costa.
Committed on 04/10/2011 at 17:38.
Pushed by hpereiradacosta into branch '1.1'.

Added "uninstall" directive.
CCBUG: 283143

M  +12   -0    CMakeLists.txt
A  +22   -0    cmake_uninstall.cmake.in

http://commits.kde.org/oxygen-gtk/a2d10bcadefc75d3a18bb4c332d354da04f32fb1