diff options
author | Robin Gareus <robin@gareus.org> | 2014-09-09 01:29:47 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-09-09 01:29:47 +0200 |
commit | ca5eea2056216bf88d2d3658ce6a769fd3f16cfc (patch) | |
tree | 27c15a8312dd751a757705bbb029657a73788201 /gtk2_ardour/ardour_button.cc | |
parent | b81ceeaaa617eebe2ddf1b7f61032a64364154db (diff) |
add an easy way to debug button sizes
Diffstat (limited to 'gtk2_ardour/ardour_button.cc')
-rw-r--r-- | gtk2_ardour/ardour_button.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index 84708feb2f..095c0f6053 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -269,7 +269,14 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *) if (_pixbuf) { double x = rint((get_width() - _pixbuf->get_width()) * .5); const double y = rint((get_height() - _pixbuf->get_height()) * .5); - +#if 0 // DEBUG style (print on hover) + if (_hovering || (_elements & Inactive)) { + printf("%s: p:%dx%d (%dx%d)\n", + get_name().c_str(), + _pixbuf->get_width(), _pixbuf->get_height(), + get_width(), get_height()); + } +#endif if (_elements & Menu) { //if this is a DropDown with an icon, then we need to //move the icon left slightly to accomomodate the arrow @@ -369,7 +376,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *) if (!_pixbuf && ((_elements & Text)==Text) && !_text.empty()) { assert(_layout); #if 0 // DEBUG style (print on hover) - if (_hovering) { + if (_hovering || (_elements & Inactive)) { bool layout_font = true; Pango::FontDescription fd = _layout->get_font_description(); if (fd.gobj() == NULL) { |