mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Merge branch 'main' into libvgcode
This commit is contained in:
@@ -184,6 +184,7 @@ const ImVec4 ImGuiWrapper::COL_WINDOW_BG_DARK = { 45 / 255.f, 45 / 255.f, 49
|
||||
const ImVec4 ImGuiWrapper::COL_TOOLBAR_BG = { 250 / 255.f, 250 / 255.f, 250 / 255.f, 1.f }; // ORCA color matches with toolbar_background.png
|
||||
const ImVec4 ImGuiWrapper::COL_TOOLBAR_BG_DARK = { 57 / 255.f, 60 / 255.f, 66 / 255.f, 1.f }; // ORCA color matches with toolbar_background_dark.png
|
||||
const ImVec4 ImGuiWrapper::COL_ORCA = to_ImVec4(ColorRGBA::ORCA());
|
||||
const ImVec4 ImGuiWrapper::COL_MODIFIED = { 253.f / 255.f, 111.f / 255.f, 40.f / 255.f, 1}; // ORCA same color with m_color_label_modified
|
||||
|
||||
int ImGuiWrapper::TOOLBAR_WINDOW_FLAGS = ImGuiWindowFlags_AlwaysAutoResize
|
||||
| ImGuiWindowFlags_NoMove
|
||||
@@ -1114,11 +1115,12 @@ bool ImGuiWrapper::slider_float(const char* label, float* v, float v_min, float
|
||||
const ImGuiStyle& style = ImGui::GetStyle();
|
||||
if (show_edit_btn) {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, { 1, style.ItemSpacing.y });
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0); // ORCA match edit button style
|
||||
ImGui::SameLine();
|
||||
std::wstring btn_name = ImGui::SliderFloatEditBtnIcon + boost::nowide::widen(str_label);
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, { 0.25f, 0.25f, 0.25f, 0.0f });
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, { 0.5f, 0.5f, 0.5f, 1.0f });
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, { 0.5f, 0.5f, 0.5f, 1.0f });
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, {0, 0, 0, 0 }); // ORCA match edit button style
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, {0, 0, 0, 0 }); // ORCA match edit button style
|
||||
if (ImGui::Button(into_u8(btn_name).c_str())) {
|
||||
ImGui::SetKeyboardFocusHere(-1);
|
||||
this->set_requires_extra_frame();
|
||||
@@ -1127,7 +1129,7 @@ bool ImGuiWrapper::slider_float(const char* label, float* v, float v_min, float
|
||||
if (ImGui::IsItemHovered())
|
||||
this->tooltip(into_u8(_L("Edit")).c_str(), max_tooltip_width);
|
||||
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopStyleVar(2); // ORCA
|
||||
}
|
||||
|
||||
if (label_visible) {
|
||||
@@ -2688,18 +2690,22 @@ void ImGuiWrapper::pop_combo_style()
|
||||
ImGui::PopStyleColor(7);
|
||||
}
|
||||
|
||||
void ImGuiWrapper::push_radio_style()
|
||||
void ImGuiWrapper::push_radio_style(const float scale)
|
||||
{
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(1.5f, 1.5f) * scale); // ORCA ensure icon size stays consistent
|
||||
if (m_is_dark_mode) {
|
||||
ImGui::PushStyleColor(ImGuiCol_CheckMark, to_ImVec4(decode_color_to_float_array("#00675b"))); // ORCA use orca color for radio buttons
|
||||
ImGui::PushStyleColor(ImGuiCol_CheckMark, to_ImVec4(decode_color_to_float_array("#009688"))); // ORCA use orca color for radio buttons
|
||||
ImGui::PushStyleColor(ImGuiCol_Border , to_ImVec4(decode_color_to_float_array("#949494"))); // ORCA match border color
|
||||
} else {
|
||||
ImGui::PushStyleColor(ImGuiCol_CheckMark, to_ImVec4(decode_color_to_float_array("#009688"))); // ORCA use orca color for radio buttons
|
||||
ImGui::PushStyleColor(ImGuiCol_Border , to_ImVec4(decode_color_to_float_array("#7C8282"))); // ORCA match border color
|
||||
}
|
||||
}
|
||||
|
||||
void ImGuiWrapper::pop_radio_style()
|
||||
{
|
||||
ImGui::PopStyleColor(1);
|
||||
ImGui::PopStyleColor(2);
|
||||
ImGui::PopStyleVar(1);
|
||||
}
|
||||
|
||||
void ImGuiWrapper::init_font(bool compress)
|
||||
|
||||
Reference in New Issue
Block a user