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
http://cgit.freedesktop.org/libreoffice/core/commit/?id=93610466a3bffb08b500ac42e8c093cf33517097
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
framework/dtd/statusbar.dtd
framework/source/fwe/xml/statusbardocumenthandler.cxx
all the statusbar.xml's
etc.
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,
Kendy
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.