Reduce max button size; account for new stamp control row

...for rotation button added in 0.9.29
This commit is contained in:
Bill Kendrick 2023-05-04 22:43:59 -07:00
parent 11b6dc1b27
commit aa2235c8ba
2 changed files with 9 additions and 4 deletions

View file

@ -6,7 +6,7 @@ Copyright (c) 2002-2023
Various contributors (see below, and AUTHORS.txt)
https://tuxpaint.org/
2023.May.3 (0.9.30)
2023.May.4 (0.9.30)
* Improvements to Stamp tool:
---------------------------
* Avoid playing English descriptive sound for a stamp
@ -137,6 +137,11 @@ https://tuxpaint.org/
when returning from the temporary color pipette ([Ctrl] + click).
Bill Kendrick <bill@newbreedsoftware.com>
* Update maximum button size calculation to account for Stamp
rotation button added in 0.9.29. (Otherwise you could end up
seeing no stamps between the up/down scroll buttons!)
Bill Kendrick <bill@newbreedsoftware.com>
* Ports & Building:
-----------------
* Created "src/indent.sh", to run 'indent' against source files.

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
June 14, 2002 - May 3, 2023
June 14, 2002 - May 4, 2023
*/
#include "platform.h"
@ -854,10 +854,10 @@ static void set_max_buttonscale(void)
float max_w, max_h;
/* WINDOW_WIDTH / original size of tools columns + 9 buttons + tooloption columns */
max_w = (float)WINDOW_WIDTH / (gd_tools.cols * 48 + 9 * 48 + gd_toolopt.cols * 48);
max_w = (float)WINDOW_WIDTH / (gd_tools.cols * 48 + (9 * 48) + (gd_toolopt.cols * 48));
/* WINDOW_HEIGHT / original size of r_ttools.h + 5 buttons + colors rows + tux area */
max_h = (float)WINDOW_HEIGHT / (40 + 5 * 48 + gd_colors.rows * 48 + 56);
max_h = (float)WINDOW_HEIGHT / (40 + (6 * 48) + (gd_colors.rows * 48) + 56);
button_scale = min(max_w, max_h);
fprintf(stderr, "Will use a button size of %d\n", (int)(button_scale * ORIGINAL_BUTTON_SIZE));