Skip to content

Commit

Permalink
#5872: use a standard wxBitmapToggleButton for "Show skins"
Browse files Browse the repository at this point in the history
This button does not currently change its icon when toggled, so we can
use the standard wxBitmapToggleButton instead of our wxutil subclass.
  • Loading branch information
Matthew Mott committed Jan 25, 2022
1 parent cf859ad commit a109bd7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions radiant/ui/modelselector/ModelSelector.cpp
Expand Up @@ -21,11 +21,11 @@
#include "string/convert.h"

#include <wx/button.h>
#include <wx/tglbtn.h>
#include <wx/panel.h>
#include <wx/splitter.h>
#include <wx/checkbox.h>
#include "wxutil/dataview/ResourceTreeViewToolbar.h"
#include "wxutil/BitmapToggleButton.h"
#include "wxutil/Bitmap.h"
#include "ui/UserInterfaceModule.h"

Expand Down Expand Up @@ -263,9 +263,8 @@ wxWindow* ModelSelector::setupTreeViewToolbar(wxWindow* parent)
// Set up the top treeview toolbar, including a custom button to enable/disable the showing of
// skins in the tree.
auto* toolbar = new wxutil::ResourceTreeViewToolbar(parent, _treeView);
auto* showSkinsBtn = new wxutil::BitmapToggleButton(toolbar,
wxutil::GetLocalBitmap("skin16.png"),
wxutil::GetLocalBitmap("skin16.png"));
auto* showSkinsBtn = new wxBitmapToggleButton(toolbar, wxID_ANY,
wxutil::GetLocalBitmap("skin16.png"));
showSkinsBtn->SetValue(true);
showSkinsBtn->SetToolTip(_("List model skins in the tree underneath their associated models"));
showSkinsBtn->Bind(wxEVT_TOGGLEBUTTON,
Expand Down

0 comments on commit a109bd7

Please sign in to comment.