]> source.dussan.org Git - tigervnc.git/commitdiff
Added ToolBar::getButtonsWidth(), ToolBar::getButtonsHeight().
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Sun, 17 Apr 2005 11:58:47 +0000 (11:58 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Sun, 17 Apr 2005 11:58:47 +0000 (11:58 +0000)
Modifed ToolBar::autoSize().
If toolbar has CCS_NORESIZE style, then autoSize() resizes toolbar itself
else it resizes by TB_AUTOSIZE message.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@292 3789f03b-4d11-0410-bbf8-ca57d06f2519

rfbplayer/ToolBar.cxx

index d92d584911144ccccab0f898f390861b0c52e927..6551cf805fa7d70e4d66013e9999cab306339e96 100644 (file)
@@ -186,7 +186,7 @@ void ToolBar::autoSize() {
     RECT r, btnRect;
     GetClientRect(parentHwnd, &r);
     getButtonRect(0, &btnRect);
-    int height = getButtonsHeight() + btnRect.top * 2 + 1;
+    int height = getButtonsHeight() + btnRect.top * 2 + 2;
     SetWindowPos(getHandle(), HWND_TOP, 0, 0, r.right - r.left, height, 
       SWP_NOMOVE);
   } else {