Skip to content

Commit

Permalink
Fix the selected rectangle not being very visible in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrm committed Feb 27, 2024
1 parent 5b0cd55 commit 7f769be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pdf_viewer/pdf_view_opengl_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3630,8 +3630,9 @@ void PdfViewOpenGLWidget::render_selected_rectangle() {
enable_stencil();

write_to_stencil();
float rectangle_color[] = { 0.0f, 0.0f, 0.0f };
glUniform3fv(shared_gl_objects.highlight_color_uniform_location, 1, rectangle_color);
float rectangle_color_[] = { 0.0f, 0.0f, 0.0f };
auto rectangle_color = cc3(rectangle_color_);
glUniform3fv(shared_gl_objects.highlight_color_uniform_location, 1, &rectangle_color[0]);
glUniform1f(shared_gl_objects.highlight_opacity_uniform_location, 0.3f);
if (!(selected_rectangle.value() == fz_empty_rect)) {
render_highlight_absolute(shared_gl_objects.highlight_program, selected_rectangle.value(), HRF_FILL | HRF_BORDER);
Expand Down

0 comments on commit 7f769be

Please sign in to comment.