[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 29 15:42:47 UTC 2021


 vcl/source/app/salvtables.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit e9500a04d6aa933692d53fc429b2544f00ecf561
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Sep 29 15:25:23 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Sep 29 17:42:12 2021 +0200

    Use SetControlFont to set the font size for these controls
    
    The Control level Font overwrites the OutputDevice level Font as far as
    I can see so this is the right way to make it stick.
    
    Change-Id: I9e1442826db8d31019b1038db44156d302d96880
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122828
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4a814aab3ee2..68303bfb391d 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3295,7 +3295,6 @@ void SalInstanceEntry::set_message_type(weld::EntryMessageType eType)
 
 void SalInstanceEntry::set_font(const vcl::Font& rFont)
 {
-    m_xEntry->SetPointFont(*m_xEntry->GetOutDev(), rFont);
     m_xEntry->SetControlFont(rFont);
     m_xEntry->Invalidate();
 }
@@ -5766,6 +5765,7 @@ void SalInstanceTextView::set_monospace(bool bMonospace)
     aFont.SetFontHeight(aOrigFont.GetFontHeight());
     m_xTextView->SetFont(aFont);
     m_xTextView->SetControlFont(aFont);
+    m_xTextView->Invalidate();
 }
 
 void SalInstanceTextView::set_font_color(const Color& rColor)
@@ -6376,11 +6376,8 @@ bool SalInstanceComboBoxWithEdit::get_entry_selection_bounds(int& rStartPos, int
 
 void SalInstanceComboBoxWithEdit::set_entry_font(const vcl::Font& rFont)
 {
-    Edit* pEdit = m_xComboBox->GetSubEdit();
-    assert(pEdit);
-    pEdit->SetPointFont(*pEdit->GetOutDev(), rFont);
     m_xComboBox->SetControlFont(rFont); // tdf#134601 set it as control font to take effect properly
-    pEdit->Invalidate();
+    m_xComboBox->Invalidate();
 }
 
 vcl::Font SalInstanceComboBoxWithEdit::get_entry_font()
@@ -6514,7 +6511,6 @@ public:
     virtual void set_entry_font(const vcl::Font& rFont) override
     {
         Edit& rEntry = m_pEntry->getEntry();
-        rEntry.SetPointFont(*rEntry.GetOutDev(), rFont);
         rEntry.SetControlFont(rFont);
         rEntry.Invalidate();
     }


More information about the Libreoffice-commits mailing list