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

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Wed May 19 11:30:54 UTC 2021


 cui/source/tabpages/chardlg.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f22d838e03c2ab11d1f408cf86f79f1f5ee75d45
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Tue May 18 13:08:04 2021 +0200
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Wed May 19 13:30:17 2021 +0200

    tdf#142317 chardlg UI: show approx auto-esc % based on EscProp
    
    Subscripts and Superscripts normally have "automatic" enabled.
    The value shown (in the greyed out raised/lowered by field)
    was showing 8%. Well, that value is true only for default
    nProp of 58%. If nProp is a non-default value, it is better
    to show (an approximation) of the actual percentage that
    is used to raise/lower the character.
    
    [Note: this only affects the initial view when the
    dialog is first opened. After any changes, it will
    show the value in the saved user settings.]
    
    Change-Id: Ife26e0c4f99a41e7568591f0a60cc7068dc3fd90
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115739
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 8c9c9825373d..925427d7b93e 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2707,7 +2707,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet )
                 m_xHighPosBtn->set_active(true);
                 if ( nEsc == DFLT_ESC_AUTO_SUPER )
                 {
-                    nEsc = DFLT_ESC_SUPER;
+                    nEsc = .8 * (100 - nEscProp);  //approximation of actual percentage used
                     bAutomatic = true;
                 }
             }
@@ -2717,7 +2717,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet )
                 m_xLowPosBtn->set_active(true);
                 if ( nEsc == DFLT_ESC_AUTO_SUB )
                 {
-                    nEsc = DFLT_ESC_SUB;
+                    nEsc = .2 * -(100 - nEscProp);  //approximation of actual percentage used
                     bAutomatic = true;
                 }
             }


More information about the Libreoffice-commits mailing list