X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fgtkmm2ext%2Fclick_box.cc;h=876c68f665240a6800d356eaef1c08738b46ade3;hb=8dcc28c9ad91baade9c30a2ec6d59a1f799dc654;hp=7b2e67d8ab21e153647e7e73cbb50c4f5e683c02;hpb=7aeead630aa9e293a0115ae448388acc3eeb87a8;p=ardour.git diff --git a/libs/gtkmm2ext/click_box.cc b/libs/gtkmm2ext/click_box.cc index 7b2e67d8ab..876c68f665 100644 --- a/libs/gtkmm2ext/click_box.cc +++ b/libs/gtkmm2ext/click_box.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 1999 Paul Barton-Davis + Copyright (C) 1999 Paul Barton-Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -115,7 +115,7 @@ ClickBox::set_label () void ClickBox::style_changed (const Glib::RefPtr&) { - layout->context_changed (); + layout->context_changed (); layout->get_pixel_size (twidth, theight); } @@ -135,21 +135,21 @@ ClickBox::on_expose_event (GdkEventExpose *ev) Glib::RefPtr fg_gc (style->get_fg_gc (Gtk::STATE_NORMAL)); Glib::RefPtr bg_gc (style->get_bg_gc (Gtk::STATE_NORMAL)); Glib::RefPtr win (get_window()); - + GdkRectangle base_rect; GdkRectangle draw_rect; gint x, y, width, height, depth; - + win->get_geometry (x, y, width, height, depth); - + base_rect.width = width; base_rect.height = height; base_rect.x = 0; base_rect.y = 0; - + gdk_rectangle_intersect (&ev->area, &base_rect, &draw_rect); win->draw_rectangle (bg_gc, true, draw_rect.x, draw_rect.y, draw_rect.width, draw_rect.height); - + if (twidth && theight) { win->draw_layout (fg_gc, (width - twidth) / 2, (height - theight) / 2, layout); }