[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - include/sfx2 sfx2/source

Akshay Deep akshaydeepiitr at gmail.com
Wed Nov 30 10:29:36 UTC 2016


 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 0046e3815406e99c8a5023c1046cbd8ac52a276b
Author: Akshay Deep <akshaydeepiitr at 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 <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 70c03ec408360bb1285478b08bd7edcdbb090376)
    Reviewed-on: https://gerrit.libreoffice.org/31398
    Reviewed-by: Akshay Deep <akshaydeepiitr at gmail.com>

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();


More information about the Libreoffice-commits mailing list