summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-29 15:13:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-10-04 13:21:44 +0200
commitfeb1cdd5bcbdf8dfe350551ab84d89a43d6fde8c (patch)
tree3ef914cb5bf5db1874c7e381d1c68e2b046edf86 /include
parentc44574f6d28d8bb38e0a54ba079ca76b044bb346 (diff)
tdf#141633 set correct font sizes in tableview child widgets
Change-Id: Ic96a0ad8203bf3903546c0c2f07d96254ca01e4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122832 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 61050c6d7b8bceef2704eba0bfe4473ee75e669d) contains... Related: tdf#141633 PointFont gets overwritten by ControlFont Change-Id: I26ffffe7917d109ddc61fd2d2646db0988937c7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122827 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 4e2306a5e336e2b43759c9712535626d0f2c168f) Related: tdf#141633 support setting a custom font for TextView Change-Id: I4c27a21c5c682fc73c37594749627e4cc7c0822d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122833 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 4d445ac9aa43b3399a579e3dbb1aac94507c9520) tdf#141633 multiple line entry font size/zoom not taking effect The "sample db" example (Mockup.odb) has multiline entries used in its "Journal Entry" column. Those are painted by taking snapshots of a never-really-shown textview widget. But the textview is always drawn using its original default font size and changing the page zoom and/or font size had no effect on the size of text in the "Journal Entry" column. explicitly emit style_updated to get the GtkTextView to sync its font size from the css changed by the set_font Change-Id: Ic7d644b13c28f30a2c646b9d4098ea6e7f0dab81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122889 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 36d5e26549b273118cea8969c43ef5ad3845f8df) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123041 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/editbrowsebox.hxx12
-rw-r--r--include/vcl/weld.hxx3
2 files changed, 15 insertions, 0 deletions
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index c012414ded51..a758d1142a88 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -172,6 +172,8 @@ namespace svt
virtual bool ProcessKey(const KeyEvent& rKEvt);
+ virtual void SetPointFont(const vcl::Font& rFont);
+
// chain after the FocusInHdl
void SetFocusInHdl(const Link<LinkParamNone*,void>& rHdl)
{
@@ -224,6 +226,11 @@ namespace svt
m_pEntry->set_editable(!bReadOnly);
}
+ virtual void SetPointFont(const vcl::Font& rFont) override
+ {
+ m_pEntry->set_font(rFont);
+ }
+
virtual void dispose() override;
weld::Entry& get_widget() { return *m_pEntry; }
@@ -388,6 +395,11 @@ namespace svt
m_xWidget->set_editable(!bReadOnly);
}
+ virtual void SetPointFont(const vcl::Font& rFont) override
+ {
+ m_xWidget->set_font(rFont);
+ }
+
virtual void GetFocus() override;
virtual void dispose() override;
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 4546da76b18e..9038351c2715 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2133,6 +2133,9 @@ public:
return get_text_height() * nRows;
}
+ // font size is in points, not pixels, e.g. see Window::[G]etPointFont
+ virtual void set_font(const vcl::Font& rFont) = 0;
+
/*
Typically you want to avoid the temptation of customizing
font colors