Commit f8cb249
Retina resolution for textarea
Changed files (2)
Diff
@@ -222,7 +222,6 @@ public class OverViewItem : GLib.Object { g.add_help_lines (); - gx = 0; gx = ((w / glyph_scale) - glyph_width) / 2 - g.get_left_side_bearing (); gy = (h / glyph_scale) - 25 / glyph_scale; @@ -288,7 +287,7 @@ public class OverViewItem : GLib.Object { cc = new Context (cache); cc.scale(Screen.get_scale(), Screen.get_scale()); - cc.rectangle (0, 0, width - 1, 20 - 1);+ cc.rectangle (0, 0, width, 20 - 1); p = new Cairo.Pattern.linear (0.0, 0, 0.0, 20); Theme.gradient (p, "Overview Item 1", "Overview Item 2"); cc.set_source (p);@@ -307,7 +306,7 @@ public class OverViewItem : GLib.Object { cc = new Context (cache); cc.scale(Screen.get_scale(), Screen.get_scale()); - cc.rectangle (0, 0, width - 1, 20 - 1);+ cc.rectangle (0, 0, width, 20 - 1); Theme.color (cc, "Selected Overview Item"); @@ -1198,9 +1198,10 @@ public class TextArea : Widget { ty = paragraph.start_y; if (paragraph.cached_surface == null) { - paragraph.cached_surface = new Surface.similar (cr.get_target (), Cairo.Content.COLOR_ALPHA, (int) width + 2, paragraph.get_height () + (int) font_size + 2);+ paragraph.cached_surface = Screen.create_background_surface ((int) width + 2, paragraph.get_height () + (int) font_size + 2); cc = new Context ((!) paragraph.cached_surface);-+ cc.scale (Screen.get_scale(), Screen.get_scale());+ foreach (Text next_word in paragraph.words) { if (next_word.text != "\n") { next_word.draw_at_top (cc, next_word.widget_x, next_word.widget_y - ty);@@ -1210,8 +1211,10 @@ public class TextArea : Widget { if (likely (paragraph.cached_surface != null)) { // FIXME: subpixel offset in text area- cr.set_source_surface ((!) paragraph.cached_surface, (int) (x + tx), (int) (widget_y + paragraph.start_y - font_size + padding));- cr.paint ();+ Screen.paint_background_surface(cr, + (!) paragraph.cached_surface,+ (int) (x + tx),+ (int) (widget_y + paragraph.start_y - font_size + padding)); } else { warning ("No paragraph image."); }