Mercurial > audlegacy-plugins
comparison src/skins/ui_skinned_textbox.c @ 3159:1ffcad5f406c
import new skins plugin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Fri, 22 May 2009 23:18:48 +0900 |
parents | b0f8da03187b |
children |
comparison
equal
deleted
inserted
replaced
3158:8b97f9560dc3 | 3159:1ffcad5f406c |
---|---|
361 cw2 = textbox->width - cw1; | 361 cw2 = textbox->width - cw1; |
362 gdk_pixbuf_copy_area(priv->pixbuf, 0, 0, cw2, textbox->height, obj, cw1, 0); | 362 gdk_pixbuf_copy_area(priv->pixbuf, 0, 0, cw2, textbox->height, obj, cw1, 0); |
363 } | 363 } |
364 } | 364 } |
365 | 365 |
366 #if 1 | |
366 ui_skinned_widget_draw_with_coordinates(widget, obj, textbox->width, textbox->height, | 367 ui_skinned_widget_draw_with_coordinates(widget, obj, textbox->width, textbox->height, |
367 widget->allocation.x, | 368 widget->allocation.x, |
368 widget->allocation.y, | 369 widget->allocation.y, |
369 priv->scaled); | 370 priv->scaled); |
371 #else | |
372 ui_skinned_widget_draw(widget, obj, textbox->width, textbox->height, priv->scaled); | |
373 #endif | |
370 | 374 |
371 g_object_unref(obj); | 375 g_object_unref(obj); |
372 } | 376 } |
373 | 377 |
374 return FALSE; | 378 return FALSE; |
519 | 523 |
520 | 524 |
521 if (priv->font == NULL) | 525 if (priv->font == NULL) |
522 return; | 526 return; |
523 | 527 |
528 #if 0 | |
524 textbox->height = priv->font_ascent; /* The real height of the text is | 529 textbox->height = priv->font_ascent; /* The real height of the text is |
525 ascent - descent (descent is negative), but we cut off descent pixels from | 530 ascent - descent (descent is negative), but we cut off descent pixels from |
526 the top to make it fit better. See textbox_generate_xfont_pixmap. */ | 531 the top to make it fit better. See textbox_generate_xfont_pixmap. */ |
532 //#else | |
533 textbox->height = priv->font_ascent; | |
534 if (textbox->height > priv->nominal_height) | |
535 textbox->y -= (textbox->height - priv->nominal_height) / 2; | |
536 else | |
537 textbox->height = priv->nominal_height; | |
538 #endif | |
539 #if 0 | |
540 textbox->height = priv->font_ascent = priv->font_descent; | |
541 printf("font_ascent = %d font_descent = %d textbox->height = %d \n", priv->font_ascent, priv->font_descent, textbox->height); | |
542 #endif | |
543 textbox->height = 40; | |
544 | |
527 } | 545 } |
528 | 546 |
529 void ui_skinned_textbox_set_text(GtkWidget *widget, const gchar *text) { | 547 void ui_skinned_textbox_set_text(GtkWidget *widget, const gchar *text) { |
530 g_return_if_fail(text != NULL); | 548 g_return_if_fail(text != NULL); |
531 UiSkinnedTextbox *textbox = UI_SKINNED_TEXTBOX (widget); | 549 UiSkinnedTextbox *textbox = UI_SKINNED_TEXTBOX (widget); |