summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-06-13 22:05:29 +0200
committerRobin Gareus <robin@gareus.org>2015-06-13 22:05:29 +0200
commitb86a8edcff801236792c066e2c2bfd237d30ca4b (patch)
tree6f70218c9c4bafcd95c221169919527546162fdb
parentc8e16998bf98753a4e5fc6db33d5a53e9ef55ce3 (diff)
NOOP, reindent code.
-rw-r--r--libs/canvas/text.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/libs/canvas/text.cc b/libs/canvas/text.cc
index 399488af80..78f7d31e48 100644
--- a/libs/canvas/text.cc
+++ b/libs/canvas/text.cc
@@ -107,25 +107,25 @@ void
Text::__redraw (Glib::RefPtr<Pango::Layout> layout) const
{
#ifdef __APPLE__
- if (_width_correction < 0.0) {
- // Pango returns incorrect text width on some OS X
- // So we have to make a correction
- // To determine the correct indent take the largest symbol for which the width is correct
- // and make the calculation
- Gtk::Window win;
- Gtk::Label foo;
- win.add (foo);
-
- int width = 0;
- int height = 0;
- Glib::RefPtr<Pango::Layout> test_layout = foo.create_pango_layout ("H");
+ if (_width_correction < 0.0) {
+ // Pango returns incorrect text width on some OS X
+ // So we have to make a correction
+ // To determine the correct indent take the largest symbol for which the width is correct
+ // and make the calculation
+ Gtk::Window win;
+ Gtk::Label foo;
+ win.add (foo);
+
+ int width = 0;
+ int height = 0;
+ Glib::RefPtr<Pango::Layout> test_layout = foo.create_pango_layout ("H");
if (_font_description) {
test_layout->set_font_description (*_font_description);
}
- test_layout->get_pixel_size (width, height);
-
- _width_correction = width*1.5;
- }
+ test_layout->get_pixel_size (width, height);
+
+ _width_correction = width*1.5;
+ }
#else
/* don't bother with a conditional here */
_width_correction = 0.0;