ENH: thumbnail: improve the effect of thumbnail
1. adjust the background color 2. add a bit more emission factor 3. adjust the thumbnail rendering size in preview 4. change the font to white of thumbnail preview Change-Id: Ifbcac94383608054759a7a31ec357233c7fb57a9 (cherry picked from commit ac577934f11edd56069584d1450734df59e17989)
This commit is contained in:
parent
4b5fa4fe58
commit
59a7cd3ef9
|
@ -5519,8 +5519,14 @@ void GLCanvas3D::render_thumbnail_internal(ThumbnailData& thumbnail_data, const
|
||||||
//if (thumbnail_params.transparent_background)
|
//if (thumbnail_params.transparent_background)
|
||||||
if (for_picking)
|
if (for_picking)
|
||||||
glsafe(::glClearColor(0.f, 0.f, 0.f, 0.f));
|
glsafe(::glClearColor(0.f, 0.f, 0.f, 0.f));
|
||||||
else
|
else {
|
||||||
glsafe(::glClearColor(0.906f, 0.906f, 0.906f, 1.0f));
|
//glsafe(::glClearColor(0.906f, 0.906f, 0.906f, 1.0f));
|
||||||
|
//glsafe(::glClearColor(0.50f, 0.5f, 0.5f, 1.0f));
|
||||||
|
//glsafe(::glClearColor(0.121568f, 0.121568f, 0.121568f, 1.0f));
|
||||||
|
glsafe(::glClearColor(0.17647f, 0.17647f, 0.17647f, 1.0f));
|
||||||
|
//glsafe(::glClearColor(0.37647f, 0.37647f, 0.37647f, 0.5f)); too lite
|
||||||
|
//glsafe(::glClearColor(0.23529f, 0.26666f, 0.2745f, 1.0f));
|
||||||
|
}
|
||||||
|
|
||||||
glsafe(::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
|
glsafe(::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
|
||||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||||
|
@ -5574,7 +5580,7 @@ void GLCanvas3D::render_thumbnail_internal(ThumbnailData& thumbnail_data, const
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
shader->start_using();
|
shader->start_using();
|
||||||
shader->set_uniform("emission_factor", 0.0f);
|
shader->set_uniform("emission_factor", 0.1f);
|
||||||
for (GLVolume* vol : visible_volumes) {
|
for (GLVolume* vol : visible_volumes) {
|
||||||
//BBS set render color for thumbnails
|
//BBS set render color for thumbnails
|
||||||
curr_color[0] = vol->color[0];
|
curr_color[0] = vol->color[0];
|
||||||
|
@ -7301,7 +7307,7 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
|
||||||
|
|
||||||
bool is_hovered = false;
|
bool is_hovered = false;
|
||||||
|
|
||||||
m_sel_plate_toolbar.set_icon_size(80.0f * f_scale, 80.0f * f_scale);
|
m_sel_plate_toolbar.set_icon_size(100.0f * f_scale, 100.0f * f_scale);
|
||||||
|
|
||||||
float button_width = m_sel_plate_toolbar.icon_width;
|
float button_width = m_sel_plate_toolbar.icon_width;
|
||||||
float button_height = m_sel_plate_toolbar.icon_height;
|
float button_height = m_sel_plate_toolbar.icon_height;
|
||||||
|
@ -7321,7 +7327,9 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
|
||||||
ImVec4 button_active = ImVec4(0.12f, 0.56f, 0.92, 1.0f);
|
ImVec4 button_active = ImVec4(0.12f, 0.56f, 0.92, 1.0f);
|
||||||
ImVec4 button_hover = ImVec4(0.67f, 0.67f, 0.67, 1.0f);
|
ImVec4 button_hover = ImVec4(0.67f, 0.67f, 0.67, 1.0f);
|
||||||
ImVec4 scroll_col = ImVec4(0.77f, 0.77f, 0.77f, 1.0f);
|
ImVec4 scroll_col = ImVec4(0.77f, 0.77f, 0.77f, 1.0f);
|
||||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.f, 0.f, 0.f, 1.0f));
|
//ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.f, 0.f, 0.f, 1.0f));
|
||||||
|
//use white text as the background switch to black
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 1.0f, 1.0f));
|
||||||
ImGui::PushStyleColor(ImGuiCol_WindowBg, window_bg);
|
ImGui::PushStyleColor(ImGuiCol_WindowBg, window_bg);
|
||||||
ImGui::PushStyleColor(ImGuiCol_ScrollbarBg, window_bg);
|
ImGui::PushStyleColor(ImGuiCol_ScrollbarBg, window_bg);
|
||||||
ImGui::PushStyleColor(ImGuiCol_ScrollbarGrabActive, scroll_col);
|
ImGui::PushStyleColor(ImGuiCol_ScrollbarGrabActive, scroll_col);
|
||||||
|
|
Loading…
Reference in New Issue