/[svn]/gigedit/trunk/src/gigedit/regionchooser.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/regionchooser.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2626 by schoenebeck, Mon Apr 21 17:49:17 2014 UTC revision 2627 by schoenebeck, Thu Jun 12 16:12:55 2014 UTC
# Line 30  Line 30 
30    
31  #include "global.h"  #include "global.h"
32    
33  #define REGION_BLOCK_HEIGHT             20  #define REGION_BLOCK_HEIGHT             30
34  #define KEYBOARD_HEIGHT                 40  #define KEYBOARD_HEIGHT                 40
35    
36  void SortedRegions::update(gig::Instrument* instrument) {  void SortedRegions::update(gig::Instrument* instrument) {
# Line 339  void RegionChooser::draw_regions(const C Line 339  void RegionChooser::draw_regions(const C
339          layout->set_alignment(Pango::ALIGN_CENTER);          layout->set_alignment(Pango::ALIGN_CENTER);
340          layout->set_text(Glib::ustring("*** ") + _("Right click here to create a region.") + " ***");          layout->set_text(Glib::ustring("*** ") + _("Right click here to create a region.") + " ***");
341          layout->set_width(get_width() * Pango::SCALE);          layout->set_width(get_width() * Pango::SCALE);
342          Gdk::Cairo::set_source_rgba(cr, red);          //layout->set_height(get_height() * Pango::SCALE);
343            layout->set_spacing(10);
344            Gdk::Cairo::set_source_rgba(cr, red);        
345            // get the text dimensions
346            Pango::Rectangle rect = layout->get_logical_extents();
347            int text_width, text_height;
348            layout->get_pixel_size(text_width, text_height);
349            cr->move_to(0, (REGION_BLOCK_HEIGHT - text_height) / 2);
350  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 16) || GTKMM_MAJOR_VERSION < 2  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 16) || GTKMM_MAJOR_VERSION < 2
351          pango_cairo_show_layout(cr->cobj(), layout->gobj());          pango_cairo_show_layout(cr->cobj(), layout->gobj());
352  #else  #else

Legend:
Removed from v.2626  
changed lines
  Added in v.2627

  ViewVC Help
Powered by ViewVC