Skip to content

Commit

Permalink
FIX: [STUDIO-1752] remove background of tips_arrow
Browse files Browse the repository at this point in the history
Change-Id: I5634e33ea320fc8e5fe9cc9d2b641e4598ce133d
  • Loading branch information
bambu123 authored and lanewei120 committed Jan 10, 2023
1 parent 41d08e0 commit 3ee83cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion resources/images/tips_arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 3 additions & 8 deletions src/slic3r/GUI/ParamsPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void ParamsPanel::Highlighter::set_timer_owner(wxEvtHandler *owner, int timerid
m_timer.SetOwner(owner, timerid);
}

void ParamsPanel::Highlighter::init(std::pair<wxStaticBitmap *, bool *> params, wxWindow *parent)
void ParamsPanel::Highlighter::init(std::pair<wxWindow *, bool *> params, wxWindow *parent)
{
if (m_timer.IsRunning()) invalidate();
if (!params.first || !params.second) return;
Expand Down Expand Up @@ -185,7 +185,6 @@ void ParamsPanel::Highlighter::blink()
ParamsPanel::ParamsPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name )
: wxPanel( parent, id, pos, size, style, name )
{
init_bitmaps();
// BBS: new layout
SetBackgroundColour(*wxWHITE);
#if __WXOSX__
Expand Down Expand Up @@ -223,7 +222,7 @@ ParamsPanel::ParamsPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
m_mode_region->SetMaxSize({em_unit(this) * 12, -1});
m_mode_region->SetLabels(_L("Global"), _L("Objects"));
//m_mode_region->GetSize(&width, &height);
m_tips_arrow = new wxStaticBitmap(m_top_panel, wxID_ANY, m_tips_arrow_icon);
m_tips_arrow = new ScalableButton(m_top_panel, wxID_ANY, "tips_arrow");
m_tips_arrow->Hide();

m_title_view = new Label(m_top_panel, _L("Advance"));
Expand Down Expand Up @@ -348,11 +347,6 @@ ParamsPanel::ParamsPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
//m_import_from_file->Bind(wxEVT_BUTTON, [this](wxCommandEvent &) { wxGetApp().mainframe->load_config_file(); });
}

void ParamsPanel::init_bitmaps()
{
m_tips_arrow_icon = create_scaled_bitmap("tips_arrow", nullptr, 24);
}

void ParamsPanel::create_layout()
{
#ifdef __WINDOWS__
Expand Down Expand Up @@ -640,6 +634,7 @@ void ParamsPanel::msw_rescale()
if (m_setting_btn) m_setting_btn->msw_rescale();
if (m_search_btn) m_search_btn->msw_rescale();
if (m_compare_btn) m_compare_btn->msw_rescale();
if (m_tips_arrow) m_tips_arrow->msw_rescale();
m_left_sizer->SetMinSize(wxSize(40 * em_unit(this), -1));
if (m_mode_sizer)
m_mode_sizer->SetMinSize(-1, 3 * em_unit(this));
Expand Down
8 changes: 3 additions & 5 deletions src/slic3r/GUI/ParamsPanel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class ParamsPanel : public wxPanel
ScalableButton* m_process_icon{ nullptr };
wxStaticText* m_title_label { nullptr };
SwitchButton* m_mode_region { nullptr };
wxStaticBitmap* m_tips_arrow{ nullptr };
ScalableButton *m_tips_arrow{nullptr};
bool m_tips_arror_blink{false};
wxStaticText* m_title_view { nullptr };
SwitchButton* m_mode_view { nullptr };
Expand Down Expand Up @@ -116,7 +116,6 @@ class ParamsPanel : public wxPanel

wxBitmap m_toggle_on_icon;
wxBitmap m_toggle_off_icon;
wxBitmap m_tips_arrow_icon;

wxPanel* m_current_tab { nullptr };

Expand All @@ -125,12 +124,12 @@ class ParamsPanel : public wxPanel
struct Highlighter
{
void set_timer_owner(wxEvtHandler *owner, int timerid = wxID_ANY);
void init(std::pair<wxStaticBitmap *, bool *>, wxWindow *parent = nullptr);
void init(std::pair<wxWindow *, bool *>, wxWindow *parent = nullptr);
void blink();
void invalidate();

private:
wxStaticBitmap *m_bitmap { nullptr };
wxWindow * m_bitmap{nullptr};
bool * m_show_blink_ptr{nullptr};
int m_blink_counter{0};
wxTimer m_timer;
Expand All @@ -143,7 +142,6 @@ class ParamsPanel : public wxPanel
ParamsPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 1800,1080 ), long style = wxTAB_TRAVERSAL, const wxString& type = wxEmptyString );
~ParamsPanel();

void init_bitmaps();
void rebuild_panels();
void create_layout();
//clear the right page
Expand Down

0 comments on commit 3ee83cd

Please sign in to comment.