]> git.saurik.com Git - wxWidgets.git/commitdiff
removed bitmap scaling in bitmap button handler
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 17 Sep 2000 19:16:13 +0000 (19:16 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 17 Sep 2000 19:16:13 +0000 (19:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xml/xh_bmpbt.cpp

index cfc3fe5891f568567ee8f0db1673b104b5d05e39..0fa81797ee69fe0a8548b6a3fd2cd64619e64e1d 100644 (file)
@@ -38,8 +38,7 @@ wxObject *wxBitmapButtonXmlHandler::DoCreateResource()
 { 
     wxBitmapButton *button = new wxBitmapButton(m_ParentAsWindow,
                                     GetID(),
-                                    GetBitmap(_T("bitmap"), GetSize()),
-                                    //GetBitmap(_T("bitmap")),
+                                    GetBitmap(_T("bitmap")),
                                     GetPosition(), GetSize(),
                                     GetStyle(_T("style"), wxBU_AUTODRAW),
                                     wxDefaultValidator,
@@ -47,6 +46,13 @@ wxObject *wxBitmapButtonXmlHandler::DoCreateResource()
     if (GetBool(_T("default"), 0) == 1) button->SetDefault();
     SetupWindow(button);
     
+    if (!GetParamValue(_T("selected")).IsEmpty())
+        button->SetBitmapSelected(GetBitmap(_T("selected")));
+    if (!GetParamValue(_T("focus")).IsEmpty())
+        button->SetBitmapFocus(GetBitmap(_T("focus")));
+    if (!GetParamValue(_T("disabled")).IsEmpty())
+        button->SetBitmapDisabled(GetBitmap(_T("disabled")));
+    
     return button;
 }