[Igarden-commit] CommonSource/YAAFExtensions RGPaletteView.cpp, 1.3.2.1, 1.3.2.2
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-12-09 17:47:14
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3458 Modified Files: Tag: Release_branch_v1 RGPaletteView.cpp Log Message: Change icons in palette to be 32x32 Index: RGPaletteView.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGPaletteView.cpp,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** RGPaletteView.cpp 26 Nov 2006 01:17:43 -0000 1.3.2.1 --- RGPaletteView.cpp 9 Dec 2006 17:47:12 -0000 1.3.2.2 *************** *** 44,49 **** //namespace yaaf { ! const int kButtonWidth = 30; ! const int kButtonHeight = 30; const int kButtonBorder = 2; --- 44,49 ---- //namespace yaaf { ! const int kButtonWidth = 36; ! const int kButtonHeight = 36; const int kButtonBorder = 2; *************** *** 556,561 **** void XGPaletteView::DrawButton(XGDraw &draw, Rect where, long index, unsigned char mode) { ! bool down; ! short icon; icon = GetItemIcon(index); --- 556,560 ---- void XGPaletteView::DrawButton(XGDraw &draw, Rect where, long index, unsigned char mode) { ! short icon; icon = GetItemIcon(index); *************** *** 565,635 **** */ ! if (0 == (mode & kEnable) || (GetItemEnabled(index) == 0)) { draw.Draw3DRect(where,yaaf::KXGEBackground); InsetRect(&where,3,3); ! down = false; ! } else { ! if (mode & (kCheck | kDown)) { /* * Draw the outer frame down */ ! ! draw.Draw3DRect(where,yaaf::KXGEInset); ! InsetRect(&where,1,1); ! draw.Draw3DRect(where,yaaf::KXGEBackFrame); ! InsetRect(&where,1,1); ! down = true; ! } else { ! if (index == fHilightTool) { ! draw.Draw3DRect(where,yaaf::KXGEOutset); ! } else { ! draw.Draw3DRect(where,yaaf::KXGEBackFrame); ! } ! InsetRect(&where,1,1); ! draw.Draw3DRect(where,yaaf::KXGEBackFrame); ! InsetRect(&where,1,1); ! down = false; } ! ! /* ! * Draw the button outline ! */ ! ! // if ((mode & kCheck) && (0 == (mode & kDown))) { ! /* ! * Draw the light background ! */ ! ! short r,g,b; ! Color back,light; ! ! back = draw.ColorFromPalette(KXGColorBtnFace); ! light= draw.ColorFromPalette(KXGColorBtnHilite); ! ! r = GetRValue(back); ! r = (r + GetRValue(light))/2; ! g = GetRValue(back); ! g = (g + GetRValue(light))/2; ! b = GetRValue(back); ! b = (b + GetRValue(light))/2; ! ! draw.FillRect(where,RGB(r,g,b)); ! } ! // else ! // { ! // draw.Draw3DRect(where,KXGEBackground); ! // } ! InsetRect(&where,1,1); ! } ! ! if (mode & kEnable) { ! if (down) { ! draw.DrawIcon(icon,where.left+1,where.top+1); ! } else { draw.DrawIcon(icon,where.left,where.top); } - } else { - draw.DrawIcon(icon,where.left,where.top,false); } } --- 564,611 ---- */ ! if (0 == (mode & kEnable) || (GetItemEnabled(index) == 0)) ! { draw.Draw3DRect(where,yaaf::KXGEBackground); InsetRect(&where,3,3); ! draw.DrawIcon(icon,where.left,where.top,false); ! } ! else ! { ! if (mode & (kCheck | kDown)) ! { /* * Draw the outer frame down */ ! draw.SetForeColor(KXGColorBtnShadow); ! draw.MoveTo(where.right-1, where.top); ! draw.LineTo(where.left, where.top); ! draw.LineTo(where.left, where.bottom-1); ! draw.MoveTo(where.right-2, where.top+1); ! draw.LineTo(where.left+1, where.top+1); ! draw.LineTo(where.left+1, where.bottom-2); ! //*** ! draw.SetForeColor(KXGColorBtnHilite); ! draw.MoveTo(where.right-1, where.top+1); ! draw.LineTo(where.right-2, where.bottom-1); ! draw.LineTo(where.left+1, where.bottom-1); ! draw.MoveTo(where.right-2, where.top+2); ! draw.LineTo(where.right-2, where.bottom-2); ! draw.LineTo(where.left+2, where.bottom-2); ! ! InsetRect(&where,2,2); ! draw.ClipRect(&where); ! draw.DrawIcon(1069,where.left,where.top); ! draw.DrawIcon(icon,where.left,where.top); ! draw.ClipRect(NULL); } ! else { ! draw.Draw3DRect(where,yaaf::KXGEBackground); ! InsetRect(&where,2,2); ! draw.ClipRect(&where); ! draw.DrawIcon(1069,where.left,where.top); draw.DrawIcon(icon,where.left,where.top); + draw.ClipRect(NULL); } } } |