diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-12-21 08:51:56 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-12-21 10:59:36 +0100 |
commit | 4f140ebac1f971d72f5bb59ee23a3fe248c4d16e (patch) | |
tree | 78401e35dc42a0479b99ee6deb4cd392ed987c42 /cui/qa | |
parent | d6fa091a75eaf665ec734a56ef1e10b72bc603dd (diff) |
sd theme: allow setting color effects in the chardlg
Which means not only the 12 colors from the theme are offered (which
comes from the current master page), but also lighter/darker variants.
And once these are selected, their theme index and luminance modulation
/ offset is also remembered. This means if you pick light blue and later
change accent1 from blue to orange, you get light orange out of the box.
Change-Id: Ia83b8971ad894d02ed4ec5ca914684fc9cf9a677
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127211
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'cui/qa')
-rw-r--r-- | cui/qa/uitest/dialogs/chardlg.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cui/qa/uitest/dialogs/chardlg.py b/cui/qa/uitest/dialogs/chardlg.py index c49c08dbc687..631766922a0d 100644 --- a/cui/qa/uitest/dialogs/chardlg.py +++ b/cui/qa/uitest/dialogs/chardlg.py @@ -94,7 +94,8 @@ class Test(UITestCase): paletteSelector = floatWindow.getChild("palette_listbox") select_by_text(paletteSelector, "Theme colors") colorSet = floatWindow.getChild("colorset") - colorSet.executeAction("CHOOSE", mkPropertyValues({"POS": "4"})) + # 4 would be accent1, +12 is the first from the effect variants. + colorSet.executeAction("CHOOSE", mkPropertyValues({"POS": "16"})) # Then make sure the doc model has the correct color theme index: drawPage = component.getDrawPages().getByIndex(0) @@ -109,6 +110,14 @@ class Test(UITestCase): # i.e. no theme index was set, instead of accent1 (index into the above color scheme). self.assertEqual(portion.CharColorTheme, 4) + # Then make sure that '80% lighter' is lum-mod=2000 and lum-off=8000: + # Without the accompanying fix in place, this test would have failed with: + # AssertionError: 10000 != 2000 + # i.e. the effects where not applied, luminancen modulation was the default instead of a + # custom value. + self.assertEqual(portion.CharColorLumMod, 2000) + self.assertEqual(portion.CharColorLumOff, 8000) + def testSvxCharEffectsPageWriter(self): # Start Writer. with self.ui_test.create_doc_in_start_center("writer") as component: |