I've been having this issue even in Lubuntu 13.04 Raring, and using apt-get
to install the lubuntu-artwork
packages in the other answers here did nothing for me. I did a lot of digging, running in circles, and guesswork before I found a solution.
The problem here is that the parameters used to define the scrollbar images to GTK are wrong - specifically, the border values given total up to a larger space than the image's dimensions (as the warnings state).
Solution
To fix this, you'll need to:
- Open
/usr/share/themes/Lubuntu-default/gtk-2.0/scrollbar.rc
with elevated permissions (e.g. sudo emacs
).
- The first two
Image
definitions (containing null.png
) will have a border
argument defined. Change both of these to have values of {1, 1, 1, 1}
.
- The next few
Image
definitions are for the scrollbar itself, in its normal and prelit states.
- For the horizontal scrollbars, change the
border
to {6, 6, 4, 4}
.
- For the vertical scrollbars, change the
border
to {4, 4, 6, 6}
.
Technical Reasoning
I came across this tutorial on GTK2's pixmap engine which explained to me what the various arguments given in the pixmap
's gtkrc
arguments meant. What the border
argument seems to do is define how many pixels of the image should be preserved from the respective edge of the image before the rest of them are stretched to fit the widget (though an image with larger borders than the widget containing it will be squashed anyway; making the vertical scrollbar 12px big resulted in a squashed scrollbar).
The order of the numbers are {left, right, top, bottom}. null.png
is a 2x2 image, so to make the borders fit within the image, each side should be 1 pixel. A left of 1 + a right of 1 = 2. Same for the top and bottom. The vertical scrollbar image is an 8x18 image. The given border dimensions of {6, 6, 6, 6}
total a width larger than 8 pixels. For the horizontal scrollbar (which is 18x8), that's a height greater than 8 pixels.
In short, a border argument where the sum of the left and right or top and bottom border values are greater than the dimensions of the image will cause that warning.
emacs -nw
(no window).