Bug 35870

Summary: HiDpi support
Product: [Desktop] Xamarin Studio Reporter: bartosz.soja <bartosz.soja>
Component: GeneralAssignee: Cody Russell <cody>
Status: RESOLVED ANSWERED    
Severity: normal CC: bartosz.soja, cesar, marius.ungureanu, mono-bugs+monodevelop
Priority: ---    
Version: Trunk   
Target Milestone: master   
Hardware: PC   
OS: Linux   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: monodevelop hidpi

Description bartosz.soja 2015-11-15 08:03:51 UTC
Created attachment 13814 [details]
monodevelop hidpi

Monodevelop is not properly scaled on HiDpi screen. I have UX303LN laptop with 1920x1080 resolution and 13 inches screen size, running latest KDE and some UI elements are too small. Attached screenshot should describe that more than words. I tried to resolve this problem and when I modify method "Mono.TextEditor.GtkWorkarounds.GetPixelScale()" to return hardcoded value 1.4d, UI looks fine - is properly scaled. Attached screenshot contains on top version with hardcoded pixel scale to 1.4d and underneath original version without my modification.
Comment 1 bartosz.soja 2015-11-15 08:09:03 UTC
My environment:
Kubuntu 15.10
MonoDevelop -latest from GIT
Comment 2 Cody Russell 2016-04-20 20:44:16 UTC
This isn't something that we can really fix in monodevelop itself. On Mac and Windows we ship our own version of gtk, but on Linux this isn't an option.

If we switch to gtk3 at some point then we'll get support for this from that, but I don't think it's a feature that will ever be backported to gtk2.
Comment 3 cesar 2016-09-04 04:06:44 UTC
I think the original poster shows that this is a bug in monodevelop, as changing the "Mono.TextEditor.GtkWorkarounds.GetPixelScale()" function worked (not anymore, since it's commented out and not used anymore).

This is still an issue and the current code seems to be using gtk3 to determine the scaling factor and in every other gtk3 app this works as expected.

https://github.com/mono/monodevelop/blob/master/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GtkWorkarounds.cs#L1178
https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-get-scale-factor