diff options
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/themes.cpp | 23 |
3 files changed, 11 insertions, 19 deletions
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 0afa4671f8..290f68af5a 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1062,12 +1062,10 @@ static int MessageDialogResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL * }
}
- //Bolshevik: resizes avatar control _FIXED
if (dat->hwndContactPic) //if Panel control was created?
SetWindowPos(dat->hwndContactPic, HWND_TOP, 1, ((urc->rcItem.bottom - urc->rcItem.top) - (dat->pic.cy)) / 2 + 1, //resizes it
- dat->pic.cx - 2,
- dat->pic.cy - 2, SWP_SHOWWINDOW);
- //Bolshevik_
+ dat->pic.cx - 2, dat->pic.cy - 2, SWP_SHOWWINDOW);
+
if (PluginConfig.g_FlashAvatarAvail) {
RECT rc = { urc->rcItem.left, urc->rcItem.top, urc->rcItem.right, urc->rcItem.bottom };
FLASHAVATAR fa = { 0 };
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 4ae7a38fbd..6148967df9 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1948,7 +1948,6 @@ int TSAPI MsgWindowDrawHandler(WPARAM wParam, LPARAM lParam, TWindowData *dat) rb.max_width, rb.max_height, CSkin::m_default_bf);
SelectObject(hdcMem, hbmMem);
- //DeleteObject(hbmMem);
DeleteDC(hdcMem);
if (hbmNew != hbmAvatar)
DeleteObject(hbmNew);
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index c6499fc3a7..f9d80db420 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -1698,25 +1698,15 @@ void CSkin::setupTabCloseBitmap(bool fDeleteOnly) */
void CSkin::setupAeroSkins()
{
- TCHAR tszFilename[MAX_PATH], tszBasePath[MAX_PATH];
-
M.getAeroState();
UnloadAeroTabs();
- BOOL isOpaque;
- HBITMAP hbm;
- BITMAP bm;
-
- if (!m_fAeroSkinsValid)
- return;
-
- mir_sntprintf(tszBasePath, MAX_PATH, _T("%s"), M.getDataPath());
+ TCHAR tszFilename[MAX_PATH], tszBasePath[MAX_PATH];
+ _tcsncpy_s(tszBasePath, M.getDataPath(), _TRUNCATE);
if (tszBasePath[lstrlen(tszBasePath) - 1] != '\\')
_tcscat(tszBasePath, _T("\\"));
- /*
- * load unknown avatar..
- */
+ // load unknown avatar..
if (0 == PluginConfig.g_hbmUnknown) {
mir_sntprintf(tszFilename, MAX_PATH, _T("%scustom_unknown.png"), tszBasePath);
if (!PathFileExists(tszFilename))
@@ -1729,10 +1719,14 @@ void CSkin::setupAeroSkins() }
}
+ if (!m_fAeroSkinsValid)
+ return;
+
mir_sntprintf(tszFilename, MAX_PATH, _T("%scustom_tabskin_aero.png"), tszBasePath);
if (!PathFileExists(tszFilename))
mir_sntprintf(tszFilename, MAX_PATH, _T("%stabskin_aero.png"), tszBasePath);
+ BOOL isOpaque = false;
if (CMimAPI::m_pfnDwmGetColorizationColor && M.isAero())
CMimAPI::m_pfnDwmGetColorizationColor(&m_dwmColor, &isOpaque);
else
@@ -1777,7 +1771,7 @@ void CSkin::setupAeroSkins() FIBITMAP *fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR | IMGL_RETURNDIB);
- hbm = FIF->FI_CreateHBITMAPFromDIB(fib);
+ HBITMAP hbm = FIF->FI_CreateHBITMAPFromDIB(fib);
CImageItem::Colorize(hbm, GetRValue(m_dwmColorRGB),
GetGValue(m_dwmColorRGB),
@@ -1785,6 +1779,7 @@ void CSkin::setupAeroSkins() CImageItem::PreMultiply(hbm, 1);
+ BITMAP bm;
GetObject(hbm, sizeof(bm), &bm);
m_tabTop = new CImageItem(4, 4, 4, 4, 0, hbm, IMAGE_FLAG_DIVIDED | IMAGE_PERPIXEL_ALPHA,
0, 255, 30, 80, 50, 100);
|