[gitg] Correctly calculate font size in pixels instead of points
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Correctly calculate font size in pixels instead of points
- Date: Tue, 30 Oct 2012 21:21:57 +0000 (UTC)
commit 629a457efde79397b21feecae03ec1af5606eadf
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Tue Oct 30 22:21:10 2012 +0100
Correctly calculate font size in pixels instead of points
libgitg-gtk/gitg-gtk-diff-view.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libgitg-gtk/gitg-gtk-diff-view.vala b/libgitg-gtk/gitg-gtk-diff-view.vala
index 14be23e..353d4dd 100644
--- a/libgitg-gtk/gitg-gtk-diff-view.vala
+++ b/libgitg-gtk/gitg-gtk-diff-view.vala
@@ -143,6 +143,8 @@ namespace GitgGtk
{
size = s / Pango.SCALE;
}
+
+ size = (uint)(size * get_screen().get_resolution() / 72.0);
}
}
@@ -160,6 +162,8 @@ namespace GitgGtk
parse_font(d_fontsettings.get_string("font-name"), ref fname, ref fsize);
+ stdout.printf("%u\n", fsize);
+
settings.default_font_family = fname;
settings.default_font_size = fsize;
@@ -219,7 +223,7 @@ namespace GitgGtk
});
// Load the diff base html
- var uri = "gitg-diff:///resource/org/gnome/gitg/gtk/diff-view/base.html?viewid=" + s_diff_id.to_string();
+ var uri = "gitg-diff:///resource/org/gnome/gitg/gtk/diff-view/diff-view.html?viewid=" + s_diff_id.to_string();
// Add custom js as a query parameter
if (custom_js != null)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]