Compare commits

...

12 Commits

Author SHA1 Message Date
ExPikaPaka 14a2d98e31 Merge branch 'feature/wx-illustrated-tooltips' into feature/wizard-tooltips 2026-11-18 08:34:03 +01:00
ExPikaPaka 1a029c4022 Merge branch 'feature/wx-illustrated-tooltips' into feature/wizard-tooltips
# Conflicts:
#	src/slic3r/GUI/UnsavedChangesDialog.cpp
2026-11-17 07:52:36 +01:00
ExPikaPaka de14e377bf Merge branch 'feature/wx-illustrated-tooltips' into feature/wizard-tooltips 2026-11-17 07:07:41 +01:00
ExPikaPaka 845b227ace Merge branch 'feature/wx-illustrated-tooltips' into feature/wizard-tooltips 2026-11-17 06:55:57 +01:00
ExPikaPaka 26330f8eb7 Merge branch 'feature/wx-illustrated-tooltips' into feature/wizard-tooltips 2026-11-12 09:35:19 +01:00
ExPikaPaka 3dffc92a2a Merge branch 'feature/wx-illustrated-tooltips' into feature/wizard-tooltips 2026-11-12 08:37:04 +01:00
ExPikaPaka 8d518f0c11 Merge branch 'feature/wx-illustrated-tooltips' into feature/wizard-tooltips 2026-11-12 08:26:15 +01:00
ExPikaPaka d4cc473b66 Merge branch 'feature/wx-illustrated-tooltips' into feature/wizard-tooltips 2026-11-12 07:58:33 +01:00
ExPikaPaka 61d3ccb7df Include what the calibration tooltips use 2026-11-12 07:58:31 +01:00
ExPikaPaka 3487e07a96 Merge branch 'feature/wx-illustrated-tooltips' into feature/wizard-tooltips 2026-11-12 07:38:12 +01:00
ExPikaPaka 015893cd0a Move the remaining calibration tooltips to the illustrated popup
The printer state tips, the nozzle diameter and flow boxes, the wiki
button, and the printer calibration options, which only repeated their
labels. Vibration compensation shows a before and after picture.
2026-11-11 11:09:21 +01:00
ExPikaPaka a06c28ceed Explain the Calibration tab, the Project page and the Design tab
- Calibration tab: the Flow Dynamics and Flow ratio tabs, every action
  button with text per calibration, the preset and save pages' inputs
  and choices, and the history dialog. The manual and auto, coarse and
  fine choices show the existing photos of their test prints, and the
  method list shows each method's photo on hover.
- Project page: each folder's add button and the license list.
- Design tab: tools and inputs whose tooltips were missing or only
  repeated their name.
- Unsaved changes, save preset, object table and shortcut dialogs: the
  controls whose labels do not say it all.
