Created
April 5, 2021 20:40
-
-
Save tomay3000/32ba8d64267df1bc3c6d847641656da6 to your computer and use it in GitHub Desktop.
minimal 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp | |
index 65da9f35b6..6b133114af 100644 | |
--- a/samples/minimal/minimal.cpp | |
+++ b/samples/minimal/minimal.cpp | |
@@ -29,6 +29,8 @@ | |
#include "wx/wx.h" | |
#endif | |
+#include <wx/artprov.h> | |
+ | |
// ---------------------------------------------------------------------------- | |
// resources | |
// ---------------------------------------------------------------------------- | |
@@ -178,6 +180,21 @@ MyFrame::MyFrame(const wxString& title) | |
CreateStatusBar(2); | |
SetStatusText("Welcome to wxWidgets!"); | |
#endif // wxUSE_STATUSBAR | |
+ | |
+ wxBoxSizer* pBoxSizer1 = new wxBoxSizer(wxHORIZONTAL); | |
+ wxButton* pButton1 = new wxButton(this, wxID_ANY); | |
+ pBoxSizer1->Add(pButton1, 1, wxALL|wxEXPAND, 5); | |
+ wxButton* pButton2 = new wxButton(this, wxID_ANY); | |
+ pBoxSizer1->Add(pButton2, 1, wxALL|wxEXPAND, 5); | |
+ SetSizer(pBoxSizer1); | |
+ wxBitmap bmp = wxArtProvider::GetBitmap(wxART_INFORMATION, wxART_BUTTON, wxSize(128, 128)); | |
+ pButton1->SetBitmap(bmp); | |
+ pButton2->SetBitmap(bmp); | |
+ wxImage img = bmp.ConvertToImage(); | |
+ img.ChangeSaturation(1); | |
+ pButton2->SetBitmapPressed(img); | |
+ pButton2->SetBitmapCurrent(img); | |
+ //pButton2->SetBitmapFocus(img); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp | |
index 65da9f35b6..6b133114af 100644 | |
--- a/samples/minimal/minimal.cpp | |
+++ b/samples/minimal/minimal.cpp | |
@@ -29,6 +29,8 @@ | |
#include "wx/wx.h" | |
#endif | |
+#include <wx/artprov.h> | |
+ | |
// ---------------------------------------------------------------------------- | |
// resources | |
// ---------------------------------------------------------------------------- | |
@@ -178,6 +180,21 @@ MyFrame::MyFrame(const wxString& title) | |
CreateStatusBar(2); | |
SetStatusText("Welcome to wxWidgets!"); | |
#endif // wxUSE_STATUSBAR | |
+ | |
+ wxBoxSizer* pBoxSizer1 = new wxBoxSizer(wxHORIZONTAL); | |
+ wxButton* pButton1 = new wxButton(this, wxID_ANY); | |
+ pBoxSizer1->Add(pButton1, 1, wxALL|wxEXPAND, 5); | |
+ wxButton* pButton2 = new wxButton(this, wxID_ANY); | |
+ pBoxSizer1->Add(pButton2, 1, wxALL|wxEXPAND, 5); | |
+ SetSizer(pBoxSizer1); | |
+ wxBitmap bmp = wxArtProvider::GetBitmap(wxART_INFORMATION, wxART_BUTTON, wxSize(128, 128)); | |
+ pButton1->SetBitmap(bmp); | |
+ pButton2->SetBitmap(bmp); | |
+ wxImage img = bmp.ConvertToImage(); | |
+ img.ChangeSaturation(1); | |
+ pButton2->SetBitmapPressed(img); | |
+ pButton2->SetBitmapCurrent(img); | |
+ //pButton2->SetBitmapFocus(img); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment