mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Merge branch 'dk_notifications'
This commit is contained in:
		
						commit
						7ad482f63c
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		|  | @ -6,6 +6,7 @@ | |||
| #include "PrintHostDialogs.hpp" | ||||
| #include "wxExtensions.hpp" | ||||
| #include "../Utils/PrintHost.hpp" | ||||
| #include "libslic3r/Config.hpp" | ||||
| 
 | ||||
| #include <boost/algorithm/string.hpp> | ||||
| #include <boost/log/trivial.hpp> | ||||
|  | @ -304,8 +305,8 @@ void NotificationManager::PopNotification::count_lines() | |||
| 	} | ||||
| 	// hypertext calculation
 | ||||
| 	if (!m_hypertext.empty()) { | ||||
| 		int prev_end = m_endlines.size() > 1 ? m_endlines[m_endlines.size() - 2] : 0; | ||||
| 		if (ImGui::CalcTextSize((text.substr(prev_end, last_end - prev_end) + m_hypertext).c_str()).x > m_window_width - m_window_width_offset) { | ||||
| 		int prev_end = m_endlines.size() > 1 ? m_endlines[m_endlines.size() - 2] : 0; // m_endlines.size() - 2 because we are fitting hypertext instead of last endline
 | ||||
| 		if (ImGui::CalcTextSize((escape_string_cstyle(text.substr(prev_end, last_end - prev_end)) + m_hypertext).c_str()).x > m_window_width - m_window_width_offset) { | ||||
| 			m_endlines.push_back(last_end); | ||||
| 			m_lines_count++; | ||||
| 		} | ||||
|  | @ -366,7 +367,7 @@ void NotificationManager::PopNotification::render_text(ImGuiWrapper& imgui, cons | |||
| 			} | ||||
| 			//hyperlink text
 | ||||
| 			if (!m_hypertext.empty()) { | ||||
| 				render_hypertext(imgui, x_offset + ImGui::CalcTextSize((line + " ").c_str()).x, starting_y + (m_lines_count - 1) * shift_y, m_hypertext); | ||||
| 				render_hypertext(imgui, x_offset + ImGui::CalcTextSize((line + (line.empty() ? "" : " ")).c_str()).x, starting_y + (m_lines_count - 1) * shift_y, m_hypertext); | ||||
| 			} | ||||
| 			 | ||||
| 			 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 David Kocik
						David Kocik