Commit 6ac43b06 authored by ROOL's avatar ROOL 🤖
Browse files

Promote width variable

Detail:
  Promoted the colour panel variables used to store dimensions based off the window furniture sizes to use ints instead of chars as they could, at least theoretically, exceed 255 OS units on a custom desktop.
Admin:
  Submission for the Paint bounty.
parent 05b310f2
......@@ -695,8 +695,8 @@ colour_panel *colourpanel_new (main_sprite_window *sprite_window)
colpanel_width = coloursize * 2 + (4 << x_eig);
/*Make sure the sprite window stays wide enough to display the colour*
*panel without squashing the buttons*/
sprite_window->minwidth = (char)(get_horizontal_arrows_width (w) +
colpanel_width + (14 << x_eig));
sprite_window->minwidth = get_horizontal_arrows_width (w) +
colpanel_width + (14 << x_eig);
colpanel_wind.box.x0 = sprite_redraw_str.box.x0;
colpanel_wind.box.y1 = sprite_w_state.o.box.y0 - 2;
......
......@@ -113,7 +113,7 @@ typedef struct main_sprite_window
main_scaling_block blobsize;
zoom_resize_start resizestart;
struct colour_panel *colourpanel;
char minwidth;
int minwidth;
char gridcol;
BOOL read_only;
} main_sprite_window;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment