Blame SOURCES/0388-lokdocview-Center-the-widget-inside-the-allocation.patch

f325b2
From 356c869cbd52306275956973c18da53a15fe7655 Mon Sep 17 00:00:00 2001
f325b2
From: Pranav Kant <pranavk@libreoffice.org>
f325b2
Date: Wed, 20 Jan 2016 14:49:29 +0530
f325b2
Subject: [PATCH 388/398] lokdocview: Center the widget inside the allocation
f325b2
f325b2
Change-Id: I8d7f8ffb1c5ddd07ccf7d56bdf0ccc866c927401
f325b2
Reviewed-on: https://gerrit.libreoffice.org/21624
f325b2
Tested-by: Jenkins <ci@libreoffice.org>
f325b2
Reviewed-by: Pranav Kant <pranavk@gnome.org>
f325b2
(cherry picked from commit 070bfedb7c0bc01ada0c0b95622543472ccb4a1c)
f325b2
Reviewed-on: https://gerrit.libreoffice.org/21638
f325b2
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
f325b2
(cherry picked from commit 3763ab42fa88d9f2a2248eba1854f3d97fcfbde8)
f325b2
---
f325b2
 libreofficekit/source/gtk/lokdocview.cxx | 11 +++++++++--
f325b2
 1 file changed, 9 insertions(+), 2 deletions(-)
f325b2
f325b2
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
f325b2
index d2c66b951b7d..1af678e1acc2 100644
f325b2
--- a/libreofficekit/source/gtk/lokdocview.cxx
f325b2
+++ b/libreofficekit/source/gtk/lokdocview.cxx
f325b2
@@ -2404,14 +2404,21 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
f325b2
 SAL_DLLPUBLIC_EXPORT GtkWidget*
f325b2
 lok_doc_view_new (const gchar* pPath, GCancellable *cancellable, GError **error)
f325b2
 {
f325b2
-    return GTK_WIDGET (g_initable_new (LOK_TYPE_DOC_VIEW, cancellable, error, "lopath", pPath == NULL ? LOK_PATH : pPath, NULL));
f325b2
+    return GTK_WIDGET (g_initable_new (LOK_TYPE_DOC_VIEW, cancellable, error,
f325b2
+                                       "lopath", pPath == nullptr ? LOK_PATH : pPath,
f325b2
+                                       "halign", GTK_ALIGN_CENTER,
f325b2
+                                       nullptr));
f325b2
 }
f325b2
 
f325b2
 SAL_DLLPUBLIC_EXPORT GtkWidget* lok_doc_view_new_from_widget(LOKDocView* pOldLOKDocView)
f325b2
 {
f325b2
     LOKDocViewPrivate& pOldPriv = getPrivate(pOldLOKDocView);
f325b2
     GtkWidget* pNewDocView = GTK_WIDGET(g_initable_new(LOK_TYPE_DOC_VIEW, /*cancellable=*/nullptr, /*error=*/nullptr,
f325b2
-                                                       "lopath", pOldPriv->m_aLOPath, "lopointer", pOldPriv->m_pOffice, "docpointer", pOldPriv->m_pDocument, NULL));
f325b2
+                                                       "lopath", pOldPriv->m_aLOPath,
f325b2
+                                                       "lopointer", pOldPriv->m_pOffice,
f325b2
+                                                       "docpointer", pOldPriv->m_pDocument,
f325b2
+                                                       "halign", GTK_ALIGN_CENTER,
f325b2
+                                                       nullptr));
f325b2
 
f325b2
     // No documentLoad(), just a createView().
f325b2
     LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(LOK_DOC_VIEW(pNewDocView));
f325b2
-- 
f325b2
2.12.0
f325b2