Author: bklaas
Date: Tue Feb 9 08:19:55 2010
New Revision: 8468
URL: http://svn.slimdevices.com/jive?rev=8468&view=rev
Log:
Fixed Bug: 15570
Description: don't call jive_surface_set_offset when textarea is used in menu
context
Modified:
7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_textarea.c
Modified: 7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_textarea.c
URL:
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_textarea.c?rev=8468&r1=8467&r2=8468&view=diff
==============================================================================
--- 7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_textarea.c (original)
+++ 7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_textarea.c Tue Feb 9
08:19:55 2010
@@ -324,6 +324,7 @@
int i, top_line, visible_lines, bottom_line, num_lines;
Sint16 old_pixel_offset_x, old_pixel_offset_y, new_pixel_offset_y;
int y_offset = 0;
+ bool is_menu_child = false;
/* stack is:
* 1: widget
@@ -372,6 +373,11 @@
//Fairly ugly hack to support textarea as a menu item for
multiline_text style
//Otherwise, for the extra hidden menu item for smooth scrolling, the
textarea will draw into iconbar
lua_getfield(L, 1, "isMenuChild");
+ if (lua_toboolean(L, -1)) {
+ is_menu_child = true;
+ }
+ lua_pop(L, 1);
+/*
if (lua_toboolean(L, -1)) {
lua_getfield(L, 1, "parent"); //group
lua_getfield(L, -1, "parent"); //menu
@@ -395,8 +401,7 @@
lua_pop(L, 1);
}
lua_pop(L, 1);
-
-
+*/
jive_surface_push_clip(srf, &new_clip, &pop_clip);
@@ -429,7 +434,9 @@
lua_pop(L, 1);
jive_surface_get_offset(srf, &old_pixel_offset_x, &old_pixel_offset_y);
- jive_surface_set_offset(srf, old_pixel_offset_x, new_pixel_offset_y);
+ if (!is_menu_child) {
+ jive_surface_set_offset(srf, old_pixel_offset_x,
new_pixel_offset_y);
+ }
bottom_line = top_line + visible_lines;
@@ -477,7 +484,9 @@
y += peer->line_height;
}
- jive_surface_set_offset(srf, old_pixel_offset_x, old_pixel_offset_y);
+ if (!is_menu_child) {
+ jive_surface_set_offset(srf, old_pixel_offset_x,
old_pixel_offset_y);
+ }
jive_surface_set_clip(srf, &pop_clip);
/* draw scrollbar */
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins