aboutsummaryrefslogtreecommitdiff
path: root/liblogdiag
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-02-14 08:21:30 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-02-14 08:21:30 +0100
commit1730064ed3a38f5b4467d80df3cb645d12b858ba (patch)
treefcd98c4f6c0ba049a2528cb14fa1fec847b71c6a /liblogdiag
parent8ac4674a8eef0493443383da49c2f604c73b0b17 (diff)
downloadlogdiag-1730064ed3a38f5b4467d80df3cb645d12b858ba.tar.gz
logdiag-1730064ed3a38f5b4467d80df3cb645d12b858ba.tar.xz
logdiag-1730064ed3a38f5b4467d80df3cb645d12b858ba.zip
Avoid too wide items in symbol menus.
Diffstat (limited to 'liblogdiag')
-rw-r--r--liblogdiag/ld-library-toolbar.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/liblogdiag/ld-library-toolbar.c b/liblogdiag/ld-library-toolbar.c
index 2c4281a..4ce348d 100644
--- a/liblogdiag/ld-library-toolbar.c
+++ b/liblogdiag/ld-library-toolbar.c
@@ -606,6 +606,8 @@ on_category_toggle (GtkToggleButton *toggle_button, gpointer user_data)
*/
item->scale = data->menu_height * 0.5
/ MAX (ABS (area.y), ABS (area.y + area.height)) * 0.5;
+ if (item->scale * area.width > 1.5 * data->menu_height)
+ item->scale = 1.5 * data->menu_height / area.width;
item->width = data->menu_height * 0.5 + item->scale * area.width;
item->dx = item->width * 0.5 + item->scale
* (area.width * 0.5 - ABS (area.x + area.width));