summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Clist_nicer/src/CLCButton.cpp15
-rw-r--r--plugins/Clist_nicer/src/clc.cpp3
-rw-r--r--plugins/Clist_nicer/src/clui.cpp2
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp3
4 files changed, 20 insertions, 3 deletions
diff --git a/plugins/Clist_nicer/src/CLCButton.cpp b/plugins/Clist_nicer/src/CLCButton.cpp
index ef0d9ae385..c337a226e9 100644
--- a/plugins/Clist_nicer/src/CLCButton.cpp
+++ b/plugins/Clist_nicer/src/CLCButton.cpp
@@ -180,7 +180,20 @@ static void PaintWorker(MButtonExtension *ctl, HDC hdcPaint)
if (ctl->hThemeToolbar && ctl->bIsThemed) {
RECT rc = rcClient;
int state = IsWindowEnabled(ctl->hwnd) ? (ctl->stateId == PBS_NORMAL && ctl->bIsDefault ? PBS_DEFAULTED : ctl->stateId) : PBS_DISABLED;
- SkinDrawBg(ctl->hwnd, hdcMem);
+
+ if (ctl->bIsTTButton) {
+ POINT pt;
+ RECT rcParent;
+ GetWindowRect(ctl->hwnd, &rcParent);
+ pt.x = rcParent.left;
+ pt.y = rcParent.top;
+
+ ScreenToClient(g_hwndToolbarFrame, &pt);
+ BitBlt(hdcMem, 0, 0, rc.right, rc.bottom, cfg::dat.hdcToolbar, pt.x, pt.y, SRCCOPY);
+ }
+ else
+ SkinDrawBg(ctl->hwnd, hdcMem);
+
if (IsThemeBackgroundPartiallyTransparent(ctl->hThemeToolbar, TP_BUTTON, TBStateConvert2Flat(state))) {
DrawThemeParentBackground(ctl->hwnd, hdcMem, &rc);
}
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index 1352de08ad..725d78358b 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -171,6 +171,9 @@ static int ClcSettingChanged(WPARAM hContact, LPARAM lParam)
ClcSetButtonState(IDC_TBSOUND, cfg::dat.soundsOff ? BST_CHECKED : BST_UNCHECKED);
SetButtonStates(pcli->hwndContactList);
}
+ else if (!__strcmp(cws->szModule, "TopToolBar") && !__strcmp(cws->szSetting, "UseFlatButton")) {
+ SetButtonToSkinned();
+ }
else if (szProto == NULL) {
if ( !__strcmp(cws->szSetting, "XStatusId"))
CluiProtocolStatusChanged(0, cws->szModule);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index bc1ceab1e5..216ed57ce7 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -798,8 +798,8 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | WS_CLIPCHILDREN);
if (!cfg::dat.bFirstRun)
ConfigureEventArea(hwnd);
- CluiProtocolStatusChanged(0, 0);
ConfigureCLUIGeometry(0);
+ CluiProtocolStatusChanged(0, 0);
for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
statusNames[i-ID_STATUS_OFFLINE] = pcli->pfnGetStatusModeDescription(i, 0);
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp
index e6c9330b81..908eab71b6 100644
--- a/plugins/Clist_nicer/src/extBackg.cpp
+++ b/plugins/Clist_nicer/src/extBackg.cpp
@@ -362,13 +362,14 @@ static void SaveCompleteStructToDB(void)
void SetButtonToSkinned()
{
bool bSkinned = (cfg::dat.bSkinnedButtonMode = cfg::getByte("CLCExt", "bskinned", 0)) != 0;
+ bool bFlat = bSkinned ? true : cfg::getByte("TopToolBar", "UseFlatButton", 0);
for (int i = 0; ; i++) {
if (BTNS[i].pszButtonID == NULL)
break;
if (BTNS[i].hwndButton == 0 || BTNS[i].ctrlid == IDC_TBGLOBALSTATUS || BTNS[i].ctrlid == IDC_TBMENU)
continue;
- CustomizeButton(BTNS[i].hwndButton, bSkinned, !bSkinned, bSkinned, true);
+ CustomizeButton(BTNS[i].hwndButton, bSkinned, !bSkinned, bFlat, true);
}
CustomizeButton(GetDlgItem(pcli->hwndContactList, IDC_TBMENU), bSkinned, !bSkinned, bSkinned);