mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 19:01:02 +00:00
Design: Measure-style dimension labels + restore English-only pin + UX consistency
Dimensions (uniform with Prepare/Preview):
- Repurpose DesignSketchTool::draw_text -> new draw_dim_label that renders each
sketch dimension as the exact Prepare "Measure" gizmo label: white ImGui text
in a translucent-white box, positioned via the existing world_to_screen_px
projection inside the active ImGui frame. All 29 label call sites convert with
no churn; the bespoke Hershey vector font is retired.
- dim_text appends mm/in on linear dims (angles keep the degree sign).
- Placed-dimension leaders simplified to a single point-to-point line + arrows in
a neutral colour (no extension lines), matching the Measure look.
i18n (Design tab pinned English, per the UX contract):
- Restore the lost "#undef _L / #define _L(s) wxString::FromUTF8(s)" override atop
DesignPanel.cpp so one lever de-translates the whole tab, ending the half-EN/IT
state. Wrap all ~54 dropdown options in _L so the single lever governs them.
- feature_type_name left untranslated (it feeds the MCP JSON, machine-facing).
UX consistency:
- Remove the per-card Confirm/Cancel buttons from the Value card; the single ribbon
action bar now owns value confirm/cancel via an m_value_cont guard in
tool_confirm/tool_cancel (one confirm surface, per contract).
- Unify the eight divergent "needs a body" status messages to one template.
Both forks; DesignSketchTool.{cpp,hpp} byte-identical across forks. Built clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVzKmX6Y1aEteit1HTXG4Q
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f341ee2677
commit
6e11cfc49b
@@ -570,6 +570,7 @@ private:
|
||||
double hw, const ColorRGBA& color);
|
||||
void draw_text(GLModel& model, const std::string& s, const Vec2d& center,
|
||||
double height, const ColorRGBA& color); // GL stroke font
|
||||
void draw_dim_label(const std::string& txt, const Vec2d& plane_center);
|
||||
|
||||
// Entity builders: append to m_entities (honoring the construction flag).
|
||||
void push_line(const Vec2d& a, const Vec2d& b);
|
||||
@@ -817,6 +818,7 @@ private:
|
||||
GLModel m_line_model;
|
||||
GLModel m_vertex_model;
|
||||
GLModel m_highlight_model;
|
||||
int m_dim_label_seq{0};
|
||||
GLModel m_fill_model; // translucent face fill for closed regions
|
||||
std::vector<DisplaySketch> m_display_sketches; // committed sketches drawn persistently
|
||||
int m_display_pick{-1}; // FEATURE index of the click-selected display sketch (-1 none)
|
||||
|
||||
Reference in New Issue
Block a user