mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Merge branch 'main' into dev/p2s-pr
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
static const wxColour BgNormalColor = wxColour("#FFFFFF");
|
||||
static const wxColour BgSelectColor = wxColour("#EBF9F0");
|
||||
static const wxColour BgSelectColor = wxColour("#E5F0EE"); // ORCA
|
||||
|
||||
static const wxColour TextNormalColor = wxColour("#000000");
|
||||
static const wxColour TextSelectColor = wxColour("#009688");
|
||||
static const wxColour TextNormalColor = wxColour("#262E30");
|
||||
static const wxColour TextSelectColor = wxColour("#262E30"); // ORCA use same color on selected to improve readability
|
||||
|
||||
static const wxColour BorderNormalColor = wxColour("#CECECE");
|
||||
static const wxColour BorderSelectColor = wxColour("#009688");
|
||||
|
||||
@@ -49,11 +49,11 @@ static void set_prefered_map_mode(FilamentMapMode mode)
|
||||
|
||||
void FilamentGroupPopup::CreateBmps()
|
||||
{
|
||||
checked_bmp = create_scaled_bitmap("map_mode_on", nullptr, 16);;
|
||||
unchecked_bmp = create_scaled_bitmap("map_mode_off", nullptr, 16);
|
||||
disabled_bmp = create_scaled_bitmap("map_mode_disabled", nullptr, 16);
|
||||
checked_hover_bmp = create_scaled_bitmap("map_mode_on_hovered", nullptr, 16);
|
||||
unchecked_hover_bmp = create_scaled_bitmap("map_mode_off_hovered", nullptr, 16);
|
||||
checked_bmp = create_scaled_bitmap("radio_on", nullptr, 16);; // ORCA match icons
|
||||
unchecked_bmp = create_scaled_bitmap("radio_off", nullptr, 16);
|
||||
disabled_bmp = create_scaled_bitmap("radio_disabled", nullptr, 16);
|
||||
checked_hover_bmp = create_scaled_bitmap("radio_on_hover", nullptr, 16);
|
||||
unchecked_hover_bmp = create_scaled_bitmap("radio_off_hover", nullptr, 16);
|
||||
}
|
||||
|
||||
FilamentGroupPopup::FilamentGroupPopup(wxWindow *parent) : PopupWindow(parent, wxBORDER_NONE | wxPU_CONTAINS_CONTROLS)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "FilamentMapDialog.hpp"
|
||||
#include "PartPlate.hpp"
|
||||
#include "Widgets/Button.hpp"
|
||||
#include "Widgets/DialogButtons.hpp"
|
||||
#include "I18N.hpp"
|
||||
#include "GUI_App.hpp"
|
||||
#include "CapsuleButton.hpp"
|
||||
@@ -110,23 +111,6 @@ bool try_pop_up_before_slice(bool is_slice_all, Plater* plater_ref, PartPlate* p
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static const StateColor btn_bg_green(std::pair<wxColour, int>(wxColour(0, 137, 123), StateColor::Pressed),
|
||||
std::pair<wxColour, int>(wxColour(38, 166, 154), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal));
|
||||
|
||||
static const StateColor btn_bd_green(std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal));
|
||||
|
||||
static const StateColor btn_text_green(std::pair<wxColour, int>(wxColour(255, 255, 254), StateColor::Normal));
|
||||
|
||||
static const StateColor btn_bg_white(std::pair<wxColour, int>(wxColour(206, 206, 206), StateColor::Pressed),
|
||||
std::pair<wxColour, int>(wxColour(238, 238, 238), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(wxColour(255, 255, 255), StateColor::Normal));
|
||||
|
||||
static const StateColor btn_bd_white(std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Normal));
|
||||
|
||||
static const StateColor btn_text_white(std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Normal));
|
||||
|
||||
FilamentMapDialog::FilamentMapDialog(wxWindow *parent,
|
||||
const std::vector<std::string> &filament_color,
|
||||
const std::vector<std::string> &filament_type,
|
||||
@@ -213,25 +197,11 @@ FilamentMapDialog::FilamentMapDialog(wxWindow *parent,
|
||||
bottom_sizer->AddStretchSpacer();
|
||||
|
||||
{
|
||||
wxBoxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_ok_btn = new Button(bottom_panel, _L("OK"));
|
||||
m_cancel_btn = new Button(bottom_panel, _L("Cancel"));
|
||||
m_ok_btn->SetCornerRadius(FromDIP(12));
|
||||
m_cancel_btn->SetCornerRadius(FromDIP(12));
|
||||
m_ok_btn->SetFont(Label::Body_12);
|
||||
m_cancel_btn->SetFont(Label::Body_12);
|
||||
auto dlg_btns = new DialogButtons(bottom_panel, {"OK", "Cancel"});
|
||||
m_ok_btn = dlg_btns->GetOK();
|
||||
m_cancel_btn = dlg_btns->GetCANCEL();
|
||||
|
||||
m_ok_btn->SetBackgroundColor(btn_bg_green);
|
||||
m_ok_btn->SetBorderColor(btn_bd_green);
|
||||
m_ok_btn->SetTextColor(btn_text_green);
|
||||
m_cancel_btn->SetBackgroundColor(btn_bg_white);
|
||||
m_cancel_btn->SetBorderColor(btn_bd_white);
|
||||
m_cancel_btn->SetTextColor(btn_text_white);
|
||||
|
||||
button_sizer->Add(m_ok_btn, 1, wxRIGHT, FromDIP(4));
|
||||
button_sizer->Add(m_cancel_btn, 1, wxLEFT, FromDIP(4));
|
||||
|
||||
bottom_sizer->Add(button_sizer, 0, wxALIGN_CENTER | wxALL, FromDIP(15));
|
||||
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
}
|
||||
main_sizer->Add(bottom_panel, 0, wxEXPAND);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
static const wxColour BgNormalColor = wxColour("#FFFFFF");
|
||||
static const wxColour BgSelectColor = wxColour("#EBF9F0");
|
||||
static const wxColour BgSelectColor = wxColour("#E5F0EE"); // ORCA
|
||||
static const wxColour BgDisableColor = wxColour("#CECECE");
|
||||
|
||||
static const wxColour BorderNormalColor = wxColour("#CECECE");
|
||||
|
||||
@@ -4491,7 +4491,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
ImVec2 p1 = ImGui::GetCursorScreenPos();
|
||||
ImVec2 p2 = ImVec2(p1.x + ImGui::GetContentRegionAvail().x, p1.y);
|
||||
for (float i = p1.x; i < p2.x; i += (dash_length + gap_length)) {
|
||||
draw_list->AddLine(ImVec2(i, p1.y), ImVec2(i + dash_length, p1.y), IM_COL32(206, 206, 206, 255));
|
||||
draw_list->AddLine(ImVec2(i, p1.y), ImVec2(i + dash_length, p1.y), ImGui::GetColorU32(ImVec4(1.0f,1.0f,1.0f,0.6f))); // ORCA match color
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4558,8 +4558,8 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
tips_count = 5;
|
||||
|
||||
float AMS_container_height = ams_item_height + line_height * tips_count + line_height;
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(1.f, 1.f, 1.f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(.15f, .18f, .19f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0, 0, 0, 0)); // this shold be 0 since its child of gcodeviewer
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1, 1, 1, 1));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(window_padding * 3, 0));
|
||||
|
||||
// ImGui::Dummy({window_padding, window_padding});
|
||||
@@ -4570,7 +4570,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
float spacing = 18.0f * m_scale;
|
||||
|
||||
ImGui::Dummy({window_padding, window_padding});
|
||||
ImGui::PushStyleColor(ImGuiCol_Separator, ImVec4(.8f, .8f, .8f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Separator, ImVec4(1.0f,1.0f,1.0f,0.6f));
|
||||
imgui.bold_text(_u8L("Filament Grouping"));
|
||||
ImGui::SameLine();
|
||||
std::string tip_str = _u8L("Why this grouping");
|
||||
@@ -4580,12 +4580,12 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
ImGui::PopStyleColor();
|
||||
ImGui::Dummy({window_padding, window_padding});
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.00f, 0.00f, 0.00f, 0.1f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(1, 1, 1, 0.05f));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(window_padding * 2, window_padding));
|
||||
|
||||
ImDrawList *child_begin_draw_list = ImGui::GetWindowDrawList();
|
||||
ImVec2 cursor_pos = ImGui::GetCursorScreenPos();
|
||||
child_begin_draw_list->AddRectFilled(cursor_pos, ImVec2(cursor_pos.x + half_width, cursor_pos.y + line_height), IM_COL32(0, 0, 0, 20));
|
||||
child_begin_draw_list->AddRectFilled(cursor_pos, ImVec2(cursor_pos.x + half_width, cursor_pos.y + line_height), IM_COL32(255, 255, 255, 10));
|
||||
ImGui::BeginChild("#LeftAMS", ImVec2(half_width, ams_item_height), false, ImGuiWindowFlags_AlwaysUseWindowPadding);
|
||||
{
|
||||
imgui.text(_u8L("Left nozzle"));
|
||||
@@ -4600,7 +4600,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
}
|
||||
ImGui::SameLine();
|
||||
cursor_pos = ImGui::GetCursorScreenPos();
|
||||
child_begin_draw_list->AddRectFilled(cursor_pos, ImVec2(cursor_pos.x + half_width, cursor_pos.y + line_height), IM_COL32(0, 0, 0, 20));
|
||||
child_begin_draw_list->AddRectFilled(cursor_pos, ImVec2(cursor_pos.x + half_width, cursor_pos.y + line_height), IM_COL32(255, 255, 255, 10));
|
||||
ImGui::BeginChild("#RightAMS", ImVec2(half_width, ams_item_height), false, ImGuiWindowFlags_AlwaysUseWindowPadding);
|
||||
{
|
||||
imgui.text(_u8L("Right nozzle"));
|
||||
@@ -6075,7 +6075,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
append_option_item(item, offsets);
|
||||
}
|
||||
ImGui::Dummy({ window_padding, window_padding });
|
||||
if (m_nozzle_nums > 1)
|
||||
if (m_nozzle_nums > 1 && (m_view_type == EViewType::Summary || m_view_type == EViewType::ColorPrint)) // ORCA show only on summary and filament tab
|
||||
render_legend_color_arr_recommen(window_padding);
|
||||
|
||||
legend_height = ImGui::GetCurrentWindow()->Size.y;
|
||||
|
||||
Reference in New Issue
Block a user