Commit f190a30f authored by claes's avatar claes

Textsize in pulldown menu fixed

parent a5778dda
......@@ -537,14 +537,15 @@ void GrowAnnot::convert( glow_eConvert version)
void GrowAnnot::get_annotation_info( void *node, int *t_size, glow_eDrawType *t_drawtype,
glow_eDrawType *t_color)
{
#if 0
double trf_scale = trf.vertical_scale( &((GrowNode *)node)->trf);
int idx = int( trf_scale * ctx->zoom_factor_y / ctx->base_zoom_factor * (text_size +4) - 4);
if ( idx < 0)
idx = 0;
idx = min( idx, DRAW_TYPE_SIZE-1);
#endif
*t_color = ((GrowCtx *)ctx)->get_drawtype( color_drawtype, glow_eDrawType_LineHighlight,
0, (GrowNode *)node, 2);
*t_size = idx;
*t_size = text_size;
*t_drawtype = draw_type;
}
......@@ -120,7 +120,7 @@ void GrowMenu::draw( GlowTransform *t, int highlight, int hot, void *node, void
if ( !(display_level & ctx->display_level))
return;
int idx;
int text_idx = int( ctx->zoom_factor_y / ctx->base_zoom_factor * (text_size +4) - 4);
int text_idx = int( trf.vertical_scale(t) * ctx->zoom_factor_y / ctx->base_zoom_factor * (text_size +4) - 4);
text_idx = min( text_idx, DRAW_TYPE_SIZE-1);
text_idx = max( 0, text_idx);
......
......@@ -2121,7 +2121,7 @@ void GrowNode::annot_input_event( glow_eEvent event, int keycode)
}
int GrowNode::get_annotation_info( int num, int *t_size, glow_eDrawType *t_drawtype, glow_eDrawType *t_color,
glow_eDrawType *bg_color)
glow_eDrawType *bg_color, double *scale)
{
int sts;
......@@ -2130,6 +2130,7 @@ int GrowNode::get_annotation_info( int num, int *t_size, glow_eDrawType *t_drawt
*bg_color = glow_eDrawType_No;
sts = nc->get_annotation_info( (void*)this, num, t_size, t_drawtype, t_color);
*scale = trf.vertical_scale(0);
return sts;
}
......
......@@ -904,7 +904,7 @@ class GrowNode : public GlowNode {
\return 0 if annotation doesn't exist, else 1.
*/
int get_annotation_info( int num, int *t_size, glow_eDrawType *t_drawtype, glow_eDrawType *t_color,
glow_eDrawType *bg_color);
glow_eDrawType *bg_color, double *scale);
//! Destructor
/*! Remove the object from the context and erase it from the screen.
......
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