diff --git a/resources/data/hints.ini b/resources/data/hints.ini
index 12a3cf2df8..c3542fa7a1 100644
--- a/resources/data/hints.ini
+++ b/resources/data/hints.ini
@@ -153,6 +153,17 @@ documentation_link= https://wiki.bambulab.com/en/software/bambu-studio/auto-brim
text = Set parameters for multiple objects\nDid you know that you can set slicing parameters for all selected objects at one time?
documentation_link= https://wiki.bambulab.com/en/software/bambu-studio/set-parameters-for-selected-objects
+[hint:Stack objects]
+text = Stack objects\nDid you know that you can stack objects as a whole one?
+documentation_link= https://wiki.bambulab.com/e/en/software/bambu-studio/stacking-objects
+
+[hint:Flush into support/objects/infill]
+text = Flush into support/objects/infill\nDid you know that you can save the wasted filament by flushing them into support/objects/infill during filament change?
+documentation_link= https://wiki.bambulab.com/en/software/bambu-studio/reduce-wasting-during-filament-change
+
+[hint:Improve strength]
+text = Improve strength\nDid you know that you can use more wall loops and higher sparse infill density to improve the strength of the model?
+
#[hint:]
#text =
#hypertext =
diff --git a/resources/images/notification_right.svg b/resources/images/notification_right.svg
index 8d40507a76..1dfa2c79d1 100644
--- a/resources/images/notification_right.svg
+++ b/resources/images/notification_right.svg
@@ -1,28 +1 @@
-
-
-
+
\ No newline at end of file
diff --git a/resources/images/notification_right_hover.svg b/resources/images/notification_right_hover.svg
index a436c95983..7f6305d419 100644
--- a/resources/images/notification_right_hover.svg
+++ b/resources/images/notification_right_hover.svg
@@ -1,27 +1 @@
-
-
-
+
\ No newline at end of file
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 6cd616dcd3..e7b100ab55 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -1069,8 +1069,9 @@ void GUI_App::post_init()
// BBS: to be checked
#if 1
// show "Did you know" notification
- if (app_config->get("show_hints") == "true" && ! is_gcode_viewer())
- plater_->get_notification_manager()->push_hint_notification(true);
+ if (app_config->get("show_hints") == "true" && !is_gcode_viewer()) {
+ plater_->get_notification_manager()->push_hint_notification(false);
+ }
#endif
if (m_networking_need_update) {
diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp
index 1a289c611f..be0745bc8f 100644
--- a/src/slic3r/GUI/HintNotification.cpp
+++ b/src/slic3r/GUI/HintNotification.cpp
@@ -839,7 +839,7 @@ void NotificationManager::HintNotification::render_text(ImGuiWrapper& imgui, con
float x_offset = m_left_indentation;
int last_end = 0;
- float starting_y = (m_lines_count < 4 ? m_line_height / 2 * (4 - m_lines_count + 1) : m_line_height / 2);
+ float starting_y = (/*m_lines_count < 4 ? m_line_height / 2 * (4 - m_lines_count + 1) :*/ m_line_height / 2);
float shift_y = m_line_height;
std::string line;
@@ -932,41 +932,29 @@ void NotificationManager::HintNotification::render_close_button(ImGuiWrapper& im
std::string button_text;
button_text = ImGui::CloseNotifButton;
- if (ImGui::IsMouseHoveringRect(ImVec2(win_pos.x - win_size.x / 10.f, win_pos.y),
- ImVec2(win_pos.x, win_pos.y + win_size.y - 2 * m_line_height),
- true))
- {
- button_text = ImGui::CloseNotifHoverButton;
- }
ImVec2 button_pic_size = ImGui::CalcTextSize(button_text.c_str());
ImVec2 button_size(button_pic_size.x * 1.25f, button_pic_size.y * 1.25f);
m_close_b_w = button_size.y;
- if (m_lines_count <= 3) {
- m_close_b_y = win_size.y / 2 - button_size.y * 1.25f;
- ImGui::SetCursorPosX(win_size.x - m_line_height * 2.75f);
- ImGui::SetCursorPosY(m_close_b_y);
- }
- else {
- ImGui::SetCursorPosX(win_size.x - m_line_height * 2.75f);
- ImGui::SetCursorPosY(win_size.y / 2 - button_size.y);
+ if (ImGui::IsMouseHoveringRect(ImVec2(win_pos.x - win_size.x / 10.f, win_pos.y + win_size.y / 2 - button_pic_size.y),
+ ImVec2(win_pos.x, win_pos.y + win_size.y / 2 + button_pic_size.y),
+ true))
+ {
+ button_text = ImGui::CloseNotifHoverButton;
+ if (ImGui::IsMouseClicked(ImGuiMouseButton_Left))
+ close();
}
+ ImGui::SetCursorPosX(win_size.x - m_line_height * 2.75f);
+ ImGui::SetCursorPosY(win_size.y / 2 - button_size.y);
if (imgui.button(button_text.c_str(), button_size.x, button_size.y))
{
close();
}
- //invisible large button
- ImGui::SetCursorPosX(win_size.x - m_line_height * 2.35f);
- ImGui::SetCursorPosY(0);
- if (imgui.button(" ", m_line_height * 2.125, win_size.y - 2 * m_line_height))
- {
- close();
- }
ImGui::PopStyleColor(5);
- //render_right_arrow_button(imgui, win_size_x, win_size_y, win_pos_x, win_pos_y);
+ render_right_arrow_button(imgui, win_size_x, win_size_y, win_pos_x, win_pos_y);
//render_logo(imgui, win_size_x, win_size_y, win_pos_x, win_pos_y);
render_preferences_button(imgui, win_pos_x, win_pos_y);
if (!m_documentation_link.empty() && wxGetApp().app_config->get("suppress_hyperlinks") != "1")
@@ -978,7 +966,7 @@ void NotificationManager::HintNotification::render_close_button(ImGuiWrapper& im
void NotificationManager::HintNotification::render_preferences_button(ImGuiWrapper& imgui, const float win_pos_x, const float win_pos_y)
{
-
+ auto scale = wxGetApp().plater()->get_current_canvas3D()->get_scale();
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(.0f, .0f, .0f, .0f));
push_style_color(ImGuiCol_ButtonActive, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg), m_state == EState::FadingOut, m_current_fade_opacity);
@@ -988,37 +976,28 @@ void NotificationManager::HintNotification::render_preferences_button(ImGuiWrapp
std::string button_text;
button_text = ImGui::PreferencesButton;
//hover
- if (ImGui::IsMouseHoveringRect(ImVec2(win_pos_x - m_window_width / 15.f, win_pos_y + m_window_height - 1.75f * m_line_height),
+ if (ImGui::IsMouseHoveringRect(ImVec2(win_pos_x - m_window_width / 15.f, win_pos_y + m_window_height - 1.5f * m_line_height),
ImVec2(win_pos_x, win_pos_y + m_window_height),
true)) {
button_text = ImGui::PreferencesHoverButton;
// tooltip
- long time_now = wxGetLocalTime();
- if (m_prefe_hover_time > 0 && m_prefe_hover_time < time_now) {
- ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGuiWrapper::COL_WINDOW_BACKGROUND);
- ImGui::BeginTooltip();
- imgui.text(_u8L("Open Preferences."));
- ImGui::EndTooltip();
- ImGui::PopStyleColor();
- }
- if (m_prefe_hover_time == 0)
- m_prefe_hover_time = time_now;
+ ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGuiWrapper::COL_WINDOW_BACKGROUND);
+ ImGui::PushStyleColor(ImGuiCol_Border, { 0,0,0,0 });
+ ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, { 8 * scale, 1 * scale });
+ ImGui::BeginTooltip();
+ imgui.text(_u8L("Open Preferences."));
+ ImGui::EndTooltip();
+ ImGui::PopStyleColor(2);
+ ImGui::PopStyleVar();
}
- else
- m_prefe_hover_time = 0;
ImVec2 button_pic_size = ImGui::CalcTextSize(button_text.c_str());
ImVec2 button_size(button_pic_size.x * 1.25f, button_pic_size.y * 1.25f);
ImGui::SetCursorPosX(m_window_width - m_line_height * 1.75f);
- if (m_lines_count <= 3) {
- ImGui::SetCursorPosY(m_close_b_y + m_close_b_w / 4.f * 7.f);
- }
- else {
- ImGui::SetCursorPosY(m_window_height - button_size.y - m_close_b_w / 4.f);
- }
+ ImGui::SetCursorPosY(m_window_height - button_size.y - m_close_b_w / 4.f);
if (imgui.button(button_text.c_str(), button_size.x, button_size.y))
{
- wxGetApp().open_preferences(1, "GUI");// 1 is to modify
+ wxGetApp().open_preferences();
}
ImGui::PopStyleColor(5);
@@ -1028,7 +1007,7 @@ void NotificationManager::HintNotification::render_preferences_button(ImGuiWrapp
void NotificationManager::HintNotification::render_right_arrow_button(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y)
{
// Used for debuging
-
+ auto scale = wxGetApp().plater()->get_current_canvas3D()->get_scale();
ImVec2 win_size(win_size_x, win_size_y);
ImVec2 win_pos(win_pos_x, win_pos_y);
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f));
@@ -1042,12 +1021,23 @@ void NotificationManager::HintNotification::render_right_arrow_button(ImGuiWrapp
ImVec2 button_pic_size = ImGui::CalcTextSize(button_text.c_str());
ImVec2 button_size(button_pic_size.x * 1.25f, button_pic_size.y * 1.25f);
-
+ if (ImGui::IsMouseHoveringRect(ImVec2(win_pos_x - m_window_width / 7.5f, win_pos_y + m_window_height - 1.5f * m_line_height),
+ ImVec2(win_pos_x - m_window_width / 15.f, win_pos_y + m_window_height),
+ true))
+ {
+ button_text = ImGui::RightArrowHoverButton;
+ // tooltip
+ ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGuiWrapper::COL_WINDOW_BACKGROUND);
+ ImGui::PushStyleColor(ImGuiCol_Border, { 0,0,0,0 });
+ ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, { 8 * scale, 1 * scale });
+ ImGui::BeginTooltip();
+ imgui.text(_u8L("Open next tip."));
+ ImGui::EndTooltip();
+ ImGui::PopStyleColor(2);
+ ImGui::PopStyleVar();
+ }
ImGui::SetCursorPosX(m_window_width - m_line_height * 3.f);
- if (m_lines_count <= 3)
- ImGui::SetCursorPosY(m_close_b_y + m_close_b_w / 4.f * 7.f);
- else
- ImGui::SetCursorPosY(m_window_height - button_size.y - m_close_b_w / 4.f);
+ ImGui::SetCursorPosY(m_window_height - button_size.y - m_close_b_w / 4.f);
if (imgui.button(button_text.c_str(), button_size.x * 0.8f, button_size.y * 1.f))
{
retrieve_data();
@@ -1068,6 +1058,7 @@ void NotificationManager::HintNotification::render_logo(ImGuiWrapper& imgui, con
}
void NotificationManager::HintNotification::render_documentation_button(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y)
{
+ auto scale = wxGetApp().plater()->get_current_canvas3D()->get_scale();
ImVec2 win_size(win_size_x, win_size_y);
ImVec2 win_pos(win_pos_x, win_pos_y);
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f));
@@ -1081,28 +1072,25 @@ void NotificationManager::HintNotification::render_documentation_button(ImGuiWra
std::string placeholder_text;
placeholder_text = ImGui::EjectButton;
- if (ImGui::IsMouseHoveringRect(ImVec2(win_pos.x - m_line_height * 5.f, win_pos.y),
- ImVec2(win_pos.x - m_line_height * 2.5f, win_pos.y + win_size.y - 2 * m_line_height),
+ ImVec2 button_pic_size = ImGui::CalcTextSize(placeholder_text.c_str());
+ ImVec2 button_size(button_pic_size.x * 1.25f, button_pic_size.y * 1.25f);
+ if (ImGui::IsMouseHoveringRect(ImVec2(win_pos.x - m_line_height * 5.f, win_pos.y + win_size.y / 2 - button_pic_size.y),
+ ImVec2(win_pos.x - m_line_height * 2.5f, win_pos.y + win_size.y / 2 + button_pic_size.y),
true))
{
button_text = ImGui::DocumentationHoverButton;
// tooltip
- long time_now = wxGetLocalTime();
- if (m_docu_hover_time > 0 && m_docu_hover_time < time_now) {
- ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGuiWrapper::COL_WINDOW_BACKGROUND);
- ImGui::BeginTooltip();
- imgui.text(_u8L("Open Documentation in web browser."));
- ImGui::EndTooltip();
- ImGui::PopStyleColor();
- }
- if (m_docu_hover_time == 0)
- m_docu_hover_time = time_now;
+ ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGuiWrapper::COL_WINDOW_BACKGROUND);
+ ImGui::PushStyleColor(ImGuiCol_Border, { 0,0,0,0 });
+ ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, { 8 * scale, 1 * scale });
+ ImGui::BeginTooltip();
+ imgui.text(_u8L("Open Documentation in web browser."));
+ ImGui::EndTooltip();
+ ImGui::PopStyleColor(2);
+ ImGui::PopStyleVar();
+ if (ImGui::IsMouseClicked(ImGuiMouseButton_Left))
+ open_documentation();
}
- else
- m_docu_hover_time = 0;
-
- ImVec2 button_pic_size = ImGui::CalcTextSize(placeholder_text.c_str());
- ImVec2 button_size(button_pic_size.x * 1.25f, button_pic_size.y * 1.25f);
ImGui::SetCursorPosX(win_size.x - m_line_height * 5.0f);
ImGui::SetCursorPosY(win_size.y / 2 - button_size.y);
if (imgui.button(button_text.c_str(), button_size.x, button_size.y))
@@ -1110,14 +1098,6 @@ void NotificationManager::HintNotification::render_documentation_button(ImGuiWra
open_documentation();
}
- //invisible large button
- ImGui::SetCursorPosX(win_size.x - m_line_height * 4.625f);
- ImGui::SetCursorPosY(0);
- if (imgui.button(" ", m_line_height * 2.f, win_size.y - 2 * m_line_height))
- {
- open_documentation();
- }
-
ImGui::PopStyleColor(5);
}
diff --git a/src/slic3r/GUI/HintNotification.hpp b/src/slic3r/GUI/HintNotification.hpp
index b345c9f248..d0444cd8fe 100644
--- a/src/slic3r/GUI/HintNotification.hpp
+++ b/src/slic3r/GUI/HintNotification.hpp
@@ -88,6 +88,7 @@ protected:
const float win_pos_x, const float win_pos_y) override;
virtual void render_minimize_button(ImGuiWrapper& imgui,
const float win_pos_x, const float win_pos_y) override {}
+
void render_preferences_button(ImGuiWrapper& imgui,
const float win_pos_x, const float win_pos_y);
void render_right_arrow_button(ImGuiWrapper& imgui,
diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp
index 883ff49150..2b40900114 100644
--- a/src/slic3r/GUI/MainFrame.cpp
+++ b/src/slic3r/GUI/MainFrame.cpp
@@ -1804,6 +1804,11 @@ static wxMenu* generate_help_menu()
append_menu_item(helpMenu, wxID_ANY, _L("Show Configuration Folder"), _L("Show Configuration Folder"),
[](wxCommandEvent&) { Slic3r::GUI::desktop_open_datadir_folder(); });
+ append_menu_item(helpMenu, wxID_ANY, _L("Show Tip of the Day"), _L("Show Tip of the Day"), [](wxCommandEvent&) {
+ wxGetApp().plater()->get_notification_manager()->push_hint_notification(false);
+ wxGetApp().plater()->get_current_canvas3D()->set_as_dirty();
+ });
+
// Report a bug
//append_menu_item(helpMenu, wxID_ANY, _L("Report Bug(TODO)"), _L("Report a bug of BambuStudio"),
// [](wxCommandEvent&) {
@@ -1823,11 +1828,6 @@ static wxMenu* generate_help_menu()
append_menu_item(helpMenu, wxID_ANY, about_title, about_title,
[](wxCommandEvent&) { Slic3r::GUI::about(); });
#endif
- append_menu_item(helpMenu, wxID_ANY, _L("Show Tip of the Day"), _L("Show Tip of the Day"), [](wxCommandEvent&) {
- wxGetApp().plater()->get_notification_manager()->push_hint_notification(false);
- wxGetApp().plater()->get_current_canvas3D()->set_as_dirty();
- });
-
append_menu_item(helpMenu, wxID_ANY, _L("Open Network Test"), _L("Open Network Test"), [](wxCommandEvent&) {
NetworkTestDialog dlg(wxGetApp().mainframe);
dlg.ShowModal();