summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-24 15:21:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-24 15:21:30 +0000
commit5e01c907bf4cace9542f880bae418f71c0fd0c07 (patch)
tree4e8b60aa99bcc10540be4b0ca09bcb313ff78677 /plugins/Clist_nicer/src/Coolsb/coolscroll.cpp
parent4a4b816398add26a704f13af1aa2ff5023df01af (diff)
more warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@6608 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/Coolsb/coolscroll.cpp')
-rw-r--r--plugins/Clist_nicer/src/Coolsb/coolscroll.cpp76
1 files changed, 1 insertions, 75 deletions
diff --git a/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp b/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp
index dcafafdd7c..c1547121d9 100644
--- a/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp
+++ b/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp
@@ -1412,21 +1412,15 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam)
{
SCROLLBAR *sb;
HDC hdc;
- HRGN hrgn;
RECT winrect, rect;
HRGN clip = 0;
- BOOL fUpdateAll = ((LONG)wParam == 1);
BOOL fCustomDraw = FALSE;
LRESULT ret;
DWORD dwStyle;
GetWindowRect(hwnd, &winrect);
- //if entire region needs painting, then make a region to cover the entire window
- if (fUpdateAll)
- hrgn = (HRGN)wParam;
- else
- hrgn = (HRGN)wParam;
+ HRGN hrgn = (HRGN)wParam;
//hdc = GetWindowDC(hwnd);
hdc = CoolSB_GetDC(hwnd, wParam);
@@ -1445,40 +1439,6 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam)
//make the coordinates relative to the window for drawing
OffsetRect(&rect, -winrect.left, -winrect.top);
-#ifdef INCLUDE_BUTTONS
-
- //work out the size of any inserted buttons so we can dra them
- sb->nButSizeBefore = GetButtonSize(sb, hwnd, SBBP_LEFT);
- sb->nButSizeAfter = GetButtonSize(sb, hwnd, SBBP_RIGHT);
-
- //make sure there is room for the buttons
- hbarwidth = rect.right - rect.left;
-
- //check that we can fit any left/right buttons in the available space
- if (sb->nButSizeAfter < (hbarwidth - MIN_COOLSB_SIZE))
- {
- //adjust the scrollbar rectangle to fit the buttons into
- sb->fButVisibleAfter = TRUE;
- rect.right -= sb->nButSizeAfter;
- leftright |= SBBP_RIGHT;
-
- //check that there is enough space for the right buttons
- if (sb->nButSizeBefore + sb->nButSizeAfter < (hbarwidth - MIN_COOLSB_SIZE))
- {
- sb->fButVisibleBefore = TRUE;
- rect.left += sb->nButSizeBefore;
- leftright |= SBBP_LEFT;
- }
- else
- sb->fButVisibleBefore = FALSE;
- }
- else
- sb->fButVisibleAfter = FALSE;
-
-
- DrawHorzButtons(sb, hdc, &rect, leftright);
-#endif// INCLUDE_BUTTONS
-
if (uCurrentScrollbar == SB_HORZ)
fCustomDraw |= NCDrawHScrollbar(sb, hwnd, hdc, &rect, uScrollTimerPortion);
else
@@ -1499,40 +1459,6 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam)
//make the coordinates relative to the window for drawing
OffsetRect(&rect, -winrect.left, -winrect.top);
-#ifdef INCLUDE_BUTTONS
-
- //work out the size of any inserted buttons so we can dra them
- sb->nButSizeBefore = GetButtonSize(sb, hwnd, SBBP_LEFT);
- sb->nButSizeAfter = GetButtonSize(sb, hwnd, SBBP_RIGHT);
-
- //make sure there is room for the buttons
- vbarheight = rect.bottom - rect.top;
-
- //check that we can fit any left/right buttons in the available space
- if (sb->nButSizeAfter < (vbarheight - MIN_COOLSB_SIZE))
- {
- //adjust the scrollbar rectangle to fit the buttons into
- sb->fButVisibleAfter = TRUE;
- rect.bottom -= sb->nButSizeAfter;
- updown |= SBBP_BOTTOM;
-
- //check that there is enough space for the right buttons
- if (sb->nButSizeBefore + sb->nButSizeAfter < (vbarheight - MIN_COOLSB_SIZE))
- {
- sb->fButVisibleBefore = TRUE;
- rect.top += sb->nButSizeBefore;
- updown |= SBBP_TOP;
- }
- else
- sb->fButVisibleBefore = FALSE;
- }
- else
- sb->fButVisibleAfter = FALSE;
-
-
- DrawVertButtons(sb, hdc, &rect, updown);
-#endif // INCLUDE_BUTTONS
-
if (uCurrentScrollbar == SB_VERT)
fCustomDraw |= NCDrawVScrollbar(sb, hwnd, hdc, &rect, uScrollTimerPortion);
else