Fixing OpenOffice scrollbars with the Elementary theme

The Elementary theme I have on Ubuntu is beautiful. I now have the right scrollbars on Chromium and I wondered when I’d get OpenOffice fixed. A little google-fu and the inbuilt translator of Chromium dug up a post on Argentinan site Soft-Libre.

The solution is really simple, but messes up the theme. DanRabbit is correct in saying that the problem is with OpenOffice, not with his theme, but by tweaking the theme it’s easy to fix. In keeping with the minimalist design ethic, DanRabbit has removed the buttons on the scroll bar. That’s what breaks OpenOffice – it just doesn’t know how to draw the scroll bars without the “steppers”.

To edit the theme you need to open the gtkrc file. If you have installed from a repository, press alt-F and paste in the command
gksudo gedit /usr/share/themes/elementary/gtk-2.0/gtkrc
If you installed it by hand, find the right file – it’s likely to be in a folder something like
Open the file in gedit (or your preferred text editor!)
You’re looking for two lines that say
GtkScrollbar ::has-backward-stepper = 0
GtkScrollbar ::has-forward-stepper = 0

Change the 0’s to 1’s, save and close gedit.

Either log out and back in again, reboot or re-apply the theme – I did it by opening the Appearance dialogue, choosing a different theme, then setting it back to Elementary.

From now on, all of your applications will have the little buttons on the scrollbars, but it will work properly in OpenOffice – hoorah! An easy fix – the only question is why DanRabbit regards the purity of his design over the functionality of having such a key application as OpenOffice work properly.


Earlycj5 pinged this post to show how you can keep the stock elementary look on most programs but still have OpenOffice work almost properly (apparently this should also work with Symphony and LibreOffice, but I’ve not tried it).
Fixed Elementary scrollbarsAfter changing the values following the instructions above, go up about half a dozen lines and add
GtkRange ::stepper-size = 0
Re-apply your theme as I said above and things should be almost normal. However, the scroll bar now overlaps the steppers (arrow icons at the top and bottom of the scroll bar) which means in OpenOffice you get this funny look – as you can see nautilus underneath looks fine. Unfortunately I don’t know the answer to Earlycj5’s question of how to make the arrows white so they don’t show up in OpenOffice – a little google-ing makes me think this is another limitation of the Murrine theme engine.