Remove thin abstraction, directly call get_pixel_size

This commit is contained in:
Robin Gareus 2022-09-20 03:21:35 +02:00
parent 2a42743270
commit 1b7b3543e8
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
5 changed files with 6 additions and 6 deletions

View file

@ -70,7 +70,7 @@ EditorRegions::init ()
int bbt_width, height;
Glib::RefPtr<Pango::Layout> layout = _display.create_pango_layout (X_("000|000|000"));
Gtkmm2ext::get_pixel_size (layout, bbt_width, height);
layout->get_pixel_size (bbt_width, height);
TreeViewColumn* tvc;

View file

@ -78,9 +78,9 @@ EditorSources::init ()
int bbt_width, date_width, height;
Glib::RefPtr<Pango::Layout> layout = _display.create_pango_layout (X_("000|000|000"));
Gtkmm2ext::get_pixel_size (layout, bbt_width, height);
layout->get_pixel_size (bbt_width, height);
Glib::RefPtr<Pango::Layout> layout2 = _display.create_pango_layout (X_("2018-10-14 12:12:30"));
Gtkmm2ext::get_pixel_size (layout2, date_width, height);
layout2->get_pixel_size (date_width, height);
add_name_column ();

View file

@ -411,7 +411,7 @@ HSliderOption::HSliderOption (
_hscale.ensure_style ();
int width, height;
get_pixel_size (_hscale.create_pango_layout (X_("a piece of text that is as wide sliders should be")), width, height);
_hscale.create_pango_layout (X_("a piece of text that is as wide sliders should be"))->get_pixel_size (width, height);
_hscale.set_size_request (width, -1);
}

View file

@ -157,7 +157,7 @@ protected:
{
int w, h;
Glib::RefPtr<Pango::Layout> layout = _display.create_pango_layout (sizing_text);
Gtkmm2ext::get_pixel_size (layout, w, h);
layout->get_pixel_size (w, h);
return append_col (col, w);
}

View file

@ -84,7 +84,7 @@ TimeAxisViewItem::set_constant_heights ()
int height = 0;
layout->set_font_description (NAME_FONT);
get_pixel_size (layout, width, height);
layout->get_pixel_size (width, height);
layout = foo.create_pango_layout (X_("H")); /* just the ascender */