From 2cbbc6c69db6e69b1fc2959aeaa38e9c055964cb Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 13 Oct 2015 19:44:16 -0400 Subject: [PATCH] Removed the DPI fields from uiAreaDrawParams. We no longer worry about DPI. --- darwin/area.m | 2 -- ui.h | 3 --- unix/area.c | 8 -------- 3 files changed, 13 deletions(-) diff --git a/darwin/area.m b/darwin/area.m index 310ca3c8..6f5f37cd 100644 --- a/darwin/area.m +++ b/darwin/area.m @@ -130,8 +130,6 @@ uiDarwinDefineControl( dp.ClipWidth = r.size.width; dp.ClipHeight = r.size.height; - // TODO DPI - av = (areaView *) [self superview]; dp.HScrollPos = [av hscrollPos]; dp.VScrollPos = [av vscrollPos]; diff --git a/ui.h b/ui.h index 9cebd73d..9b39c74d 100644 --- a/ui.h +++ b/ui.h @@ -283,9 +283,6 @@ struct uiAreaDrawParams { intmax_t ClipWidth; intmax_t ClipHeight; - int DPIX; - int DPIY; - intmax_t HScrollPos; intmax_t VScrollPos; }; diff --git a/unix/area.c b/unix/area.c index 2d4bc8d4..6650f07d 100644 --- a/unix/area.c +++ b/unix/area.c @@ -167,14 +167,6 @@ static gboolean areaWidget_draw(GtkWidget *w, cairo_t *cr) dp.ClipWidth = clipX1 - clipX0; dp.ClipHeight = clipY1 - clipY0; - // on GTK+ you're not supposed to care about high-DPI scaling - // instead, pango handles scaled text rendering for us - // this doesn't handle non-text cases, but neither do other GTK+ programs, so :/ - // wayland and mir GDK are hardcoded to 96dpi; X11 uses this as a fallback - // thanks to hergertme in irc.gimp.net/#gtk+ for clarifying things - dp.DPIX = 96; - dp.DPIY = 96; - dp.HScrollPos = gtk_adjustment_get_value(ap->ha); dp.VScrollPos = gtk_adjustment_get_value(ap->va);