Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi Ruslan,

On 28.07.2012 15:08, Ruslan Kabatsayev wrote:
This mostly looks good, but breaks a bit border for oxygen-gtk

I have just installed it, yeah - it is broken... :(

(which somehow has worked before the patch, unlike other themes).

Strange.

I'd suggest using getFrameWidth() to adjust the shadow rect.

AFAICS vcl makes listbox a child of borderwindow, which receives the border sizes via DecorationView::DrawFrame:
http://opengrok.libreoffice.org/xref/core/vcl/source/window/brdwin.cxx#1212
(for oxygen-gtk it is 2 for each border);

shrinks the listbox size by that border in Resize():
http://opengrok.libreoffice.org/xref/core/vcl/source/window/brdwin.cxx#2066

draws CTRL_LISTBOX PART_WINDOW (i.e. calls gtk_paint_shadow with "scrolled_window") with its size (i.e. client+borders):
http://opengrok.libreoffice.org/xref/core/vcl/source/window/brdwin.cxx#1362

Try to build with my patch and the attached diff applied, IMHO LibO will do things right. But probably I missed something (as usual :).

OTOH, we've done quite some customizations in oxygen-gtk before to
make it look better with LibO, so maybe this is what should be changed
on oxygen-gtk side.

It would be great if you could check it. :)

Regards,
Ivan
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 94a21e9..c432211 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1359,8 +1359,17 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, 
OutputDevice*
             aCtrlRegion=aContentRgn;
         }
 
+        if (pCtrl->GetType() == WINDOW_TREELISTBOX)
+        {
+            bNativeOK=1;
+            pWin->SetLineColor(Color(COL_BLACK));
+            pWin->SetFillColor(Color(COL_BLACK));
+            pWin->DrawRect(aCtrlRegion);
+        } else {
+
         bNativeOK = pWin->DrawNativeControl( aCtrlType, aCtrlPart, aCtrlRegion, nState,
                 aControlValue, rtl::OUString() );
+        }
 
         // if the native theme draws the spinbuttons in one call, make sure the proper settings
         // are passed, this might force a redraw though.... (TODO: improve)

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.