FIX: use StaticBox for background

Change-Id: I2bba259c53eaf987662a97dd93eac4fb8f73d47b
This commit is contained in:
chunmao.guo 2022-08-02 16:32:09 +08:00 committed by Lane.Wei
parent c4ec127b3a
commit a35ecc4fba
8 changed files with 54 additions and 154 deletions

View file

@ -2,21 +2,15 @@
#define slic3r_GUI_TextInput_hpp_
#include <wx/textctrl.h>
#include "../wxExtensions.hpp"
#include "StateHandler.hpp"
#include "StaticBox.hpp"
class TextInput : public wxNavigationEnabled<wxWindow>
class TextInput : public wxNavigationEnabled<StaticBox>
{
bool hover;
wxSize labelSize;
ScalableBitmap icon;
double radius;
StateHandler state_handler;
StateColor label_color;
StateColor text_color;
StateColor border_color;
StateColor background_color;
wxTextCtrl * text_ctrl;
static const int TextInputWidth = 200;
@ -48,14 +42,10 @@ public:
void SetIcon(const wxBitmap & icon);
void SetBorderColor(StateColor const & color);
void SetLabelColor(StateColor const &color);
void SetTextColor(StateColor const &color);
void SetBackgroundColor(StateColor const &color);
virtual void Rescale();
virtual bool Enable(bool enable = true) override;
@ -81,14 +71,6 @@ private:
void messureSize();
// some useful events
void mouseMoved(wxMouseEvent& event);
void mouseWheelMoved(wxMouseEvent& event);
void mouseEnterWindow(wxMouseEvent& event);
void mouseLeaveWindow(wxMouseEvent& event);
void keyPressed(wxKeyEvent& event);
void keyReleased(wxKeyEvent& event);
DECLARE_EVENT_TABLE()
};