mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-17 18:12:01 +01:00
minor code improvement
This commit is contained in:
parent
469a23a183
commit
543df9f681
1 changed files with 4 additions and 5 deletions
|
@ -591,19 +591,18 @@ gtkDrawDrawRemText( DrawCtx* p_dctx, const XP_Rect* r, XP_U16 nTilesLeft,
|
||||||
XP_U16 left = r->left;
|
XP_U16 left = r->left;
|
||||||
XP_U16 top = r->top;
|
XP_U16 top = r->top;
|
||||||
XP_Bool draw = !widthP;
|
XP_Bool draw = !widthP;
|
||||||
|
PangoLayout* layout = dctx->layout[LAYOUT_SMALL];
|
||||||
|
|
||||||
sprintf( buf, "rem:%d", nTilesLeft );
|
sprintf( buf, "rem:%d", nTilesLeft );
|
||||||
|
pango_layout_set_text( layout, buf, strlen(buf) );
|
||||||
pango_layout_set_text( dctx->layout[LAYOUT_SMALL], buf, strlen(buf) );
|
|
||||||
|
|
||||||
if ( draw ) {
|
if ( draw ) {
|
||||||
gdk_draw_layout_with_colors( DRAW_WHAT(dctx), dctx->drawGC,
|
gdk_draw_layout_with_colors( DRAW_WHAT(dctx), dctx->drawGC,
|
||||||
left, top, dctx->layout[LAYOUT_SMALL],
|
left, top, layout,
|
||||||
&dctx->black, NULL );
|
&dctx->black, NULL );
|
||||||
} else {
|
} else {
|
||||||
int width, height;
|
int width, height;
|
||||||
pango_layout_get_pixel_size( dctx->layout[LAYOUT_SMALL],
|
pango_layout_get_pixel_size( layout, &width, &height );
|
||||||
&width, &height );
|
|
||||||
|
|
||||||
if ( height > HOR_SCORE_HEIGHT ) {
|
if ( height > HOR_SCORE_HEIGHT ) {
|
||||||
height = HOR_SCORE_HEIGHT;
|
height = HOR_SCORE_HEIGHT;
|
||||||
|
|
Loading…
Reference in a new issue