summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-12-21 08:51:56 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-12-21 10:59:36 +0100
commit4f140ebac1f971d72f5bb59ee23a3fe248c4d16e (patch)
tree78401e35dc42a0479b99ee6deb4cd392ed987c42 /include/svx
parentd6fa091a75eaf665ec734a56ef1e10b72bc603dd (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 'include/svx')
-rw-r--r--include/svx/Palette.hxx2
-rw-r--r--include/svx/PaletteManager.hxx3
-rw-r--r--include/svx/strings.hrc5
3 files changed, 10 insertions, 0 deletions
diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index fc9b7cb7ad33..c23a09f9cbc8 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -39,6 +39,8 @@ struct SVXCORE_DLLPUBLIC NamedThemedColor
Color m_aColor;
OUString m_aName;
sal_Int16 m_nThemeIndex = -1;
+ sal_Int16 m_nLumMod = 10000;
+ sal_Int16 m_nLumOff = 0;
static NamedThemedColor FromNamedColor(const NamedColor& rNamedColor);
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index cfe19e29994e..d67623555157 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -76,6 +76,9 @@ public:
bool IsThemePaletteSelected() const;
+ static void GetThemeIndexLumModOff(sal_uInt16 nItemId, sal_Int16& rThemeIndex,
+ sal_Int16& rLumMod, sal_Int16& rLumOff);
+
static void DispatchColorCommand(const OUString& aCommand, const svx::NamedThemedColor& rColor);
};
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 49c170b0a4bb..c172cbfa0a3c 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1132,6 +1132,11 @@
#define RID_SVXSTR_THEME_COLOR10 NC_("RID_SVXSTR_THEME_COLOR10", "Accent 6")
#define RID_SVXSTR_THEME_COLOR11 NC_("RID_SVXSTR_THEME_COLOR11", "Hyperlink")
#define RID_SVXSTR_THEME_COLOR12 NC_("RID_SVXSTR_THEME_COLOR12", "Followed Hyperlink")
+#define RID_SVXSTR_THEME_EFFECT1 NC_("RID_SVXSTR_THEME_EFFECT1", "%1, 80% Lighter")
+#define RID_SVXSTR_THEME_EFFECT2 NC_("RID_SVXSTR_THEME_EFFECT2", "%1, 60% Lighter")
+#define RID_SVXSTR_THEME_EFFECT3 NC_("RID_SVXSTR_THEME_EFFECT3", "%1, 40% Lighter")
+#define RID_SVXSTR_THEME_EFFECT4 NC_("RID_SVXSTR_THEME_EFFECT4", "%1, 25% Darker")
+#define RID_SVXSTR_THEME_EFFECT5 NC_("RID_SVXSTR_THEME_EFFECT5", "%1, 50% Darker")
#define RID_SVX_EXTRUSION_BAR NC_("RID_SVX_EXTRUSION_BAR", "Extrusion")
#define RID_SVXSTR_UNDO_APPLY_EXTRUSION_ON_OFF NC_("RID_SVXSTR_UNDO_APPLY_EXTRUSION_ON_OFF", "Apply Extrusion On/Off")