diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Popup/src/font.cpp | 20 | ||||
-rw-r--r-- | plugins/Popup/src/font.h | 15 | ||||
-rw-r--r-- | plugins/Popup/src/services.cpp | 2 |
3 files changed, 21 insertions, 16 deletions
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp index 5b43ddae96..dc3cbc3950 100644 --- a/plugins/Popup/src/font.cpp +++ b/plugins/Popup/src/font.cpp @@ -39,28 +39,28 @@ void InitFonts() mir_wstrncpy(fid.backgroundName, PU_COL_BACK_NAME, _countof(fid.backgroundName));
mir_wstrncpy(fid.deffontsettings.szFace, L"Tahoma", _countof(fid.deffontsettings.szFace));
- mir_wstrncpy(fid.name, PU_FNT_NAME_TITLE, _countof(fid.name));
+ mir_wstrncpy(fid.name, PU_FNT_NAME_TITLEW, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_TITLE);
fid.deffontsettings.style = DBFONTF_BOLD;
fid.deffontsettings.colour = RGB(0, 0, 0);
FontRegisterW(&fid);
- mir_wstrncpy(fid.name, PU_FNT_NAME_CLOCK, _countof(fid.name));
+ mir_wstrncpy(fid.name, PU_FNT_NAME_CLOCKW, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_CLOCK);
FontRegisterW(&fid);
- mir_wstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name));
+ mir_wstrncpy(fid.name, PU_FNT_NAME_TEXTW, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_TEXT);
fid.deffontsettings.style = 0;
FontRegisterW(&fid);
- mir_wstrncpy(fid.name, PU_FNT_NAME_ACTION, _countof(fid.name));
+ mir_wstrncpy(fid.name, PU_FNT_NAME_ACTIONW, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_ACTION);
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
fid.deffontsettings.colour = RGB(0, 0, 255);
FontRegisterW(&fid);
- mir_wstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTION, _countof(fid.name));
+ mir_wstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTIONW, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_HOVERED_ACTION);
fid.deffontsettings.style = DBFONTF_UNDERLINE;
FontRegisterW(&fid);
@@ -97,23 +97,23 @@ void ReloadFonts() fid.cbSize = sizeof(FontIDW);
mir_wstrncpy(fid.group, PU_FNT_AND_COLORW, _countof(fid.name));
- mir_wstrncpy(fid.name, PU_FNT_NAME_TITLE, _countof(fid.name));
+ mir_wstrncpy(fid.name, PU_FNT_NAME_TITLEW, _countof(fid.name));
fonts.clTitle = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.title = CreateFontIndirect(&lf);
- mir_wstrncpy(fid.name, PU_FNT_NAME_CLOCK, _countof(fid.name));
+ mir_wstrncpy(fid.name, PU_FNT_NAME_CLOCKW, _countof(fid.name));
fonts.clClock = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.clock = CreateFontIndirect(&lf);
- mir_wstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name));
+ mir_wstrncpy(fid.name, PU_FNT_NAME_TEXTW, _countof(fid.name));
fonts.clText = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.text = CreateFontIndirect(&lf);
- mir_wstrncpy(fid.name, PU_FNT_NAME_ACTION, _countof(fid.name));
+ mir_wstrncpy(fid.name, PU_FNT_NAME_ACTIONW, _countof(fid.name));
fonts.clAction = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.action = CreateFontIndirect(&lf);
- mir_wstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTION, _countof(fid.name));
+ mir_wstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTIONW, _countof(fid.name));
fonts.clActionHover = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.actionHover = CreateFontIndirect(&lf);
diff --git a/plugins/Popup/src/font.h b/plugins/Popup/src/font.h index c7403af354..062dbb170f 100644 --- a/plugins/Popup/src/font.h +++ b/plugins/Popup/src/font.h @@ -30,11 +30,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define PU_FNT_AND_COLOR_DB MODULNAME //use eg mir_strcpy(fid.dbSettingsGroup, PU_FNT_GROUP_DB);
#define PU_FNT_PREFIX "fnt%s" //use eg mir_snprintf(fid.prefix, _countof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_....);
-#define PU_FNT_NAME_TITLE LPGENW("Title") //use eg mir_wstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDW
-#define PU_FNT_NAME_CLOCK LPGENW("Clock")
-#define PU_FNT_NAME_TEXT LPGENW("Text")
-#define PU_FNT_NAME_ACTION LPGENW("Action")
-#define PU_FNT_NAME_HOVERED_ACTION LPGENW("Hovered action")
+#define PU_FNT_NAME_TITLE LPGEN("Title")
+#define PU_FNT_NAME_TITLEW LPGENW("Title") //use eg mir_wstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDW
+#define PU_FNT_NAME_CLOCK LPGEN("Clock")
+#define PU_FNT_NAME_CLOCKW LPGENW("Clock")
+#define PU_FNT_NAME_TEXT LPGEN("Text")
+#define PU_FNT_NAME_TEXTW LPGENW("Text")
+#define PU_FNT_NAME_ACTION LPGEN("Action")
+#define PU_FNT_NAME_ACTIONW LPGENW("Action")
+#define PU_FNT_NAME_HOVERED_ACTION LPGEN("Hovered action")
+#define PU_FNT_NAME_HOVERED_ACTIONW LPGENW("Hovered action")
#define PU_COL_BACK_NAME LPGENW("Background")
#define PU_COL_BACK_SETTING "ColourBg"
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index c68f83d577..8f10565233 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -387,7 +387,7 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam) fid.deffontsettings.charset = DEFAULT_CHARSET;
fid.deffontsettings.size = -11;
mir_wstrncpy(fid.deffontsettings.szFace, L"Verdana", _countof(fid.deffontsettings.szFace) - 1);
- mir_wstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name) - 1);
+ mir_wstrncpy(fid.name, PU_FNT_NAME_TEXTW, _countof(fid.name) - 1);
mir_strncpy(fid.prefix, setting, _countof(fid.prefix));
mir_snprintf(fid.prefix, "%s/Text", ptd->pupClass.pszName); // result is "%s/TextCol"
fid.deffontsettings.style = 0;
|