Changeset 491
- Timestamp:
- 03/17/2008 09:30:56 (5 months ago)
- Files:
-
- 1 modified
-
trunk/shoes/ruby.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/shoes/ruby.c
r490 r491 528 528 } 529 529 530 #define CHANGED_COORDS() self_t->place. x != place.x || self_t->place.y != place.y || self_t->place.w != place.w || self_t->place.h - HEIGHT_PAD != place.h530 #define CHANGED_COORDS() self_t->place.ix != place.ix || self_t->place.iy != place.iy || self_t->place.iw != place.iw || self_t->place.ih - HEIGHT_PAD != place.ih 531 531 #define PLACE_COORDS() place.h -= HEIGHT_PAD; place.ih -= HEIGHT_PAD; self_t->place = place 532 532 … … 539 539 540 540 #define PLACE_CONTROL() \ 541 PLACE_COORDS(); \ 541 542 gtk_widget_set_size_request(self_t->ref, place.iw, place.ih); \ 542 543 gtk_layout_put(GTK_LAYOUT(canvas->slot.canvas), self_t->ref, place.ix, place.iy); \ 543 544 gtk_widget_show_all(self_t->ref); \ 544 PLACE_COORDS();545 545 546 546 #define REPAINT_CONTROL() \ 547 if (CHANGED_COORDS()) { \ 548 gtk_layout_move(GTK_LAYOUT(canvas->slot.canvas), self_t->ref, place.ix, place.iy); \ 549 gtk_widget_set_size_request(self_t->ref, place.iw, place.ih); \ 550 PLACE_COORDS(); \ 551 } \ 547 PLACE_COORDS(); \ 548 gtk_layout_move(GTK_LAYOUT(canvas->slot.canvas), self_t->ref, place.ix, place.iy); \ 549 gtk_widget_set_size_request(self_t->ref, place.iw, place.ih); \ 552 550 if (canvas->slot.expose != NULL) \ 553 551 { \ … … 568 566 #define PLACE_CONTROL() \ 569 567 HIRect hr; \ 568 PLACE_COORDS(); \ 570 569 hr.origin.x = place.ix; hr.origin.y = place.iy; \ 571 hr.size.width = place.iw; hr.size.height = place.ih - HEIGHT_PAD; \570 hr.size.width = place.iw; hr.size.height = place.ih; \ 572 571 HIViewAddSubview(canvas->slot.view, self_t->ref); \ 573 572 SetControlCommandID(self_t->ref, SHOES_CONTROL1 + RARRAY_LEN(canvas->slot.controls)); \ … … 576 575 HIViewSetVisible(self_t->ref, true); \ 577 576 rb_ary_push(canvas->slot.controls, self); \ 578 PLACE_COORDS();579 577 580 578 #define REPAINT_CONTROL() \ 581 if (CHANGED_COORDS()) { \ 582 HIRect hr; \ 583 hr.origin.x = place.ix; hr.origin.y = place.iy; \ 584 hr.size.width = place.iw; hr.size.height = place.ih - HEIGHT_PAD; \ 585 HIViewSetFrame(self_t->ref, &hr); \ 586 PLACE_COORDS(); \ 587 } 579 HIRect hr; \ 580 PLACE_COORDS(); \ 581 hr.origin.x = place.ix; hr.origin.y = place.iy; \ 582 hr.size.width = place.iw; hr.size.height = place.ih; \ 583 HIViewSetFrame(self_t->ref, &hr); 588 584 589 585 static CFStringRef … … 627 623 #define REPAINT_CONTROL() \ 628 624 place.iy -= canvas->slot.scrolly; \ 629 if (CHANGED_COORDS()) { \ 630 PLACE_CONTROL(); \ 631 } \ 625 PLACE_CONTROL(); \ 632 626 place.iy += canvas->slot.scrolly 633 627
