[Wgui-cvs] wgui/src wg_scrollbar.cpp,1.41,1.42 wg_textbox.cpp,1.26,1.27
Status: Beta
Brought to you by:
greenwire
|
From: Rob W. <gre...@us...> - 2004-07-21 18:38:34
|
Update of /cvsroot/wgui/wgui/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26307/src Modified Files: wg_scrollbar.cpp wg_textbox.cpp Log Message: Fixed the placement of the scrollbars in textboxes, a minor layout issue in scrollbars, and the position of the textbox in the notepad test app. Index: wg_scrollbar.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_scrollbar.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** wg_scrollbar.cpp 16 Jul 2004 16:41:36 -0000 1.41 --- wg_scrollbar.cpp 21 Jul 2004 18:38:23 -0000 1.42 *************** *** 125,129 **** m_ClientRect = CRect(m_WindowRect.Height(), 0, m_WindowRect.Width() - m_WindowRect.Height() - 1, m_WindowRect.Height() - 1); m_pBtnUpLeft->SetWindowRect(CRect(-m_ClientRect.Height(), 0, -1, m_ClientRect.Height() - 1)); ! m_pBtnDownRight->SetWindowRect(CRect(m_ClientRect.Width() + 1, 0, m_ClientRect.Width() + m_ClientRect.Height() - 1, m_ClientRect.Height())); break; } --- 125,129 ---- m_ClientRect = CRect(m_WindowRect.Height(), 0, m_WindowRect.Width() - m_WindowRect.Height() - 1, m_WindowRect.Height() - 1); m_pBtnUpLeft->SetWindowRect(CRect(-m_ClientRect.Height(), 0, -1, m_ClientRect.Height() - 1)); ! m_pBtnDownRight->SetWindowRect(CRect(m_ClientRect.Width() + 1, 0, m_ClientRect.Width() + m_ClientRect.Height(), m_ClientRect.Height() - 1)); break; } Index: wg_textbox.cpp =================================================================== RCS file: /cvsroot/wgui/wgui/src/wg_textbox.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** wg_textbox.cpp 19 Jul 2004 21:49:58 -0000 1.26 --- wg_textbox.cpp 21 Jul 2004 18:38:23 -0000 1.27 *************** *** 880,896 **** iLastLine = 0; } ! m_ClientRect.SetRight(m_WindowRect.Width() - 17); ! m_pVerticalScrollBar->SetMaxLimit(iLastLine); ! if (m_pVerticalScrollBar->GetValue() > iLastLine) { ! m_pVerticalScrollBar->SetValue(iLastLine); } - int iBottom = m_WindowRect.Bottom() - 1; if (bHorzVisible) { ! iBottom -= 12; } ! m_pVerticalScrollBar->SetWindowRect(CRect(m_WindowRect.Right() - 13, m_WindowRect.Top() + 1, m_WindowRect.Right() - 1, iBottom)); ! m_ClientRect.SetBottom(m_WindowRect.Height() - 17); m_pHorizontalScrollBar->SetMaxLimit(iMaxHorzLimit); if (m_pHorizontalScrollBar->GetValue() > iMaxHorzLimit) --- 880,898 ---- iLastLine = 0; } ! if (bVertVisible) { ! m_ClientRect.SetRight(m_WindowRect.Width() - 17); } if (bHorzVisible) { ! m_ClientRect.SetBottom(m_WindowRect.Height() - 17); } ! ! m_pVerticalScrollBar->SetMaxLimit(iLastLine); ! if (m_pVerticalScrollBar->GetValue() > iLastLine) ! { ! m_pVerticalScrollBar->SetValue(iLastLine); ! } ! m_pVerticalScrollBar->SetWindowRect(CRect(m_ClientRect.Width() + 2, 0, m_ClientRect.Width() + 14, m_ClientRect.Height())); m_pHorizontalScrollBar->SetMaxLimit(iMaxHorzLimit); if (m_pHorizontalScrollBar->GetValue() > iMaxHorzLimit) *************** *** 898,907 **** m_pHorizontalScrollBar->SetValue(iMaxHorzLimit); } ! int iRight = m_WindowRect.Right() - 1; ! if (bVertVisible) ! { ! iRight -= 12; ! } ! m_pHorizontalScrollBar->SetWindowRect(CRect(m_WindowRect.Left() + 1, m_WindowRect.Bottom() - 13, iRight, m_WindowRect.Bottom() - 1)); } --- 900,904 ---- m_pHorizontalScrollBar->SetValue(iMaxHorzLimit); } ! m_pHorizontalScrollBar->SetWindowRect(CRect(0, m_ClientRect.Height() + 2, m_ClientRect.Width(), m_ClientRect.Height() + 14)); } |