From 0a06e39e2cb64037d471423e7e9ca0eb5e3d8f4c Mon Sep 17 00:00:00 2001 From: satbaby Date: Wed, 2 May 2012 18:05:07 +0200 Subject: [PATCH 1/2] buttons.cpp:fix to workaround for to small screen --- src/gui/widget/buttons.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index c2a02c0a0..001ebb91d 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -132,7 +132,7 @@ int paintButtons( const int &x, //workaround for to small screen (1) int skip_last_button_txt = false; - if((w_button*cnt) >(uint) w_footer){ + if((w_footer > 0 && w_button*cnt) >(uint) w_footer){ w_button= ((w_footer+w_max_icon)/(cnt)); skip_last_button_txt = true; } From c4c5e6cd4cf947e95f48a9f03dd7af32f24bef8f Mon Sep 17 00:00:00 2001 From: satbaby Date: Wed, 2 May 2012 18:31:20 +0200 Subject: [PATCH 2/2] buttons.cpp:fix to workaround for to small screen --- src/gui/widget/buttons.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index 001ebb91d..bffb99a66 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -132,7 +132,7 @@ int paintButtons( const int &x, //workaround for to small screen (1) int skip_last_button_txt = false; - if((w_footer > 0 && w_button*cnt) >(uint) w_footer){ + if( (w_footer > 0) && ( (w_button*cnt) > (uint) w_footer) ){ w_button= ((w_footer+w_max_icon)/(cnt)); skip_last_button_txt = true; }