include/sfx2/emojicontrol.hxx        |    2 ++
 include/sfx2/emojiview.hxx           |    6 ++++--
 sfx2/source/control/emojicontrol.cxx |    4 ++++
 sfx2/source/control/emojiview.cxx    |    7 +++++++
 4 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 70c03ec408360bb1285478b08bd7edcdbb090376
Author: Akshay Deep <akshaydeepi...@gmail.com>
Date:   Sun Nov 27 04:01:33 2016 +0530

    Emoji Control: Larger emoji rendering
    
    Change-Id: Iec51d4e73926cf8203638d2ad013ddfdd47d8ee4
    Reviewed-on: https://gerrit.libreoffice.org/31256
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/include/sfx2/emojicontrol.hxx b/include/sfx2/emojicontrol.hxx
index 67835cd..fe8a627 100644
--- a/include/sfx2/emojicontrol.hxx
+++ b/include/sfx2/emojicontrol.hxx
@@ -18,6 +18,8 @@
 #include <sfx2/tbxctrl.hxx>
 #include <com/sun/star/frame/XFrame.hpp>
 
+#define TAB_FONT_SIZE 15
+
 class EmojiView;
 class ThumbnailViewItem;
 enum class FILTER_CATEGORY;
diff --git a/include/sfx2/emojiview.hxx b/include/sfx2/emojiview.hxx
index 602fae9..30245cf 100644
--- a/include/sfx2/emojiview.hxx
+++ b/include/sfx2/emojiview.hxx
@@ -13,8 +13,8 @@
 #include <sfx2/thumbnailview.hxx>
 
 //unicode item defines
-#define ITEM_MAX_WIDTH 20
-#define ITEM_MAX_HEIGHT 20
+#define ITEM_MAX_WIDTH 30
+#define ITEM_MAX_HEIGHT 30
 #define ITEM_PADDING 5
 #define ITEM_MAX_TEXT_LENGTH 10
 
@@ -73,6 +73,8 @@ protected:
 
     virtual void KeyInput( const KeyEvent& rKEvt ) override;
 
+    virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
+
 protected:
     std::string msJSONData;
 
diff --git a/sfx2/source/control/emojicontrol.cxx 
b/sfx2/source/control/emojicontrol.cxx
index dc66b1f..f27f102 100644
--- a/sfx2/source/control/emojicontrol.cxx
+++ b/sfx2/source/control/emojicontrol.cxx
@@ -85,6 +85,10 @@ SfxEmojiControl::SfxEmojiControl(sal_uInt16 nId, const 
css::uno::Reference< css:
     nCurPageId = mpTabControl->GetPageId(FILTER_UNICODE9);
     mpTabControl->SetTabPage(nCurPageId, pTabPage);
     ConvertLabelToUnicode(nCurPageId);
+
+    vcl::Font rFont = mpTabControl->GetControlFont();
+    rFont.SetFontHeight(TAB_FONT_SIZE);
+    mpTabControl->SetControlFont(rFont);
     pTabPage->Show();
 
     mpEmojiView->SetStyle(mpEmojiView->GetStyle() | WB_VSCROLL);
diff --git a/sfx2/source/control/emojiview.cxx 
b/sfx2/source/control/emojiview.cxx
index 6ab877f..6494002 100644
--- a/sfx2/source/control/emojiview.cxx
+++ b/sfx2/source/control/emojiview.cxx
@@ -151,6 +151,13 @@ void EmojiView::Populate()
     }
 }
 
+void EmojiView::ApplySettings(vcl::RenderContext& rRenderContext)
+{
+    ThumbnailView::ApplySettings(rRenderContext);
+    mpItemAttrs->aFontSize.setX(ITEM_MAX_WIDTH - 2*ITEM_PADDING);
+    mpItemAttrs->aFontSize.setY(ITEM_MAX_HEIGHT - 2*ITEM_PADDING);
+}
+
 void EmojiView::MouseButtonDown( const MouseEvent& rMEvt )
 {
     GrabFocus();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to