Skip to content

Commit

Permalink
Made a change to the popup to fix text being cut off at low resolutio…
Browse files Browse the repository at this point in the history
…ns. (#73678)
  • Loading branch information
katemonster33 authored May 12, 2024
1 parent 0a771f6 commit b345d8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/popup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void query_popup_impl::draw_controls()

for( const std::string &line : parent->folded_msg ) {
nc_color col = parent->default_text_color;
draw_colored_text( line, col, float( msg_width ) );
draw_colored_text( line, col );
}

if( !parent->buttons.empty() ) {
Expand Down Expand Up @@ -87,10 +87,10 @@ void query_popup_impl::on_resized()
size_t frame_padding = size_t( ImGui::GetStyle().FramePadding.x * 2 );
size_t item_padding = size_t( ImGui::GetStyle().ItemSpacing.x );
// constexpr size_t vert_padding = 1;
size_t max_line_width = str_width_to_pixels( FULL_SCREEN_WIDTH );
size_t max_line_width = str_width_to_pixels( FULL_SCREEN_WIDTH - 3 );

// Fold message text
parent->folded_msg = foldstring( parent->text, max_line_width );
parent->folded_msg = foldstring( parent->text, FULL_SCREEN_WIDTH - 3 );

// Fold query buttons
const auto &folded_query = fold_query( parent->category, parent->pref_kbd_mode,
Expand Down

0 comments on commit b345d8e

Please sign in to comment.