2026-11-11 07:59:44 +01:00
16 changed files with 390 additions and 41 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+61
View File
@@ -0,0 +1,61 @@
"""The printer calibration dialog's tooltips (Calibration.cpp): what vibration compensation takes off a
print's walls."""
import numpy as np
from .render import * # noqa: F401,F403 - the scenes are written against the renderer's whole vocabulary
from .render import Camera, Overlay, render
OUT = "calibration" # resources/images/<OUT>
# --- vibration compensation ----------------------------------------------------------------------
#
# A box printed fast. Without the compensation, the head shakes after each corner and leaves ripples on
# the walls that die away along them (ringing); with it, the walls are flat. The ripples stay grey: their
# shading shows them, and a colour on them read as a painted stripe rather than as a shape.
_HALF = np.array([0.6, 0.45, 0.4])
_WAVE = 0.11 # ripple wavelength
_DECAY = 0.32 # how far along the wall the ripples last
_DEPTH = 0.03
def _ripples(s):
"""The ripple at a distance `s` along a wall from the corner the head came round."""
s = np.maximum(s, 0.0)
return _DEPTH * np.exp(-s / _DECAY) * np.sin(2.0 * np.pi * s / _WAVE)
def _box(p, ringing):
c = np.array([0.0, 0.0, _HALF[2]])
d = sd_box(p, c, _HALF, 0.015)
if ringing:
# Front wall (y = -half): ripples run along x from the left corner. Right wall (x = +half): along y
# from the front corner. Each fades out before the next wall, so the two do not meet at the corner.
front = np.clip(1.0 - np.abs(p[:, 1] + _HALF[1]) / 0.08, 0.0, 1.0) * (p[:, 0] < _HALF[0] - 0.05)
right = np.clip(1.0 - np.abs(p[:, 0] - _HALF[0]) / 0.08, 0.0, 1.0) * (p[:, 1] > -_HALF[1] + 0.05)
bump = front * _ripples(p[:, 0] + _HALF[0]) + right * _ripples(p[:, 1] + _HALF[1])
d = d - bump
return d, M_PART
def _vibration(ringing):
def scene(p):
return union(bed(p), _box(p, ringing))
cam = Camera(SIZE, target=(0.0, 0.0, 0.35), extent=2.1)
return Overlay(render(scene, cam, step=0.7, steps=220), cam).finish(SIZE)
def vibration_ringing(k, n):
return _vibration(True)
def vibration_clean(k, n):
return _vibration(False)
FRAMES = {
"vibration_ringing": 0,
"vibration_clean": 0,
}
+18
View File
@@ -24,6 +24,7 @@
#include "slic3r/GUI/Widgets/Button.hpp"
#include <wx/anybutton.h>
#include "slic3r/GUI/Tabbook.hpp"
#include "slic3r/GUI/IllustratedTipPopup.hpp"
#include <ctime>
#include <map>
#include "slic3r/GUI/Widgets/ComboBox.hpp"
@@ -666,6 +667,22 @@ AuFolderPanel::AuFolderPanel(wxWindow *parent, AuxiliaryFolderType type, wxWindo
m_button_add->SetFont(Label::Body_14);*/
m_big_button_add = new AuFile(m_scrolledWindow, fs::path(), "", AddFileButton, -1);
switch (m_type) {
case MODEL_PICTURE:
set_illustrated_tooltip(m_big_button_add, _L("Adds pictures of the model. They are saved in the project file, and the one set "
"as cover is shown for the project."));
break;
case BILL_OF_MATERIALS:
set_illustrated_tooltip(m_big_button_add, _L("Adds a list of the parts and materials the model needs, saved in the project file."));
break;
case ASSEMBLY_GUIDE:
set_illustrated_tooltip(m_big_button_add, _L("Adds instructions for putting the printed parts together, saved in the project file."));
break;
case OTHERS:
set_illustrated_tooltip(m_big_button_add, _L("Adds any other file to go with the model, saved in the project file."));
break;
default: break;
}
/*m_button_del = new Button(m_scrolledWindow, _L("Delete"), "auxiliary_delete_file", 12, 12);
m_button_del->SetBackgroundColor(btn_bg_white);
@@ -1147,6 +1164,7 @@ void AuxiliaryPanel::update_all_cover()
m_text_license->Wrap(-1);
m_sizer_license->Add(m_text_license, 0, wxALIGN_CENTER, 0);
m_combo_license = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(450), -1), 0, NULL, wxCB_READONLY);
set_illustrated_tooltip(m_combo_license, _L("The terms others may use and share the model under. It is saved with the project."));
m_sizer_license->Add(m_combo_license, 0, wxALIGN_CENTER, 0);
wxBoxSizer *m_sizer_description = new wxBoxSizer(wxHORIZONTAL);
+45 -8
View File
@@ -60,6 +60,7 @@
#include <wx/button.h>
#include <wx/spinbutt.h>
#include <wx/stattext.h>
#include "slic3r/GUI/IllustratedTipPopup.hpp"
#include <wx/checkbox.h>
#include <wx/checklst.h>
#include <wx/spinctrl.h>
@@ -263,7 +264,7 @@ static ::Button* sidebar_icon_btn(wxWindow* parent, const char* icon, const wxSt
b->SetCanFocus(false);
b->SetIconSpacing(0); // off macOS an empty label still reserves the icon-text gap
b->SetBorderColor(StateColor());
b->SetToolTip(tip);
set_illustrated_tooltip(b, tip);
style_sidebar_icon_btn(b);
return b;
}
@@ -307,6 +308,13 @@ static wxString sketch_plane_prompt()
return _L("Click a reference plane or a flat face to sketch on it — Esc cancels");
}
// The Result list of Extrude, Revolve and Sweep.
static wxString design_result_tip()
{
return _L("What the new shape does: becomes a body of its own, joins the body it touches, is cut out of it, "
"or keeps only where the two overlap.");
}
// Prepare outlines every numeric field (rounded, #4A4A51 on dark). wxSpinCtrlDouble is a
// native GTK control that cannot draw that, and Orca's own SpinInput is int-only — it would
// silently truncate a 2.5 mm radius. So the double spin keeps its arrows and validation and
@@ -1602,7 +1610,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
wxDefaultPosition, wxBU_EXACTFIT | wxBORDER_NONE, false, icon_px);
if (has_dark_twin)
m_icon_refresh.push_back([b, themed] { b->SetBitmap_(themed()); });
b->SetToolTip(tip);
set_illustrated_tooltip(b, tip);
b->SetBackgroundColour(dp_ribbon_bg());
b->Bind(wxEVT_ENTER_WINDOW, [b](wxMouseEvent& e) {
if (b->IsEnabled()) { b->SetBackgroundColour(dp_ribbon_hover()); b->Refresh(); } e.Skip(); });
@@ -1888,14 +1896,19 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_extrude_end->SetSelection(0);
eform->Add(new wxStaticText(m_cards, wxID_ANY, _L("End")), 0, wxALIGN_CENTER_VERTICAL);
eform->Add(m_extrude_end, 0, wxEXPAND);
set_illustrated_tooltip(m_extrude_end, _L("Where the extrusion stops: at the distance given, half of it to each side, a "
"different distance to each side, through every body, or at the face or vertex picked."));
m_distance2 = make_spin(m_cards, 5, 0.0, 100000.0); // second-side depth (Two-sided)
eform->Add(new wxStaticText(m_cards, wxID_ANY, _L("2nd dist")), 0, wxALIGN_CENTER_VERTICAL);
eform->Add(spin_frame(m_distance2), 0, wxEXPAND);
set_illustrated_tooltip(spin_frame(m_distance2), _L("How far the extrusion goes to the other side, for Two-sided."));
m_taper = make_spin(m_cards, 0.0, -89.0, 89.0); // draft angle (deg)
eform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Taper (°)")), 0, wxALIGN_CENTER_VERTICAL);
eform->Add(spin_frame(m_taper), 0, wxEXPAND);
set_illustrated_tooltip(spin_frame(m_taper), _L("Slopes the sides of the extrusion by this angle, as a draft, so its far end is "
"larger or smaller than the sketch. 0 keeps them straight."));
m_mode = make_combo(m_cards);
// Order is load-bearing: index maps to BooleanMode (New=0, Add=1, Cut=2, Intersect=3).
@@ -1907,6 +1920,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_mode->SetSelection(0);
eform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Result")), 0, wxALIGN_CENTER_VERTICAL);
eform->Add(m_mode, 0, wxEXPAND);
set_illustrated_tooltip(m_mode, design_result_tip());
m_flip = new CheckBox(m_cards);
eform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Flip direction")), 0, wxALIGN_CENTER_VERTICAL);
@@ -1944,10 +1958,13 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_face_group->SetSelection(3);
dform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Edges")), 0, wxALIGN_CENTER_VERTICAL);
dform->Add(m_face_group, 0, wxEXPAND);
set_illustrated_tooltip(m_face_group, _L("The edges rounded or bevelled when no edge is picked in the view: those of the top or "
"bottom faces, the side edges, or all of them."));
m_dressup_size = make_spin(m_cards, 2.0);
dform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Size (r/dist)")), 0, wxALIGN_CENTER_VERTICAL);
dform->Add(spin_frame(m_dressup_size), 0, wxEXPAND);
set_illustrated_tooltip(spin_frame(m_dressup_size), _L("The radius of a fillet, or the distance a chamfer cuts back from the edge."));
m_box_dressup = new wxBoxSizer(wxVERTICAL);
m_box_dressup->Add(card_header(m_cards, "design_dressup", _L("Fillet / Chamfer"), m_hdr_dressup), 0, wxLEFT | wxRIGHT | wxTOP, 12);
@@ -1997,6 +2014,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_hole_through->SetValue(true);
hform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Through")), 0, wxALIGN_CENTER_VERTICAL);
hform->Add(m_hole_through, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
set_illustrated_tooltip(m_hole_through, _L("Cuts the hole through the whole body, ignoring Depth."));
m_hole_target_label = new wxStaticText(m_cards, wxID_ANY, _L("(none — uses Hole plane)"));
hform->Add(new wxStaticText(m_cards, wxID_ANY, _L("On face")), 0, wxALIGN_CENTER_VERTICAL);
@@ -2029,6 +2047,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_thread_std->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent&) { apply_thread_standard(); });
tform->Add(new wxStaticText(m_cards, wxID_ANY, _L_CONTEXT("Standard", "Thread standard")), 0, wxALIGN_CENTER_VERTICAL);
tform->Add(m_thread_std, 0, wxEXPAND);
set_illustrated_tooltip(m_thread_std, _L("A standard thread size fills in the diameter, pitch and depth. Custom leaves them to you."));
// Threads are specified by DIAMETER (M6 = Ø6); the value is derived from the picked cylindrical
// surface / circular edge, so it's a readout users rarely type. Stored field holds the diameter.
@@ -2039,6 +2058,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_thread_pitch = make_spin(m_cards, 2.0);
tform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Pitch")), 0, wxALIGN_CENTER_VERTICAL);
tform->Add(spin_frame(m_thread_pitch), 0, wxEXPAND);
set_illustrated_tooltip(spin_frame(m_thread_pitch), _L("The distance from one turn of the thread to the next."));
m_thread_height = make_spin(m_cards, 10.0);
tform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Length")), 0, wxALIGN_CENTER_VERTICAL);
@@ -2047,6 +2067,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_thread_depth = make_spin(m_cards, 1.0);
tform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Thread depth")), 0, wxALIGN_CENTER_VERTICAL);
tform->Add(spin_frame(m_thread_depth), 0, wxEXPAND);
set_illustrated_tooltip(spin_frame(m_thread_depth), _L("How deep the groove of the thread is cut."));
m_thread_x = make_spin(m_cards, 0.0, -1000.0, 1000.0);
tform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Pos X")), 0, wxALIGN_CENTER_VERTICAL);
@@ -2067,6 +2088,8 @@ DesignPanel::DesignPanel(wxWindow* parent)
});
tform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Internal")), 0, wxALIGN_CENTER_VERTICAL);
tform->Add(m_thread_internal, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
set_illustrated_tooltip(m_thread_internal, _L("A thread inside a hole, for a bolt to screw into, instead of one on the outside of a rod. "
"It changes the depth that goes with a standard size."));
m_thread_target_label = new wxStaticText(m_cards, wxID_ANY, _L("(none — uses Thread plane)"));
tform->Add(new wxStaticText(m_cards, wxID_ANY, _L("On face")), 0, wxALIGN_CENTER_VERTICAL);
@@ -2106,6 +2129,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_revolve_mode->SetSelection(0);
rform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Result")), 0, wxALIGN_CENTER_VERTICAL);
rform->Add(m_revolve_mode, 0, wxEXPAND);
set_illustrated_tooltip(m_revolve_mode, design_result_tip());
m_revolve_flip = new CheckBox(m_cards);
rform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Flip direction")), 0, wxALIGN_CENTER_VERTICAL);
@@ -2136,6 +2160,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_sweep_mode->SetSelection(0);
sform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Result")), 0, wxALIGN_CENTER_VERTICAL);
sform->Add(m_sweep_mode, 0, wxEXPAND);
set_illustrated_tooltip(m_sweep_mode, design_result_tip());
m_box_sweep->Add(sform, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 12);
}
@@ -2162,6 +2187,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_pattern_spacing = make_spin(m_cards, 20.0, 0.01, 100000.0);
pform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Spacing")), 0, wxALIGN_CENTER_VERTICAL);
pform->Add(spin_frame(m_pattern_spacing), 0, wxEXPAND);
set_illustrated_tooltip(spin_frame(m_pattern_spacing), _L("The distance from one copy to the next, for a Linear pattern."));
m_pattern_dir = make_combo(m_cards);
m_pattern_dir->Append(_L("Plane X"));
@@ -2173,6 +2199,8 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_pattern_angle = make_spin(m_cards, 360.0, 1.0, 360.0);
pform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Total angle (°)")), 0, wxALIGN_CENTER_VERTICAL);
pform->Add(spin_frame(m_pattern_angle), 0, wxEXPAND);
set_illustrated_tooltip(spin_frame(m_pattern_angle), _L("The angle the copies of a Circular pattern are spread over. 360 spaces them evenly "
"around a full circle."));
m_box_pattern->Add(pform, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 12);
}
@@ -2198,11 +2226,14 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_bool_target->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent&) { refresh_preview(); });
bform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Target (kept)")), 0, wxALIGN_CENTER_VERTICAL);
bform->Add(m_bool_target, 0, wxEXPAND);
set_illustrated_tooltip(m_bool_target, _L("The body that is changed and kept."));
m_bool_tool = make_combo(m_cards);
m_bool_tool->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent&) { refresh_preview(); });
bform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Tool")), 0, wxALIGN_CENTER_VERTICAL);
bform->Add(m_bool_tool, 0, wxEXPAND);
set_illustrated_tooltip(m_bool_tool, _L("The body that is joined to the target, cut from it or intersected with it. It is "
"used up unless Keep tool body is on."));
// Fuzzy tolerance (mm): the main use is a tool body cutting a destination — a small
// tolerance lets near-coincident mating faces resolve into a clean cut instead of a
@@ -2211,6 +2242,8 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_bool_tol->Bind(wxEVT_SPINCTRLDOUBLE, [this](wxSpinDoubleEvent&) { refresh_preview(); });
bform->Add(new wxStaticText(m_cards, wxID_ANY, _L("Tolerance")), 0, wxALIGN_CENTER_VERTICAL);
bform->Add(spin_frame(m_bool_tol), 0, wxEXPAND);
set_illustrated_tooltip(spin_frame(m_bool_tol), _L("Treats faces closer than this as touching, so bodies that almost meet combine "
"cleanly instead of failing or leaving slivers. 0 is exact."));
m_box_boolean->Add(bform, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 12);
@@ -2220,6 +2253,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
keeprow->Add(new wxStaticText(m_cards, wxID_ANY, _L("Keep tool body")), 0, wxALIGN_CENTER_VERTICAL);
keeprow->AddStretchSpacer();
keeprow->Add(m_bool_keep, 0, wxALIGN_CENTER_VERTICAL);
set_illustrated_tooltip(m_bool_keep, _L("Keeps the tool body as a body of its own after the operation."));
m_box_boolean->Add(keeprow, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 12);
}
cards->Add(m_box_boolean, 0, wxEXPAND);
@@ -3303,9 +3337,11 @@ DesignPanel::DesignPanel(wxWindow* parent)
// selected, answering a feature row with an instruction about bodies. It lives where a
// body lives: on each body's row in the Bodies list, and in the offer for a selected body.
// Scaling imported artwork, which shared this button, moved to the row's own menu.
auto* up = sidebar_icon_btn(m_tree_box, "design_moveup", _L("Move up"));
auto* up = sidebar_icon_btn(m_tree_box, "design_moveup",
_L("Moves the selected feature one step earlier in the history. The features after it are rebuilt."));
up->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { on_move_feature(-1); });
auto* down = sidebar_icon_btn(m_tree_box, "design_movedown", _L("Move down"));
auto* down = sidebar_icon_btn(m_tree_box, "design_movedown",
_L("Moves the selected feature one step later in the history. The features after it are rebuilt."));
down->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { on_move_feature(+1); });
m_btn_interfere = sidebar_icon_btn(m_tree_box, "color_palette", _L("Check interference — find overlapping bodies"));
m_btn_interfere->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { on_check_interference(); });
@@ -3341,7 +3377,7 @@ DesignPanel::DesignPanel(wxWindow* parent)
// and a user working in the body list should not have to leave it to find this.
auto* bbool = sidebar_icon_btn(m_parts_box, "design_boolean", _L("Boolean — join, subtract or intersect with another body"));
bbool->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { on_boolean_tool(); });
auto* bcol = sidebar_icon_btn(m_parts_box, "color_palette", _L("Color"));
auto* bcol = sidebar_icon_btn(m_parts_box, "color_palette", _L("Sets the colour the selected body is shown in."));
bcol->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { on_set_body_color(); });
const int bgap = FromDIP(SidebarProps::ElementSpacing());
m_parts_hdr->AddStretchSpacer(1);
@@ -3434,7 +3470,8 @@ DesignPanel::DesignPanel(wxWindow* parent)
wxALIGN_CENTER_VERTICAL);
var_hdr->AddStretchSpacer();
// Icon actions in the card header, as the Feature tree and Bodies cards have them.
m_btn_add_var = sidebar_icon_btn(m_var_box, "add", _L("Add variable"));
m_btn_add_var = sidebar_icon_btn(m_var_box, "add",
_L("Adds a named value. A dimension that uses its name follows it when it changes."));
m_btn_edit_var = sidebar_icon_btn(m_var_box, "design_edit", _L("Edit variable"));
m_btn_del_var = sidebar_icon_btn(m_var_box, "design_delete", _L("Delete variable"));
m_btn_add_var->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { on_add_variable(); });
@@ -10302,8 +10339,8 @@ void DesignPanel::set_commit_mode(CommitMode mode)
const bool bodies = mode == CommitMode::Bodies;
if (m_commit_btn) {
m_commit_btn->SetBitmap_(commit_icon(bodies));
m_commit_btn->SetToolTip(bodies ? _L("Commit to Plate (as bodies) — send each body to Prepare as its own object")
: _L("Commit to Plate — send the solid to Prepare"));
set_illustrated_tooltip(m_commit_btn, bodies ? _L("Commit to Plate (as bodies) — send each body to Prepare as its own object")
: _L("Commit to Plate — send the solid to Prepare"));
}
if (m_commit_drop)
m_commit_drop->SetSelection(int(mode)); // the check on the current row
+24 -1
View File
@@ -6,6 +6,7 @@
#include "GUI_App.hpp"
#include "format.hpp"
#include "MsgDialog.hpp"
#include "IllustratedTipPopup.hpp"
#include "slic3r/Utils/CalibUtils.hpp"
#include "Widgets/DialogButtons.hpp"
#include "libslic3r/Config.hpp"
@@ -137,6 +138,17 @@ static wxString get_preset_name_by_filament_id(std::string filament_id)
return preset_name;
}
// The name and the factor of a result, in the dialogs that edit and add one.
static wxString history_name_tip()
{
return _L("The name the result is listed under on the printer. Adding the brand, type and condition of the filament keeps results apart.");
}
static wxString history_k_tip()
{
return _L("The Flow Dynamics factor (pressure advance) of the filament with this nozzle.");
}
HistoryWindow::HistoryWindow(wxWindow* parent, const std::vector<PACalibResult>& calib_results_history, bool& show)
: DPIDialog(parent, wxID_ANY, _L("Flow Dynamics Calibration Result"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
, m_calib_results_history(calib_results_history)
@@ -158,6 +170,8 @@ HistoryWindow::HistoryWindow(wxWindow* parent, const std::vector<PACalibResult>&
Button * mew_btn = new Button(scroll_window, _L("New"));
mew_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Window);
mew_btn->Bind(wxEVT_BUTTON, &HistoryWindow::on_click_new_button, this);
set_illustrated_tooltip(mew_btn, _L("Adds a result by hand, for a filament whose Flow Dynamics factor you already know, without "
"printing a test."));
scroll_sizer->Add(mew_btn, 0, wxLEFT, FromDIP(20));
scroll_sizer->AddSpacer(FromDIP(15));
@@ -168,6 +182,7 @@ HistoryWindow::HistoryWindow(wxWindow* parent, const std::vector<PACalibResult>&
m_extruder_switch_btn->SetMaxSize(wxSize(FromDIP(120), FromDIP(24)));
m_extruder_switch_btn->SetLabels(_L("Left Nozzle"), _L("Right Nozzle"));
m_extruder_switch_btn->Bind(wxEVT_TOGGLEBUTTON, &HistoryWindow::on_switch_extruder, this);
set_illustrated_tooltip(m_extruder_switch_btn, _L("Which nozzle's results are listed. Each nozzle keeps its own."));
m_extruder_switch_btn->SetValue(false);
scroll_sizer->Add(m_extruder_switch_btn, 0, wxCENTER | wxALL, FromDIP(10));
scroll_sizer->AddSpacer(10);
@@ -184,6 +199,8 @@ HistoryWindow::HistoryWindow(wxWindow* parent, const std::vector<PACalibResult>&
comboBox_sizer->AddSpacer(10);
m_comboBox_nozzle_dia = new ComboBox(comboBox_panel, wxID_ANY, "", wxDefaultPosition, wxSize(-1, FromDIP(24)), 0, nullptr, wxCB_READONLY);
set_illustrated_tooltip(m_comboBox_nozzle_dia, _L("Lists the results stored for this nozzle size. A result applies only to the "
"nozzle size it was made with."));
comboBox_sizer->Add(m_comboBox_nozzle_dia, 0, wxLEFT | wxEXPAND | wxRIGHT, FromDIP(15));
comboBox_sizer->AddSpacer(10);
@@ -405,7 +422,7 @@ void HistoryWindow::sync_history_data() {
nozzle_id_name->SetFont(Label::Head_14);
{
wxString chd_ext_name = _L(DevPrinterConfigUtil::get_toolhead_display_name(curr_obj->printer_type, MAIN_EXTRUDER_ID, ToolHeadComponent::Extruder, ToolHeadNameCase::LowerCase));
nozzle_id_name->SetToolTip(wxString::Format(_L("Note: The hotend number on the %s is tied to the holder. When the hotend is moved to a new holder, its number will update automatically."), chd_ext_name));
set_illustrated_tooltip(nozzle_id_name, wxString::Format(_L("Note: The hotend number on the %s is tied to the holder. When the hotend is moved to a new holder, its number will update automatically."), chd_ext_name));
}
gbSizer->Add(nozzle_id_name, {0, column_idx++}, {1, 1}, wxBOTTOM, FromDIP(15));
}
@@ -448,6 +465,7 @@ void HistoryWindow::sync_history_data() {
n_value->Hide();
auto delete_button = new Button(m_history_data_panel, _L("Delete"));
delete_button->SetStyle(ButtonStyle::Alert, ButtonType::Window);
set_illustrated_tooltip(delete_button, _L("Deletes this result from the printer at once, without asking."));
delete_button->Bind(wxEVT_BUTTON, [this, gbSizer, i, &result, column_count](auto& e) {
if (m_ui_op_lock) {
return;
@@ -474,6 +492,7 @@ void HistoryWindow::sync_history_data() {
auto edit_button = new Button(m_history_data_panel, _L("Edit"));
edit_button->SetStyle(ButtonStyle::Confirm, ButtonType::Window);
set_illustrated_tooltip(edit_button, _L("Changes the name or the factor of this result on the printer."));
edit_button->Bind(wxEVT_BUTTON, [this, result, k_value, name_value](auto& e) {
if (m_ui_op_lock) return;
@@ -593,6 +612,7 @@ EditCalibrationHistoryDialog::EditCalibrationHistoryDialog(wxWindow
Label* name_title = new Label(top_panel, _L("Name"));
m_name_value = new TextInput(top_panel, from_u8(m_new_result.name), "", "", wxDefaultPosition, EDIT_HISTORY_DIALOG_INPUT_SIZE, wxTE_PROCESS_ENTER);
set_illustrated_tooltip(m_name_value, history_name_tip());
flex_sizer->Add(name_title);
flex_sizer->Add(m_name_value);
@@ -642,6 +662,7 @@ EditCalibrationHistoryDialog::EditCalibrationHistoryDialog(wxWindow
Label* k_title = new Label(top_panel, _L("Factor K"));
auto k_str = wxString::Format("%.3f", m_new_result.k_value);
m_k_value = new TextInput(top_panel, k_str, "", "", wxDefaultPosition, EDIT_HISTORY_DIALOG_INPUT_SIZE, wxTE_PROCESS_ENTER);
set_illustrated_tooltip(m_k_value, history_k_tip());
flex_sizer->Add(k_title);
flex_sizer->Add(m_k_value);
@@ -791,6 +812,7 @@ NewCalibrationHistoryDialog::NewCalibrationHistoryDialog(wxWindow *parent, const
Label *name_title = new Label(top_panel, _L("Name"));
m_name_value = new TextInput(top_panel, "", "", "", wxDefaultPosition, NEW_HISTORY_DIALOG_INPUT_SIZE, wxTE_PROCESS_ENTER);
set_illustrated_tooltip(m_name_value, history_name_tip());
// Name
flex_sizer->Add(name_title);
@@ -879,6 +901,7 @@ NewCalibrationHistoryDialog::NewCalibrationHistoryDialog(wxWindow *parent, const
Label *k_title = new Label(top_panel, _L("Factor K"));
auto k_str = wxString::Format("%.3f", m_new_result.k_value);
m_k_value = new TextInput(top_panel, k_str, "", "", wxDefaultPosition, NEW_HISTORY_DIALOG_INPUT_SIZE, wxTE_PROCESS_ENTER);
set_illustrated_tooltip(m_k_value, history_k_tip());
// Factor K
flex_sizer->Add(k_title);
+21 -10
View File
@@ -1,4 +1,5 @@
#include "Calibration.hpp"
#include "IllustratedTipPopup.hpp"
#include "I18N.hpp"
#include "libslic3r/Utils.hpp"
@@ -29,6 +30,7 @@
#include <wx/stattext.h>
#include "slic3r/GUI/DeviceManager.hpp"
#include <boost/log/trivial.hpp>
#include <vector>
static wxColour FG_COLOR = wxColour(0x32, 0x3A, 0x3D);
static wxColour BG_COLOR = wxColour(0xF8, 0xF8, 0xF8);
@@ -67,13 +69,21 @@ CalibrationDialog::CalibrationDialog(Plater *plater)
cali_step_select_title->SetBackgroundColour(BG_COLOR);
cali_left_sizer->Add(cali_step_select_title, 0, wxLEFT, FromDIP(15));
select_xcam_cali = create_check_option(_L("Micro lidar calibration"), cali_left_panel, _L("Micro lidar calibration"), "xcam_cali");
select_bed_leveling = create_check_option(_L("Bed leveling"), cali_left_panel, _L("Bed leveling"), "bed_leveling");
select_vibration = create_check_option(_L("Vibration compensation"), cali_left_panel, _L("Vibration compensation"), "vibration");
select_motor_noise = create_check_option(_L("Motor noise cancellation"), cali_left_panel, _L("Motor noise cancellation"), "motor_noise");
select_nozzle_cali = create_check_option(_L("Nozzle offset calibration"), cali_left_panel, _L("Nozzle offset calibration"), "nozzle_cali");
select_heatbed_cali = create_check_option(_L("High-temperature Heatbed Calibration"), cali_left_panel, _L("High-temperature Heatbed Calibration"), "bed_cali");
select_clumppos_cali = create_check_option(_L("Nozzle clumping detection Calibration"), cali_left_panel, _L("Nozzle clumping detection Calibration"), "clump_pos_cali");
select_xcam_cali = create_check_option(_L("Micro lidar calibration"), cali_left_panel,
_L("Calibrates the micro lidar on the toolhead, which the printer uses to inspect the first layer."), "xcam_cali");
select_bed_leveling = create_check_option(_L("Bed leveling"), cali_left_panel,
_L("Probes the heatbed at a grid of points and stores its shape, so that the first layer is laid at an even height."), "bed_leveling");
select_vibration = create_check_option(_L("Vibration compensation"), cali_left_panel,
_L("Measures how the printer resonates on each axis, so that it can cancel those vibrations and print fast without ripples on the walls."), "vibration",
{{"calibration/vibration_ringing.png", _L("Before")}, {"calibration/vibration_clean.png", _L("After")}});
select_motor_noise = create_check_option(_L("Motor noise cancellation"), cali_left_panel,
_L("Measures the motors, so that the printer can drive them more quietly."), "motor_noise");
select_nozzle_cali = create_check_option(_L("Nozzle offset calibration"), cali_left_panel,
_L("Measures how far apart the two nozzles are, so that what each of them prints lines up."), "nozzle_cali");
select_heatbed_cali = create_check_option(_L("High-temperature Heatbed Calibration"), cali_left_panel,
_L("Calibrates the heatbed at a high temperature, for filaments that are printed on a hot bed."), "bed_cali");
select_clumppos_cali = create_check_option(_L("Nozzle clumping detection Calibration"), cali_left_panel,
_L("Calibrates the detection of filament clumping around the nozzle, so that the printer notices it during a print."), "clump_pos_cali");
// STUDIO-10091 the default not checked option
if(m_checkbox_list.count("bed_cali") != 0)
@@ -190,7 +200,8 @@ CalibrationDialog::~CalibrationDialog() {}
void CalibrationDialog::on_dpi_changed(const wxRect &suggested_rect) {}
wxWindow* CalibrationDialog::create_check_option(wxString title, wxWindow* parent, wxString tooltip, std::string param)
wxWindow* CalibrationDialog::create_check_option(wxString title, wxWindow* parent, wxString tooltip, std::string param,
const std::vector<TipMedia> &media)
{
auto checkbox = new wxWindow(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
checkbox->SetBackgroundColour(BG_COLOR);
@@ -215,8 +226,8 @@ wxWindow* CalibrationDialog::create_check_option(wxString title, wxWindow* paren
checkbox->Layout();
sizer_checkbox->Fit(checkbox);
checkbox->SetToolTip(tooltip);
text->SetToolTip(tooltip);
set_illustrated_tooltip(checkbox, tooltip, media);
set_illustrated_tooltip(text, tooltip, media);
text->Bind(wxEVT_LEFT_DOWN, [check](wxMouseEvent&) { check->SetValue(check->GetValue() ? false : true); });
m_checkbox_list[param] = check;
+3 -1
View File
@@ -26,6 +26,7 @@
#include <wx/wrapsizer.h>
#include "GUI_Utils.hpp"
#include "IllustratedTipPopup.hpp"
#include "wxExtensions.hpp"
#include "DeviceManager.hpp"
#include "Plater.hpp"
@@ -48,7 +49,8 @@ private:
wxWindow* select_nozzle_cali{ nullptr };
wxWindow* select_heatbed_cali{ nullptr };
wxWindow* select_clumppos_cali{ nullptr };
wxWindow* create_check_option(wxString title, wxWindow *parent, wxString tooltip, std::string param);
wxWindow* create_check_option(wxString title, wxWindow *parent, wxString tooltip, std::string param,
const std::vector<TipMedia> &media = {});
public:
CalibrationDialog(Plater *plater = nullptr);
+26 -4
View File
@@ -13,7 +13,10 @@
#include "slic3r/GUI/Widgets/SideTools.hpp"
#include <cstddef>
#include "slic3r/GUI/Tabbook.hpp"
#include "slic3r/GUI/TabButton.hpp"
#include "slic3r/GUI/IllustratedTipPopup.hpp"
#include <wx/colour.h>
#include <wx/window.h>
#include "slic3r/GUI/CalibrationWizard.hpp"
#include "slic3r/GUI/CalibrationWizardPage.hpp"
#include "slic3r/GUI/CalibrationWizardPresetPage.hpp"
@@ -403,7 +406,7 @@ void SelectMObjectPopup::update_user_devices()
else {
if (mobj->has_access_right() && mobj->is_avaliable()) {
op->set_printer_state(PrinterState::IN_LAN);
op->SetToolTip(_L("Online"));
set_illustrated_tooltip(op, _L("Online"));
}
else {
op->set_printer_state(PrinterState::LOCK);
@@ -412,16 +415,16 @@ void SelectMObjectPopup::update_user_devices()
}
else {
if (!mobj->is_online()) {
op->SetToolTip(_L("Offline"));
set_illustrated_tooltip(op, _L("Offline"));
op->set_printer_state(PrinterState::OFFLINE);
}
else {
if (mobj->is_in_printing()) {
op->SetToolTip(_L("Busy"));
set_illustrated_tooltip(op, _L("Busy"));
op->set_printer_state(PrinterState::BUSY);
}
else {
op->SetToolTip(_L("Online"));
set_illustrated_tooltip(op, _L("Online"));
op->set_printer_state(PrinterState::IDLE);
}
}
@@ -521,6 +524,25 @@ void CalibrationPanel::init_tabpanel() {
selected);
}
// The tabs are the TabButtons of the button list, in the order of the pages.
int tab = 0;
for (wxWindow* child : m_tabpanel->GetBtnsListCtrl()->GetChildren()) {
if (dynamic_cast<TabButton*>(child) == nullptr || tab >= (int)CALI_MODE_COUNT)
continue;
switch (m_cali_panels[tab++]->get_calibration_mode()) {
case CalibMode::Calib_PA_Line:
set_illustrated_tooltip(child, _L("Finds the Flow Dynamics factor (pressure advance) of a filament: how far the extruder runs ahead "
"of a change of speed, so lines keep an even width into and out of corners. The result is "
"stored on the printer."));
break;
case CalibMode::Calib_Flow_Rate:
set_illustrated_tooltip(child, _L("Finds the flow ratio of a filament, which scales how much of it is extruded, so top surfaces "
"come out smooth instead of gappy or ridged. The result is saved to a filament preset."));
break;
default: break;
}
}
for (int i = 0; i < (int)CALI_MODE_COUNT; i++)
add_build_steps_of(*m_cali_panels[i]);
+58 -3
View File
@@ -3,6 +3,7 @@
#include "I18N.hpp"
#include "Widgets/Label.hpp"
#include "MsgDialog.hpp"
#include "IllustratedTipPopup.hpp"
#include "DeviceCore/DevFilaSystem.h"
#include <wx/event.h>
@@ -206,11 +207,9 @@ CaliPageButton::CaliPageButton(wxWindow* parent, CaliPageActionType type, wxStri
break;
case CaliPageActionType::CALI_ACTION_MANUAL_CALI:
this->SetLabel(_L("Manual Calibration"));
this->SetToolTip(_L("Result can be read by human eyes."));
break;
case CaliPageActionType::CALI_ACTION_AUTO_CALI:
this->SetLabel(_L("Auto-Calibration"));
this->SetToolTip(_L("We would use Lidar to read the calibration result"));
break;
case CaliPageActionType::CALI_ACTION_START:
this->SetLabel(_L("Start Calibration"));
@@ -423,6 +422,8 @@ CaliPageCaption::CaliPageCaption(wxWindow* parent, CalibMode cali_mode,
m_prev_btn = new ScalableButton(this, wxID_ANY, "cali_page_caption_prev",
wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, true, 30);
m_prev_btn->SetBackgroundColour(*wxWHITE);
set_illustrated_tooltip(m_prev_btn, _L("Leaves this calibration and goes back to its first page. While its test is printing or its "
"result is not saved yet, it asks first, and then stops the print."));
caption_sizer->Add(m_prev_btn, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(10));
wxString title = get_cali_mode_caption_string(cali_mode);
@@ -494,7 +495,7 @@ void CaliPageCaption::create_wiki(wxWindow* parent)
{
// ORCA standardized HyperLink
m_wiki_text = new Button(parent, "", "toolbar_wiki", 0, 15);
m_wiki_text->SetToolTip(_L("Wiki Guide"));
set_illustrated_tooltip(m_wiki_text, _L("Wiki Guide"));
m_wiki_text->SetStyle(ButtonStyle::Confirm, ButtonType::Circle);
m_wiki_text->SetCanFocus(false);
m_wiki_text->Bind(wxEVT_LEFT_UP, [this](wxMouseEvent& e) {
@@ -696,6 +697,59 @@ void PAPageHelpPanel::create_pop_window()
}
// The tooltip of an action button, which depends on the calibration it belongs to. The buttons whose label
// already says what they do (Prev, Next) have none.
static void set_action_button_tip(CaliPageButton *btn, CalibMode cali_mode)
{
const bool flow_rate = cali_mode == CalibMode::Calib_Flow_Rate;
switch (btn->get_action_type()) {
case CaliPageActionType::CALI_ACTION_MANAGE_RESULT:
set_illustrated_tooltip(btn, _L("Lists the Flow Dynamics results stored on the printer, to rename, change or delete them, or to "
"add one whose factor you already know."));
break;
case CaliPageActionType::CALI_ACTION_MANUAL_CALI:
if (flow_rate)
set_illustrated_tooltip(btn, _L("Prints a set of blocks, each at a different flow ratio. You pick the block with the smoothest "
"top surface, can refine it with a second, finer set, and save the result to a filament preset."),
{{"flow_rate_calibration_coarse.png", {}}});
else
set_illustrated_tooltip(btn, _L("Prints a test at a range of Flow Dynamics factors, as lines or as corners. You pick the most "
"even one by eye and enter its factor."),
{{"fd_calibration_manual.png", _L_CONTEXT("Line", "PA calibration method")},
{"fd_pattern_manual.png", _L("Pattern")}});
break;
case CaliPageActionType::CALI_ACTION_AUTO_CALI:
if (flow_rate)
set_illustrated_tooltip(btn, _L("Prints a test pattern that the printer measures itself, and offers the flow ratio it finds for "
"saving. Transparent, sparkly or glossy filament can give a wrong result."),
{{"flow_rate_calibration_auto.png", {}}});
else
set_illustrated_tooltip(btn, _L("Prints short test lines for each selected filament at the front of the plate. The printer "
"measures them itself and offers the factors it finds for saving."),
{{"fd_calibration_auto.png", {}}});
break;
case CaliPageActionType::CALI_ACTION_CALI:
set_illustrated_tooltip(btn, _L("Sends the test print to the printer and starts it. Clear the build plate first."));
break;
case CaliPageActionType::CALI_ACTION_CALI_NEXT:
set_illustrated_tooltip(btn, _L("Goes on to the page where the result of the finished test is entered and saved."));
break;
case CaliPageActionType::CALI_ACTION_FLOW_CALI_STAGE_2:
set_illustrated_tooltip(btn, _L("Prints the second test: blocks in finer steps around the flow ratio chosen here."),
{{"flow_rate_calibration_fine.png", {}}});
break;
case CaliPageActionType::CALI_ACTION_PA_SAVE:
set_illustrated_tooltip(btn, _L("Saves the factor to the printer under the name given, and goes back to the first page."));
break;
case CaliPageActionType::CALI_ACTION_FLOW_SAVE:
case CaliPageActionType::CALI_ACTION_FLOW_COARSE_SAVE:
case CaliPageActionType::CALI_ACTION_FLOW_FINE_SAVE:
set_illustrated_tooltip(btn, _L("Saves the flow ratio to a filament preset with the name given, and goes back to the first page."));
break;
default: break;
}
}
CaliPageActionPanel::CaliPageActionPanel(wxWindow* parent,
CalibMode cali_mode,
CaliPageType page_type,
@@ -769,6 +823,7 @@ CaliPageActionPanel::CaliPageActionPanel(wxWindow* parent,
top_sizer->Add(0, 0, 1, wxEXPAND, 0);
for (int i = 0; i < m_action_btns.size(); i++) {
top_sizer->Add(m_action_btns[i], 0, wxALL, FromDIP(5));
set_action_button_tip(m_action_btns[i], cali_mode);
m_action_btns[i]->Bind(wxEVT_BUTTON,
[this, i](wxCommandEvent& evt) {
+85 -8
View File
@@ -21,6 +21,7 @@
#include <wx/textctrl.h>
#include <wx/arrstr.h>
#include "slic3r/GUI/Widgets/ComboBox.hpp"
#include "slic3r/GUI/Widgets/DropDown.hpp"
#include <string>
#include <wx/sizer.h>
#include "slic3r/GUI/CalibrationWizardPage.hpp"
@@ -43,6 +44,9 @@
#include "I18N.hpp"
#include "Widgets/Label.hpp"
#include "MsgDialog.hpp"
#include "IllustratedTipPopup.hpp"
#include <wx/radiobut.h>
#include <wx/window.h>
#include "libslic3r/Print.hpp"
#include "PrePrintChecker.hpp"
@@ -122,6 +126,19 @@ void CaliPresetCaliStagePanel::create_panel(wxWindow* parent)
m_top_sizer->Add(input_panel);
m_top_sizer->AddSpacer(PRESET_GAP);
set_illustrated_tooltip(m_complete_radioBox,
// xgettext:no-c-format, no-boost-format
_L("Prints two tests: first blocks whose flow ratios are 5% apart, then blocks 1% apart near the best "
"of the first. Start here with a new filament."),
{{"flow_rate_calibration_coarse.png", {}}, {"flow_rate_calibration_fine.png", {}}});
set_illustrated_tooltip(m_fine_radioBox,
// xgettext:no-c-format, no-boost-format
_L("Prints only the second test, blocks 1% apart, based on the flow ratio entered below. For a filament "
"whose flow ratio is already close."),
{{"flow_rate_calibration_fine.png", {}}});
set_illustrated_tooltip(flow_ratio_input, _L("The flow ratio the fine test is based on, usually the one the filament preset has now. "
"It has to be between 0 and 2."));
// events
m_complete_radioBox->Bind(wxEVT_RADIOBUTTON, [this](auto& e) {
m_stage_panel_parent->get_current_object()->flow_ratio_calibration_type = COMPLETE_CALIBRATION;
@@ -611,13 +628,33 @@ int CalibrationPresetPage::get_extruder_id_by_tray_id(int tray_id)
return 0;
}
// The nozzle diameter lists, before and after they are synchronized from the printer.
static wxString nozzle_diameter_tip()
{
return _L("The nozzle the test is sliced for. The filaments offered are the presets for this nozzle size.");
}
// The nozzle flow lists, single nozzle and left and right, which the printer fills in.
static wxString nozzle_flow_tip()
{
return _L("The nozzle's flow type, as the printer reports it. A Flow Dynamics result applies only to the flow type it was "
"calibrated with.");
}
// A nozzle diameter list, with or without the note that the printer reported the diameter.
static void set_nozzle_diameter_tip(wxWindow *combo, bool synced)
{
set_illustrated_tooltip(combo, synced ? nozzle_diameter_tip() + "\n\n" + _L("The nozzle diameter has been synchronized from the printer Settings") :
nozzle_diameter_tip());
}
void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
{
auto panel_sizer = new wxBoxSizer(wxVERTICAL);
auto sync_button_sizer = new wxBoxSizer(wxHORIZONTAL);
m_btn_sync = new Button(parent, "", "ams_nozzle_sync");
m_btn_sync->SetToolTip(_L("Synchronize nozzle and AMS information"));
set_illustrated_tooltip(m_btn_sync, _L("Synchronize nozzle and AMS information"));
m_btn_sync->SetCornerRadius(8);
StateColor btn_sync_bg_col(std::pair<wxColour, int>(wxColour("#CECECE"), StateColor::Pressed),
std::pair<wxColour, int>(wxColour("#F8F8F8"), StateColor::Hovered),
@@ -691,6 +728,7 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
single_nozzle_sizer->Add(nozzle_combo_text, 0, wxALL, 0);
single_nozzle_sizer->AddSpacer(FromDIP(10));
m_comboBox_nozzle_dia = new ComboBox(m_single_nozzle_info_panel, wxID_ANY, "", wxDefaultPosition, CALIBRATION_COMBOX_SIZE, 0, nullptr, wxCB_READONLY);
set_illustrated_tooltip(m_comboBox_nozzle_dia, nozzle_diameter_tip());
single_nozzle_sizer->Add(m_comboBox_nozzle_dia, 0, wxALL, 0);
m_nozzle_diameter_tips = new Label(m_single_nozzle_info_panel, "");
@@ -707,6 +745,7 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
m_comboBox_nozzle_volume = new ComboBox(m_single_nozzle_info_panel, wxID_ANY, "", wxDefaultPosition, CALIBRATION_COMBOX_SIZE, 0, nullptr, wxCB_READONLY);
m_comboBox_nozzle_volume->Disable();
set_illustrated_tooltip(m_comboBox_nozzle_volume, nozzle_flow_tip());
single_nozzle_sizer->Add(nozzle_volume_type_text, 0, wxALL, 0);
single_nozzle_sizer->AddSpacer(FromDIP(5));
@@ -739,6 +778,7 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
m_left_comboBox_nozzle_dia = new ComboBox(m_multi_nozzle_info_panel, wxID_ANY, "", wxDefaultPosition, CALIBRATION_FILAMENT_COMBOX_SIZE, 0, nullptr, wxCB_READONLY);
m_left_comboBox_nozzle_dia->Disable();
set_nozzle_diameter_tip(m_left_comboBox_nozzle_dia, false);
m_left_nozzle_volume_type_sizer->AddSpacer(FromDIP(5));
m_left_nozzle_volume_type_sizer->Add(nozzle_diameter_text, 0, wxLEFT | wxRIGHT, 10);
@@ -753,6 +793,7 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
m_left_comboBox_nozzle_volume = new ComboBox(m_multi_nozzle_info_panel, wxID_ANY, "", wxDefaultPosition, CALIBRATION_FILAMENT_COMBOX_SIZE, 0, nullptr, wxCB_READONLY);
m_left_comboBox_nozzle_volume->Disable();
set_illustrated_tooltip(m_left_comboBox_nozzle_volume, nozzle_flow_tip());
m_left_nozzle_volume_type_sizer->Add(nozzle_volume_type_text, 0, wxLEFT | wxRIGHT, 10);
m_left_nozzle_volume_type_sizer->AddSpacer(FromDIP(5));
@@ -773,6 +814,7 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
m_right_comboBox_nozzle_dia = new ComboBox(m_multi_nozzle_info_panel, wxID_ANY, "", wxDefaultPosition, CALIBRATION_FILAMENT_COMBOX_SIZE, 0, nullptr, wxCB_READONLY);
m_right_comboBox_nozzle_dia->Disable();
set_nozzle_diameter_tip(m_right_comboBox_nozzle_dia, false);
m_right_nozzle_volume_type_sizer->AddSpacer(FromDIP(5));
m_right_nozzle_volume_type_sizer->Add(nozzle_diameter_text, 0, wxLEFT | wxRIGHT, 10);
@@ -787,6 +829,7 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
m_right_comboBox_nozzle_volume = new ComboBox(m_multi_nozzle_info_panel, wxID_ANY, "", wxDefaultPosition, CALIBRATION_FILAMENT_COMBOX_SIZE, 0, nullptr, wxCB_READONLY);
m_right_comboBox_nozzle_volume->Disable();
set_illustrated_tooltip(m_right_comboBox_nozzle_volume, nozzle_flow_tip());
m_right_nozzle_volume_type_sizer->Add(nozzle_volume_type_text, 0, wxLEFT | wxRIGHT, 10);
m_right_nozzle_volume_type_sizer->AddSpacer(FromDIP(5));
@@ -816,6 +859,8 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
panel_sizer->Add(plate_type_combo_text, 0, wxALL, 0);
panel_sizer->AddSpacer(FromDIP(10));
m_comboBox_bed_type = new ComboBox(parent, wxID_ANY, "", wxDefaultPosition, CALIBRATION_COMBOX_SIZE, 0, nullptr, wxCB_READONLY);
set_illustrated_tooltip(m_comboBox_bed_type, _L("The build plate on the printer. It sets the bed temperature of the test, and "
"filaments that should not be printed on it are reported as not compatible."));
panel_sizer->Add(m_comboBox_bed_type, 0, wxALL, 0);
panel_sizer->AddSpacer(PRESET_GAP);
@@ -837,7 +882,7 @@ void CalibrationPresetPage::create_selection_panel(wxWindow* parent)
filament_for_title_sizer->AddSpacer(FromDIP(25));
m_ams_sync_button = new ScalableButton(parent, wxID_ANY, "ams_fila_sync", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, false, 18);
m_ams_sync_button->SetBackgroundColour(*wxWHITE);
m_ams_sync_button->SetToolTip(_L("Synchronize filament list from AMS"));
set_illustrated_tooltip(m_ams_sync_button, _L("Synchronize filament list from AMS"));
filament_for_title_sizer->Add(m_ams_sync_button, 0, wxALIGN_CENTER);
panel_sizer->Add(filament_for_title_sizer);
panel_sizer->AddSpacer(FromDIP(6));
@@ -963,6 +1008,15 @@ void CalibrationPresetPage::init_selection_values()
}
}
// The radio button and the check box in front of a filament slot: one of them is shown, depending on whether
// the calibration takes one filament or several.
static void set_filament_slot_tips(wxRadioButton* radio_btn, CheckBox* check_box)
{
set_illustrated_tooltip(radio_btn, _L("Calibrates the filament in this slot."));
set_illustrated_tooltip(check_box, _L("Includes the filament in this slot. All the filaments ticked are calibrated in one print, "
"each with its own test."));
}
void CalibrationPresetPage::create_filament_list_panel(wxWindow* parent)
{
auto panel_sizer = new wxBoxSizer(wxVERTICAL);
@@ -985,6 +1039,7 @@ void CalibrationPresetPage::create_filament_list_panel(wxWindow* parent)
CheckBox* check_box = new CheckBox(m_filament_list_panel);
check_box->SetBackgroundColour(*wxWHITE);
FilamentComboBox* fcb = new FilamentComboBox(m_filament_list_panel, i);
set_filament_slot_tips(radio_btn, check_box);
fcb->SetRadioBox(radio_btn);
fcb->SetCheckBox(check_box);
fcb->set_select_mode(CalibrationFilamentMode::CALI_MODEL_SINGLE);
@@ -1128,6 +1183,7 @@ void CalibrationPresetPage::create_multi_extruder_filament_list_panel(wxWindow *
CheckBox * check_box = new CheckBox(m_multi_exutrder_filament_list_panel);
check_box->SetBackgroundColour(*wxWHITE);
FilamentComboBox *fcb = new FilamentComboBox(m_multi_exutrder_filament_list_panel, i + 4);
set_filament_slot_tips(radio_btn, check_box);
fcb->SetRadioBox(radio_btn);
fcb->SetCheckBox(check_box);
fcb->set_select_mode(CalibrationFilamentMode::CALI_MODEL_SINGLE);
@@ -1172,6 +1228,7 @@ void CalibrationPresetPage::create_multi_extruder_filament_list_panel(wxWindow *
CheckBox * check_box = new CheckBox(m_multi_exutrder_filament_list_panel);
check_box->SetBackgroundColour(*wxWHITE);
FilamentComboBox *fcb = new FilamentComboBox(m_multi_exutrder_filament_list_panel, i);
set_filament_slot_tips(radio_btn, check_box);
fcb->SetRadioBox(radio_btn);
fcb->SetCheckBox(check_box);
fcb->set_select_mode(CalibrationFilamentMode::CALI_MODEL_SINGLE);
@@ -1266,6 +1323,26 @@ void CalibrationPresetPage::create_page(wxWindow* parent)
pa_cali_modes.push_back(_L_CONTEXT("Line", "PA calibration method"));
pa_cali_modes.push_back(_L("Pattern"));
m_pa_cali_method_combox = new CaliComboBox(parent, _L("Method"), pa_cali_modes);
// Each method's picture, in the order of pa_cali_modes, for the tooltip and for the open list.
const std::vector<TipMedia> method_media = {{"fd_calibration_manual.png", pa_cali_modes[0]},
{"fd_pattern_manual.png", pa_cali_modes[1]}};
set_illustrated_tooltip(m_pa_cali_method_combox,
_L("The shape of the test print. Line prints one line per factor, Pattern one set of corners per "
"factor; either way you pick the most even one."),
method_media);
for (wxWindow* child : m_pa_cali_method_combox->GetChildren()) {
auto combo = dynamic_cast<ComboBox*>(child);
if (combo == nullptr)
continue;
DropDown& drop = combo->GetDropDown();
drop.SetItemHoverHandler([&drop, method_media](int item, const wxRect& row) {
if (item >= 0 && item < int(method_media.size()))
hover_illustrated_tooltip(&drop, row, wxString(), {method_media[size_t(item)]});
else
hover_illustrated_tooltip(&drop, wxRect(), wxString());
});
}
}
m_warning_panel = new CaliPresetWarningPanel(parent);
@@ -2164,9 +2241,9 @@ void CalibrationPresetPage::init_with_machine(MachineObject* obj)
wxCommandEvent event(wxEVT_COMBOBOX);
event.SetEventObject(this);
wxPostEvent(m_comboBox_nozzle_dia, event);
m_comboBox_nozzle_dia->SetToolTip(_L("The nozzle diameter has been synchronized from the printer Settings"));
set_nozzle_diameter_tip(m_comboBox_nozzle_dia, true);
} else {
m_comboBox_nozzle_dia->SetToolTip(wxEmptyString);
set_nozzle_diameter_tip(m_comboBox_nozzle_dia, false);
// set default to 0.4
if (m_comboBox_nozzle_dia->GetCount() > NOZZLE_LIST_DEFAULT)
m_comboBox_nozzle_dia->SetSelection(NOZZLE_LIST_DEFAULT);
@@ -2181,10 +2258,10 @@ void CalibrationPresetPage::init_with_machine(MachineObject* obj)
wxCommandEvent event(wxEVT_COMBOBOX);
event.SetEventObject(this);
wxPostEvent(m_left_comboBox_nozzle_dia, event);
m_left_comboBox_nozzle_dia->SetToolTip(_L("The nozzle diameter has been synchronized from the printer Settings"));
set_nozzle_diameter_tip(m_left_comboBox_nozzle_dia, true);
}
else {
m_left_comboBox_nozzle_dia->SetToolTip(wxEmptyString);
set_nozzle_diameter_tip(m_left_comboBox_nozzle_dia, false);
if (m_left_comboBox_nozzle_dia->GetCount() > NOZZLE_LIST_DEFAULT)
m_left_comboBox_nozzle_dia->SetSelection(NOZZLE_LIST_DEFAULT);
}
@@ -2202,9 +2279,9 @@ void CalibrationPresetPage::init_with_machine(MachineObject* obj)
wxCommandEvent event(wxEVT_COMBOBOX);
event.SetEventObject(this);
wxPostEvent(m_right_comboBox_nozzle_dia, event);
m_right_comboBox_nozzle_dia->SetToolTip(_L("The nozzle diameter has been synchronized from the printer Settings"));
set_nozzle_diameter_tip(m_right_comboBox_nozzle_dia, true);
} else {
m_right_comboBox_nozzle_dia->SetToolTip(wxEmptyString);
set_nozzle_diameter_tip(m_right_comboBox_nozzle_dia, false);
if (m_right_comboBox_nozzle_dia->GetCount() > NOZZLE_LIST_DEFAULT)
m_right_comboBox_nozzle_dia->SetSelection(NOZZLE_LIST_DEFAULT);
}
+34 -1
View File
@@ -5,6 +5,7 @@
#include "format.hpp"
#include "Widgets/Label.hpp"
#include "MsgDialog.hpp"
#include "IllustratedTipPopup.hpp"
#include "DeviceCore/DevConfigUtil.h"
#include "DeviceCore/DevNozzleSystem.h"
#include "DeviceCore/DevNozzleRack.h"
@@ -170,6 +171,19 @@ GridComboBox::GridComboBox(wxWindow* parent, wxSize size, int col_idx, int extru
}
// Tooltips shared by the save pages.
static wxString pa_result_name_tip()
{
return _L("The name the result is saved under on the printer. Saving under the name of an earlier result of this "
"filament replaces that result, after asking.");
}
static wxString flow_preset_name_tip()
{
return _L("The name of the filament preset the flow ratio is saved to, a copy of the filament's current preset. "
"It cannot be the name of a system preset.");
}
CaliPASaveAutoPanel::CaliPASaveAutoPanel(
wxWindow* parent,
wxWindowID id,
@@ -331,6 +345,8 @@ void CaliPASaveAutoPanel::sync_cali_result(const std::vector<PACalibResult>& cal
auto n_value_failed = new Label(m_grid_panel, _L("Failed"));
auto comboBox_tray_name = new GridComboBox(m_grid_panel, CALIBRATION_SAVE_INPUT_SIZE, item.tray_id, item.extruder_id);
set_illustrated_tooltip(k_value, _L("The Flow Dynamics factor the printer measured for this filament. You can correct it before saving."));
set_illustrated_tooltip(comboBox_tray_name, pa_result_name_tip());
auto tray_name_failed = new Label(m_grid_panel, " - ");
wxArrayString selections;
static std::vector<PACalibResult> filtered_results;
@@ -679,7 +695,6 @@ void CaliPASaveAutoPanel::sync_cali_result_for_multi_extruder(const std::vector<
wxButton *tray_title = new wxButton(m_multi_extruder_grid_panel, wxID_ANY, {}, wxDefaultPosition, wxSize(FromDIP(20), FromDIP(20)), wxBU_EXACTFIT | wxBU_AUTODRAW | wxBORDER_NONE);
tray_title->SetBackgroundColour(*wxWHITE);
tray_title->SetBitmap(*get_extruder_color_icon(full_filament_ams_list[item.tray_id].opt_string("filament_colour", 0u), tray_name.ToStdString(), FromDIP(20), FromDIP(20)));
tray_title->SetToolTip("");
auto k_value = new GridTextInput(m_multi_extruder_grid_panel, "", "", CALIBRATION_SAVE_NUMBER_INPUT_SIZE, item.tray_id, GridTextInputType::K, item.extruder_id);
auto n_value = new GridTextInput(m_multi_extruder_grid_panel, "", "", CALIBRATION_SAVE_NUMBER_INPUT_SIZE, item.tray_id, GridTextInputType::N, item.extruder_id);
@@ -694,6 +709,8 @@ void CaliPASaveAutoPanel::sync_cali_result_for_multi_extruder(const std::vector<
auto nozzle_id_failed = new Label(m_multi_extruder_grid_panel, _L("Failed"));
auto comboBox_tray_name = new GridComboBox(m_multi_extruder_grid_panel, CALIBRATION_SAVE_INPUT_SIZE, item.tray_id, item.extruder_id);
set_illustrated_tooltip(k_value, _L("The Flow Dynamics factor the printer measured for this filament. You can correct it before saving."));
set_illustrated_tooltip(comboBox_tray_name, pa_result_name_tip());
auto tray_name_failed = new Label(m_multi_extruder_grid_panel, " - ");
wxArrayString selections;
static std::vector<PACalibResult> filtered_results;
@@ -908,6 +925,7 @@ void CaliPASaveManualPanel::create_panel(wxWindow* parent)
n_value_text->Hide();
m_k_val = new TextInput(parent, wxEmptyString, "", "", wxDefaultPosition, CALIBRATION_OPTIMAL_INPUT_SIZE, 0);
m_k_val->GetTextCtrl()->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
set_illustrated_tooltip(m_k_val, _L("The factor printed beside the line or corner you picked."));
m_n_val = new TextInput(parent, wxEmptyString, "", "", wxDefaultPosition, CALIBRATION_OPTIMAL_INPUT_SIZE, 0);
m_n_val->GetTextCtrl()->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
m_n_val->Hide();
@@ -921,6 +939,7 @@ void CaliPASaveManualPanel::create_panel(wxWindow* parent)
m_top_sizer->Add(save_text, 0, 0, 0);
m_save_name_input = new TextInput(parent, "", "", "", wxDefaultPosition, { CALIBRATION_TEXT_MAX_LENGTH, FromDIP(24) }, 0);
set_illustrated_tooltip(m_save_name_input, pa_result_name_tip());
m_top_sizer->Add(m_save_name_input, 0, 0, 0);
m_top_sizer->AddSpacer(FromDIP(10));
@@ -1105,6 +1124,7 @@ void CaliPASaveP1PPanel::create_panel(wxWindow* parent)
n_value_text->SetFont(::Label::Head_14);
m_k_val = new TextInput(parent, wxEmptyString, "", "", wxDefaultPosition, CALIBRATION_OPTIMAL_INPUT_SIZE, 0);
m_k_val->GetTextCtrl()->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
set_illustrated_tooltip(m_k_val, _L("The factor printed beside the line or corner you picked."));
m_n_val = new TextInput(parent, wxEmptyString, "", "", wxDefaultPosition, CALIBRATION_OPTIMAL_INPUT_SIZE, 0);
m_n_val->GetTextCtrl()->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
n_value_text->Hide();
@@ -1492,6 +1512,8 @@ void CalibrationFlowX1SavePage::sync_cali_result(const std::vector<FlowRatioCali
auto flow_ratio_value_failed = new Label(m_grid_panel, _L("Failed"));
auto save_name_input = new GridTextInput(m_grid_panel, "", "", { CALIBRATION_TEXT_MAX_LENGTH, FromDIP(24) }, item.tray_id, GridTextInputType::Name);
set_illustrated_tooltip(flow_ratio_value, _L("The flow ratio the printer measured for this filament. You can correct it before saving."));
set_illustrated_tooltip(save_name_input, flow_preset_name_tip());
auto save_name_input_failed = new Label(m_grid_panel, " - ");
column_data_sizer->Add(tray_title, 0, wxALIGN_CENTER | wxBOTTOM, ROW_GAP);
@@ -1681,6 +1703,9 @@ void CalibrationFlowCoarseSavePage::create_page(wxWindow* parent)
coarse_block_items.Add(std::to_string(-20 + (i * 5)));
}
m_optimal_block_coarse->Set(coarse_block_items);
set_illustrated_tooltip(m_optimal_block_coarse, _L("The number on the block whose top surface is smoothest, a change in percent. "
"The flow ratio it gives is shown below."),
{{"flow_rate_calibration_coarse.png", {}}});
m_coarse_calc_result_text = new Label(parent, "");
coarse_value_sizer->Add(coarse_value_text, 0, 0);
coarse_value_sizer->Add(m_optimal_block_coarse, 0, 0);
@@ -1696,6 +1721,9 @@ void CalibrationFlowCoarseSavePage::create_page(wxWindow* parent)
cb_sizer->Add(m_checkBox_skip_calibration);
auto cb_text = new Label(checkBox_panel, _L("Skip Calibration2"));
const wxString skip_tip = _L("Saves the flow ratio of this test to a filament preset now, instead of printing the finer second test.");
set_illustrated_tooltip(m_checkBox_skip_calibration, skip_tip);
set_illustrated_tooltip(cb_text, skip_tip);
cb_sizer->Add(cb_text);
cb_text->Bind(wxEVT_LEFT_DOWN, [this](auto&) {
m_checkBox_skip_calibration->SetValue(!m_checkBox_skip_calibration->GetValue());
@@ -1717,6 +1745,7 @@ void CalibrationFlowCoarseSavePage::create_page(wxWindow* parent)
save_sizer->Add(save_text, 0, 0, 0);
m_save_name_input = new TextInput(save_panel, "", "", "", wxDefaultPosition, {CALIBRATION_TEXT_MAX_LENGTH, FromDIP(24)}, 0);
set_illustrated_tooltip(m_save_name_input, flow_preset_name_tip());
save_sizer->Add(m_save_name_input, 0, 0, 0);
m_top_sizer->Add(save_panel, 0, 0, 0);
@@ -1917,6 +1946,9 @@ void CalibrationFlowFineSavePage::create_page(wxWindow* parent)
fine_block_items.Add(std::to_string(-9 + (i)));
}
m_optimal_block_fine->Set(fine_block_items);
set_illustrated_tooltip(m_optimal_block_fine, _L("The number on the block whose top surface is smoothest, a change in percent. "
"The flow ratio it gives is shown below."),
{{"flow_rate_calibration_fine.png", {}}});
m_fine_calc_result_text = new Label(parent, "");
fine_value_sizer->Add(fine_value_text, 0, 0);
fine_value_sizer->Add(m_optimal_block_fine, 0, 0);
@@ -1930,6 +1962,7 @@ void CalibrationFlowFineSavePage::create_page(wxWindow* parent)
m_top_sizer->Add(save_text, 0, 0, 0);
m_save_name_input = new TextInput(parent, "", "", "", wxDefaultPosition, {CALIBRATION_TEXT_MAX_LENGTH, FromDIP(24)}, 0);
set_illustrated_tooltip(m_save_name_input, flow_preset_name_tip());
m_top_sizer->Add(m_save_name_input, 0, 0, 0);
m_top_sizer->AddSpacer(FromDIP(20));
+3 -1
View File
@@ -13,6 +13,7 @@
#include <boost/algorithm/string.hpp>
#include "I18N.hpp"
#include "IllustratedTipPopup.hpp"
#include "ConfigManipulation.hpp"
#include <wx/arrstr.h>
@@ -182,7 +183,8 @@ bool ObjectTableSettings::update_settings_list(bool is_object, bool is_multiple_
auto opt_key = (line.get_options())[0].opt_id; //we assume that we have one option per line
auto btn = new ScalableButton(parent, wxID_ANY, m_bmp_reset);
btn->SetToolTip(_(L("Reset parameter")));
set_illustrated_tooltip(btn, _L("Removes the value set here, so the setting comes from the process preset again, or "
"from its object for a part."));
#ifdef __WINDOWS__
btn->SetBackgroundColour(parent->GetBackgroundColour());
+5 -4
View File
@@ -23,6 +23,7 @@
#include "wxExtensions.hpp"
#include "MainFrame.hpp"
#include "MsgDialog.hpp"
#include "IllustratedTipPopup.hpp"
#include "Preferences.hpp"
#include "Widgets/Button.hpp"
#include "Widgets/DialogButtons.hpp"
@@ -273,7 +274,7 @@ wxPanel* KBShortcutsDialog::create_page(wxWindow* parent, const Page& page)
auto icon_button = [&](const char* icon, const wxString& tooltip) {
auto button = new ScalableButton(scrollable_panel, wxID_ANY, icon);
button->SetBackgroundColour(page_colour);
button->SetToolTip(tooltip);
set_illustrated_tooltip(button, tooltip);
return button;
};
@@ -305,15 +306,15 @@ wxPanel* KBShortcutsDialog::create_page(wxWindow* parent, const Page& page)
wxBoxSizer* buttons = new wxBoxSizer(wxHORIZONTAL);
if (const MouseAction* mouse = std::get_if<MouseAction>(&row.content)) {
auto settings = icon_button("settings", _L("Preferences"));
auto settings = icon_button("settings", _L("Opens Preferences at the setting that controls this mouse action."));
settings->Bind(wxEVT_BUTTON, [this, preference = mouse->preference](wxCommandEvent&) { open_mouse_preferences(preference); });
buttons->Add(settings, 0, wxALIGN_CENTRE_VERTICAL);
m_preference_rows.push_back({ mouse->preference, desc });
} else if (const Shortcut* editable = std::get_if<Shortcut>(&row.content)) {
const Shortcut shortcut = *editable;
auto change = icon_button("edit", _L("Edit"));
auto change = icon_button("edit", _L("Assigns a new key combination to this command."));
change->Bind(wxEVT_BUTTON, [this, shortcut](wxCommandEvent&) { edit_shortcut(shortcut); });
auto reset = icon_button("undo", _L("Reset"));
auto reset = icon_button("undo", _L("Puts back the default key combination of this command."));
reset->Bind(wxEVT_BUTTON, [this, shortcut](wxCommandEvent&) { reset_shortcut(shortcut); });
reset->Show(wxGetApp().shortcuts().is_customized(shortcut));
buttons->Add(change, 0, wxALIGN_CENTRE_VERTICAL | wxRIGHT, FromDIP(6));
+3
View File
@@ -10,6 +10,7 @@
#include "slic3r/GUI/Widgets/StateColor.hpp"
#include <utility>
#include "slic3r/GUI/Widgets/RadioGroup.hpp"
#include "slic3r/GUI/IllustratedTipPopup.hpp"
#include "libslic3r/Config.hpp"
#include "slic3r/GUI/Widgets/LabeledCheckBox.hpp"
#include <cstring>
@@ -136,6 +137,8 @@ SavePresetDialog::Item::Item(Preset::Type type, const std::string &suffix, wxBox
_L("Preset Inside Project") // 1
}, wxVERTICAL);
set_illustrated_tooltip(m_radio_group, _L("A user preset is kept with your other presets and offered in every project. A preset "
"inside the project is saved only in this project's file, and goes wherever the file goes."));
sizer->Add(m_radio_group, 0, wxEXPAND | wxTOP | wxLEFT, BORDER_W);
if (parent->m_mode == comDevelop) {
+4
View File
@@ -66,6 +66,7 @@
#include "SavePresetDialog.hpp"
#include "MainFrame.hpp"
#include "MsgDialog.hpp"
#include "IllustratedTipPopup.hpp"
#include "PresetComboBoxes.hpp"
#include "Widgets/DialogButtons.hpp"
@@ -1120,6 +1121,9 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection *dependent_
checkbox->SetId(wxID_APPLY);
m_sizer_button->Add(checkbox, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(22));
// The choice is kept in "save_preset_choise", which Preferences > Clear my choice on... > Unsaved presets clears.
set_illustrated_tooltip(checkbox, _L("Applies the button you click now to unsaved preset changes from then on, without asking. "
"To be asked again, clear it in Preferences, under Clear my choice on."));
checkbox->Show(bool(m_buttons & REMEMBER_CHOISE));
if (dependent_presets != nullptr) {