479 |
479 |
480 int width = 0; |
480 int width = 0; |
481 int height = 0; |
481 int height = 0; |
482 XtVaGetValues(widget, XmNwidth, &width, XmNheight, &height, NULL); |
482 XtVaGetValues(widget, XmNwidth, &width, XmNheight, &height, NULL); |
483 int button_width = width / 4; |
483 int button_width = width / 4; |
484 int button_height = 0; |
|
485 int x = 0; |
484 int x = 0; |
486 UCX_FOREACH(elm, v->tabs) { |
485 UCX_FOREACH(elm, v->tabs) { |
487 UiTab *tab = elm->data; |
486 UiTab *tab = elm->data; |
488 XtVaSetValues( |
487 XtVaSetValues( |
489 tab->tab_button, |
488 tab->tab_button, |
490 XmNx, x, |
489 XmNx, x, |
491 XmNy, 0, |
490 XmNy, 0, |
492 XmNwidth, |
491 XmNwidth, |
493 button_width, |
492 button_width, |
494 XmNheight, |
493 |
495 v->height, |
|
496 NULL); |
494 NULL); |
497 x += button_width; |
495 x += button_width; |
498 } |
496 } |
499 |
497 |
500 if(height <= v->height) { |
498 if(height <= v->height) { |
501 XtVaSetValues(widget, XmNheight, v->height + (v->height/7), NULL); |
499 XtVaSetValues(widget, XmNheight, v->height + 4, NULL); |
502 } |
500 } |
503 } |
501 } |
504 |
502 |
505 static void ui_tabbar_expose(Widget widget, XtPointer udata, XtPointer cdata) { |
503 static void ui_tabbar_expose(Widget widget, XtPointer udata, XtPointer cdata) { |
506 MotifTabbedPane *v = (MotifTabbedPane*)udata; |
504 MotifTabbedPane *v = (MotifTabbedPane*)udata; |