From 1b7b3543e8ab844a2b18499b4c4e0f69bb02a9a9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 20 Sep 2022 03:21:35 +0200 Subject: [PATCH] Remove thin abstraction, directly call get_pixel_size --- gtk2_ardour/editor_regions.cc | 2 +- gtk2_ardour/editor_sources.cc | 4 ++-- gtk2_ardour/option_editor.cc | 2 +- gtk2_ardour/region_list_base.h | 2 +- gtk2_ardour/time_axis_view_item.cc | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc index f687a14344..c5bbdcc06b 100644 --- a/gtk2_ardour/editor_regions.cc +++ b/gtk2_ardour/editor_regions.cc @@ -70,7 +70,7 @@ EditorRegions::init () int bbt_width, height; Glib::RefPtr 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; diff --git a/gtk2_ardour/editor_sources.cc b/gtk2_ardour/editor_sources.cc index 1369605aee..fb62a1070f 100644 --- a/gtk2_ardour/editor_sources.cc +++ b/gtk2_ardour/editor_sources.cc @@ -78,9 +78,9 @@ EditorSources::init () int bbt_width, date_width, height; Glib::RefPtr 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 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 (); diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index b66ad8c4a5..2726ce6164 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -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); } diff --git a/gtk2_ardour/region_list_base.h b/gtk2_ardour/region_list_base.h index 38a7af5b10..dce5401d94 100644 --- a/gtk2_ardour/region_list_base.h +++ b/gtk2_ardour/region_list_base.h @@ -157,7 +157,7 @@ protected: { int w, h; Glib::RefPtr 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); } diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index a80d914e6f..bc1263839a 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -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 */