Statusbar items background

Jan Holesovsky kendy at
Wed Jul 18 09:00:30 PDT 2012

Hi Ruslan,

On 2012-07-08 at 19:20 +0400, Ruslan Kabatsayev wrote:

> I'm trying to make statusbar items render correct window background
> under themselves, i.e. the background specified by theme.
> Attached is the experimental patch which I'd like to hear some
> comments on, namely:
> 1. How could I avoid ignoring bOffScreen, i.e. how to render native
> control (CTRL_WINDOW_BACKGROUND) on VirtualDevice? The problem with
> ignoring bOffScreen is that e.g. when you move zoom slider, it
> flickers because of repaint of window bg and the widget itself
> directly on the Window. And at the same time, VirtualDevice itself
> doesn't seem to support native control.
> 2. For the future (there're still plenty of widgets which don't render
> their background correctly), maybe it's a good idea to add a new
> method to class Window, which will render native themed background in
> the rectangle specified if that's supported by theming backend, and
> fill the rect with background color if no native bg is supported?
> The images attached show how the status bar looks (with test bg image)
> before and after the patch, so that the difference could be easily
> spotted.

Before you go ahead with this patch, it might be better to cleanup one
thing that affects the behavior of the status bar controls, and that is
the 'statusbar:ownerdraw="true"'; like I had to fix in

When you use 'statusbar:ownerdraw="true"', the status controls are
nicely transparent, but I am not 100% sure why this setting exists in
the first place - I think it should be 'true' for all.  So instead of
your patch, I'd try if actually turning all the status controls into
'statusbar:ownerdraw="true"' does what you need (eg. by patching its
reading in framework/source/fwe/xml/statusbardocumenthandler.cxx, so
that you don't have to touch all the statusbar.xml), and if yes, just
remove the statusbar:ownerdraw from the codebase, and clean it up as if
it was always true ;-) - ie. remove it from

all the statusbar.xml's

and change all the occurrences of SIB_USERDRAW (which is the constant
this turns into) as if it was always set.

Does this make sense?

Thank you a lot,

More information about the LibreOffice mailing list