ENH:fixed transparent controls that cannot be clicked
Change-Id: I36f34b73a5248299b1db20127b5cbd010592f62a
This commit is contained in:
parent
bba4b993f5
commit
27c8c81cc1
|
@ -0,0 +1,4 @@
|
|||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 2C14 0.89543 13.1046 0 12 0H2C0.89543 0 0 0.895431 0 2V12C0 13.1046 0.895431 14 2 14H12C13.1046 14 14 13.1046 14 12V2Z" fill="#FEFFFE"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.9992 12.0564V11.2002H11.1992V14H12C13.0857 14 13.9693 13.1349 13.9992 12.0564ZM8.40156 14V11.2002H5.60156V14H8.40156ZM2.8 14V11.2002H0V12C0 13.1046 0.895431 14 2 14H2.8ZM0 8.4001H2.8V5.6001H0V8.4001ZM0 2.8H2.8V0H2C0.89543 0 0 0.895431 0 2V2.8ZM5.60156 0V2.8H8.39844V5.5998H11.1984V2.7998H8.40156V0H5.60156ZM11.1992 0V2.8H13.9992V1.94356C13.9693 0.865088 13.0857 0 12 0H11.1992ZM2.80078 5.5998V2.7998H5.60078V5.5998H2.80078ZM11.1992 8.4001V5.6001H13.9992V8.4001H11.1992ZM2.80078 11.1999V8.3999H5.60078V11.1999H2.80078ZM5.60156 5.6001V8.4001H8.39844V11.1999H11.1984V8.3999H8.40156V5.6001H5.60156Z" fill="#D9D9D9"/>
|
||||
</svg>
|
After Width: | Height: | Size: 919 B |
|
@ -1168,6 +1168,14 @@ ColorPickerPopup::ColorPickerPopup(wxWindow* parent)
|
|||
m_ts_bitmap_custom = ScalableBitmap(this, "ts_custom_color_picker", 25);
|
||||
m_ts_stbitmap_custom = new wxStaticBitmap(m_custom_cp, wxID_ANY, m_ts_bitmap_custom.bmp());
|
||||
|
||||
m_ts_stbitmap_custom->Bind(wxEVT_LEFT_DOWN, &ColorPickerPopup::on_custom_clr_picker, this);
|
||||
m_ts_stbitmap_custom->Bind(wxEVT_ENTER_WINDOW, [this](auto& e) {
|
||||
SetCursor(wxCURSOR_HAND);
|
||||
});
|
||||
m_ts_stbitmap_custom->Bind(wxEVT_LEAVE_WINDOW, [this](auto& e) {
|
||||
SetCursor(wxCURSOR_ARROW);
|
||||
});
|
||||
|
||||
auto sizer_custom = new wxBoxSizer(wxVERTICAL);
|
||||
m_custom_cp->SetSizer(sizer_custom);
|
||||
sizer_custom->Add(m_ts_stbitmap_custom, 0, wxEXPAND, 0);
|
||||
|
|
|
@ -1341,6 +1341,7 @@ void AMSItem::Update(AMSinfo amsinfo)
|
|||
|
||||
void AMSItem::create(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size)
|
||||
{
|
||||
m_ts_bitmap_cube = new ScalableBitmap(this, "ts_bitmap_cube", 14);
|
||||
wxWindow::Create(parent, id, pos, size);
|
||||
SetBackgroundColour(AMS_CONTROL_WHITE_COLOUR);
|
||||
HideHumidity();
|
||||
|
@ -1461,7 +1462,13 @@ void AMSItem::doRender(wxDC &dc)
|
|||
dc.DrawRoundedRectangle(left - 1, (size.y - AMS_ITEM_CUBE_SIZE.y) / 2 - 1, AMS_ITEM_CUBE_SIZE.x + 2, AMS_ITEM_CUBE_SIZE.y + 2, 2);
|
||||
|
||||
}else {
|
||||
dc.DrawRoundedRectangle(left, (size.y - AMS_ITEM_CUBE_SIZE.y) / 2, AMS_ITEM_CUBE_SIZE.x, AMS_ITEM_CUBE_SIZE.y, 2);
|
||||
if (iter->material_colour.Alpha() == 0) {
|
||||
dc.DrawBitmap(m_ts_bitmap_cube->bmp(),left,(size.y - AMS_ITEM_CUBE_SIZE.y) / 2);
|
||||
}
|
||||
else {
|
||||
dc.DrawRoundedRectangle(left, (size.y - AMS_ITEM_CUBE_SIZE.y) / 2, AMS_ITEM_CUBE_SIZE.x, AMS_ITEM_CUBE_SIZE.y, 2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -416,6 +416,7 @@ protected:
|
|||
bool m_selected = {false};
|
||||
bool m_show_humidity = {false};
|
||||
int m_humidity = {0};
|
||||
ScalableBitmap* m_ts_bitmap_cube;
|
||||
|
||||
void paintEvent(wxPaintEvent &evt);
|
||||
void render(wxDC &dc);
|
||||
|
|
Loading…
Reference in New Issue