Skip to content

Commit

Permalink
fix: remove leftover height definition in bodygraph ui (CleverRaven#6…
Browse files Browse the repository at this point in the history
  • Loading branch information
dseguin authored Jan 23, 2023
1 parent dc68afa commit beda1c4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/bodygraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ void bodygraph::check() const
*/

#define BPGRAPH_HEIGHT 24

using part_tuple =
std::tuple<bodypart_id, const sub_body_part_type *, const bodygraph_part *, bool>;

Expand Down Expand Up @@ -278,7 +276,7 @@ void bodygraph_display::init_ui_windows()
{
partlist_width = 18;
info_width = 18;
all_height = clamp( BPGRAPH_HEIGHT + 20, 0, TERMY );
all_height = clamp( BPGRAPH_MAXROWS + 24, 0, TERMY );

int base_width = BPGRAPH_MAXCOLS + partlist_width + info_width + 4;
all_width = clamp( base_width + 40, 0, TERMX );
Expand Down Expand Up @@ -401,7 +399,7 @@ void bodygraph_display::draw_info()
werase( w_info );
if( std::get<3>( partlist[sel_part] ) ) {
int y = 0;
for( unsigned i = top_info; i < info_txt.size() && y < BPGRAPH_HEIGHT - 2; i++, y++ ) {
for( unsigned i = top_info; i < info_txt.size() && y < all_height - 2; i++, y++ ) {
if( info_txt[i] == "--" ) {
for( int x = 1; x < info_width - 2; x++ ) {
mvwputch( w_info, point( x, y ), c_dark_gray, LINE_OXOX );
Expand Down

0 comments on commit beda1c4

Please sign in to comment.