FIX: [STUDIO-1752] remove background of tips_arrow

Change-Id: I5634e33ea320fc8e5fe9cc9d2b641e4598ce133d
This commit is contained in:
chunmao.guo 2023-01-05 15:29:15 +08:00 committed by Lane.Wei
parent 41d08e0924
commit 3ee83cd3db
3 changed files with 6 additions and 14 deletions

View File

@ -1,4 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="24" height="24" fill="#F4F4F4"/>
<path d="M2.28619 11.4674C1.8995 11.8617 1.90568 12.4949 2.29999 12.8816L8.72575 19.1831C9.12006 19.5698 9.7532 19.5636 10.1399 19.1693C10.5266 18.775 10.5204 18.1419 10.1261 17.7552L4.41431 12.1538L10.0157 6.44201C10.4024 6.04769 10.3962 5.41456 10.0019 5.02786C9.60758 4.64117 8.97445 4.64735 8.58775 5.04166L2.28619 11.4674ZM20.165 11L2.99041 11.1676L3.00992 13.1675L20.1846 13L20.165 11Z" fill="#00AE42"/> <path d="M2.28619 11.4674C1.8995 11.8617 1.90568 12.4949 2.29999 12.8816L8.72575 19.1831C9.12006 19.5698 9.7532 19.5636 10.1399 19.1693C10.5266 18.775 10.5204 18.1419 10.1261 17.7552L4.41431 12.1538L10.0157 6.44201C10.4024 6.04769 10.3962 5.41456 10.0019 5.02786C9.60758 4.64117 8.97445 4.64735 8.58775 5.04166L2.28619 11.4674ZM20.165 11L2.99041 11.1676L3.00992 13.1675L20.1846 13L20.165 11Z" fill="#00AE42"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 559 B

After

Width:  |  Height:  |  Size: 513 B

View File

@ -134,7 +134,7 @@ void ParamsPanel::Highlighter::set_timer_owner(wxEvtHandler *owner, int timerid
m_timer.SetOwner(owner, 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 (m_timer.IsRunning()) invalidate();
if (!params.first || !params.second) return; if (!params.first || !params.second) return;
@ -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 ) ParamsPanel::ParamsPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name )
: wxPanel( parent, id, pos, size, style, name ) : wxPanel( parent, id, pos, size, style, name )
{ {
init_bitmaps();
// BBS: new layout // BBS: new layout
SetBackgroundColour(*wxWHITE); SetBackgroundColour(*wxWHITE);
#if __WXOSX__ #if __WXOSX__
@ -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->SetMaxSize({em_unit(this) * 12, -1});
m_mode_region->SetLabels(_L("Global"), _L("Objects")); m_mode_region->SetLabels(_L("Global"), _L("Objects"));
//m_mode_region->GetSize(&width, &height); //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_tips_arrow->Hide();
m_title_view = new Label(m_top_panel, _L("Advance")); m_title_view = new Label(m_top_panel, _L("Advance"));
@ -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(); }); //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() void ParamsPanel::create_layout()
{ {
#ifdef __WINDOWS__ #ifdef __WINDOWS__
@ -640,6 +634,7 @@ void ParamsPanel::msw_rescale()
if (m_setting_btn) m_setting_btn->msw_rescale(); if (m_setting_btn) m_setting_btn->msw_rescale();
if (m_search_btn) m_search_btn->msw_rescale(); if (m_search_btn) m_search_btn->msw_rescale();
if (m_compare_btn) m_compare_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)); m_left_sizer->SetMinSize(wxSize(40 * em_unit(this), -1));
if (m_mode_sizer) if (m_mode_sizer)
m_mode_sizer->SetMinSize(-1, 3 * em_unit(this)); m_mode_sizer->SetMinSize(-1, 3 * em_unit(this));

View File

@ -82,7 +82,7 @@ class ParamsPanel : public wxPanel
ScalableButton* m_process_icon{ nullptr }; ScalableButton* m_process_icon{ nullptr };
wxStaticText* m_title_label { nullptr }; wxStaticText* m_title_label { nullptr };
SwitchButton* m_mode_region { nullptr }; SwitchButton* m_mode_region { nullptr };
wxStaticBitmap* m_tips_arrow{ nullptr }; ScalableButton *m_tips_arrow{nullptr};
bool m_tips_arror_blink{false}; bool m_tips_arror_blink{false};
wxStaticText* m_title_view { nullptr }; wxStaticText* m_title_view { nullptr };
SwitchButton* m_mode_view { nullptr }; SwitchButton* m_mode_view { nullptr };
@ -116,7 +116,6 @@ class ParamsPanel : public wxPanel
wxBitmap m_toggle_on_icon; wxBitmap m_toggle_on_icon;
wxBitmap m_toggle_off_icon; wxBitmap m_toggle_off_icon;
wxBitmap m_tips_arrow_icon;
wxPanel* m_current_tab { nullptr }; wxPanel* m_current_tab { nullptr };
@ -125,12 +124,12 @@ class ParamsPanel : public wxPanel
struct Highlighter struct Highlighter
{ {
void set_timer_owner(wxEvtHandler *owner, int timerid = wxID_ANY); 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 blink();
void invalidate(); void invalidate();
private: private:
wxStaticBitmap *m_bitmap { nullptr }; wxWindow * m_bitmap{nullptr};
bool * m_show_blink_ptr{nullptr}; bool * m_show_blink_ptr{nullptr};
int m_blink_counter{0}; int m_blink_counter{0};
wxTimer m_timer; wxTimer m_timer;
@ -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( 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(); ~ParamsPanel();
void init_bitmaps();
void rebuild_panels(); void rebuild_panels();
void create_layout(); void create_layout();
//clear the right page //clear the right page