]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/srchctlg.cpp
revert last change (r48897)
[wxWidgets.git] / src / generic / srchctlg.cpp
index f9ac1a41ddcb4cfefc65bb51ea9b7caa14fbb2fd..b12fe8e6ae326aa2dd8a3afcdd7b0b0ab29180a1 100644 (file)
@@ -342,8 +342,6 @@ bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id,
     m_text = new wxSearchTextCtrl(this, value, style & ~wxBORDER_MASK);
     m_text->SetDescriptiveText(_("Search"));
 
-    wxSize sizeText = m_text->GetBestSize();
-
     m_searchButton = new wxSearchButton(this,
                                         wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN,
                                         m_searchBitmap);
@@ -540,7 +538,7 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height)
         searchMargin = 0;
         cancelMargin = 0;
     }
-    wxCoord textWidth = width - sizeSearch.x - sizeCancel.x - searchMargin - cancelMargin;
+    wxCoord textWidth = width - sizeSearch.x - sizeCancel.x - searchMargin - cancelMargin - 1;
 
     // position the subcontrols inside the client area
 
@@ -1178,7 +1176,7 @@ void wxSearchCtrl::RecalcBitmaps()
             m_cancelBitmap.GetWidth() != bitmapHeight
             )
         {
-            m_cancelBitmap = RenderCancelBitmap(bitmapHeight-BORDER,bitmapHeight-BORDER); // square
+            m_cancelBitmap = RenderCancelBitmap(bitmapHeight-BORDER-1,bitmapHeight-BORDER-1); // square
             m_cancelButton->SetBitmapLabel(m_cancelBitmap);
         }
         // else this bitmap was set by user, don't alter