ENH: update step mesh ui
jira:nojira Change-Id: I7ba88d1ad80fa1e8152393c523bc301187e543d1
This commit is contained in:
parent
4829d22f8c
commit
8dfd3bbb0c
|
@ -0,0 +1,5 @@
|
|||
<svg width="407" height="141" viewBox="0 0 407 141" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M29.635 14.6721L70.408 1.42417L111.181 14.6721L136.38 49.3557V92.2269L111.181 126.91L70.408 140.158L29.635 126.91L4.43594 92.2269V49.3557L29.635 14.6721Z" stroke="#262E30"/>
|
||||
<path d="M309.925 6.6897L336.476 1.40823L363.028 6.6897L385.538 21.7301L400.578 44.2396L405.859 70.7913L400.578 97.343L385.538 119.852L363.028 134.893L336.476 140.174L309.925 134.893L287.415 119.852L272.375 97.343L267.093 70.7913L272.375 44.2395L287.415 21.7301L309.925 6.6897Z" stroke="#262E30"/>
|
||||
<path d="M257.937 80.4962C258.328 80.1057 258.328 79.4725 257.937 79.082L251.573 72.718C251.183 72.3275 250.549 72.3275 250.159 72.718C249.768 73.1085 249.768 73.7417 250.159 74.1322L255.816 79.7891L250.159 85.4459C249.768 85.8364 249.768 86.4696 250.159 86.8601C250.549 87.2507 251.183 87.2507 251.573 86.8601L257.937 80.4962ZM152 80.7891L257.23 80.7891L257.23 78.7891L152 78.7891L152 80.7891Z" fill="#262E30"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1001 B |
|
@ -4,6 +4,7 @@
|
|||
#include <wx/event.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/dcmemory.h>
|
||||
#include "GUI_App.hpp"
|
||||
#include "I18N.hpp"
|
||||
#include "MainFrame.hpp"
|
||||
|
@ -29,6 +30,23 @@ static int _ITEM_WIDTH() { return _scale(30); }
|
|||
|
||||
wxDEFINE_EVENT(wxEVT_THREAD_DONE, wxCommandEvent);
|
||||
|
||||
class CenteredStaticText : public wxStaticText
|
||||
{
|
||||
public:
|
||||
CenteredStaticText(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& position, const wxSize& size = wxDefaultSize, long style = 0)
|
||||
: wxStaticText(parent, id, label, position, size, style) {
|
||||
CenterOnPosition(position);
|
||||
}
|
||||
|
||||
void CenterOnPosition(const wxPoint& position) {
|
||||
int textWidth, textHeight;
|
||||
GetTextExtent(GetLabel(), &textWidth, &textHeight);
|
||||
int x = position.x - textWidth / 2;
|
||||
int y = position.y - textHeight / 2;
|
||||
SetPosition(wxPoint(x, y));
|
||||
}
|
||||
};
|
||||
|
||||
void StepMeshDialog::on_dpi_changed(const wxRect& suggested_rect) {
|
||||
};
|
||||
|
||||
|
@ -67,6 +85,34 @@ StepMeshDialog::StepMeshDialog(wxWindow* parent, Slic3r::Step& file)
|
|||
wxBoxSizer* bSizer = new wxBoxSizer(wxVERTICAL);
|
||||
bSizer->SetMinSize(wxSize(MIN_DIALOG_WIDTH, -1));
|
||||
|
||||
auto image_bitmap = create_scaled_bitmap("step_mesh_info", this, FromDIP(120), false, std::string(), false, false, true);
|
||||
int image_width = image_bitmap.GetWidth();
|
||||
int image_height = image_bitmap.GetHeight();
|
||||
wxPanel* overlay_panel = new wxPanel(this, wxID_ANY, wxDefaultPosition, image_bitmap.GetSize(), wxTAB_TRAVERSAL);
|
||||
overlay_panel->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||
wxStaticBitmap *image = new wxStaticBitmap(overlay_panel, wxID_ANY, image_bitmap, wxDefaultPosition, wxDefaultSize, 0);
|
||||
|
||||
CenteredStaticText* text_1 = new CenteredStaticText (overlay_panel, wxID_ANY, _L("Rough"),
|
||||
wxPoint(overlay_panel->GetSize().GetWidth() / 6,
|
||||
overlay_panel->GetSize().GetHeight() / 2));
|
||||
CenteredStaticText* text_2 = new CenteredStaticText(overlay_panel, wxID_ANY, _L("Smooth"),
|
||||
wxPoint(overlay_panel->GetSize().GetWidth() * 5 / 6,
|
||||
overlay_panel->GetSize().GetHeight() / 2));
|
||||
CenteredStaticText* text_3 = new CenteredStaticText(overlay_panel, wxID_ANY, _L("Reduce Linear"),
|
||||
wxPoint(overlay_panel->GetSize().GetWidth() / 2,
|
||||
overlay_panel->GetSize().GetHeight() * 1.3 / 3));
|
||||
CenteredStaticText* text_4 = new CenteredStaticText(overlay_panel, wxID_ANY, _L("Reduce Angle"),
|
||||
wxPoint(overlay_panel->GetSize().GetWidth() / 2,
|
||||
overlay_panel->GetSize().GetHeight() * 2 / 3));
|
||||
CenteredStaticText* text_5 = new CenteredStaticText(overlay_panel, wxID_ANY, _L("Many faces"),
|
||||
wxPoint(overlay_panel->GetSize().GetWidth() / 6,
|
||||
overlay_panel->GetSize().GetHeight() * 2.8 / 3));
|
||||
CenteredStaticText* text_6 = new CenteredStaticText(overlay_panel, wxID_ANY, _L("Few faces"),
|
||||
wxPoint(overlay_panel->GetSize().GetWidth() * 5 / 6,
|
||||
overlay_panel->GetSize().GetHeight() * 2.8 / 3));
|
||||
|
||||
bSizer->Add(overlay_panel, 0, wxALIGN_CENTER | wxALL, 10);
|
||||
|
||||
wxBoxSizer* linear_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
//linear_sizer->SetMinSize(wxSize(MIN_DIALOG_WIDTH, -1));
|
||||
wxStaticText* linear_title = new wxStaticText(this,
|
||||
|
|
Loading…
Reference in New Issue