summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-05-18 13:08:04 +0200
committerJustin Luth <justin_luth@sil.org>2021-05-19 13:30:17 +0200
commitf22d838e03c2ab11d1f408cf86f79f1f5ee75d45 (patch)
tree2b3a93a229f09998f5b6ea91526b3b0f261b268e /cui
parente179de871b09cc2242e998fde8387cd666f1e9f6 (diff)
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@sil.org>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/chardlg.cxx4
1 files changed, 2 insertions, 2 deletions
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;
}
}