buggins / dlangui

Cross Platform GUI for D programming language
Boost Software License 1.0
813 stars 121 forks source link

Setting overrideScreenDPI to 96 #588

Closed leh103 closed 5 years ago

leh103 commented 5 years ago

For some reason when I build a gui on my desktop running lmde 3, the sdlUpdateScreenDpi function in the SDLapp.d file changes the dpi to 304 from 96. The monitor dpi is 96, so I will need to set the overrideScreenDPI (I assume it is a property or symbol defined or set else where) to 96 in order to keep the library from changing it to 304. Here is the log output when I start Dlangide from the command line up to just after it reset the dpi for brevity: larry@fred:~/git/Source/dlangide/bin$ ./dlangide 2019-01-31 21:13:54.297 I Log level changed to Trace 2019-01-31 21:13:54.301 I Logger is initialized 2019-01-31 21:13:54.306 V DerelictFT: Loading FreeType library 2019-01-31 21:13:54.306 V DerelictFT: Missing symbols callback is registered 2019-01-31 21:13:54.309 V DerelictFT: Loaded 2019-01-31 21:13:54.309 V Initializing FreeType library 2019-01-31 21:13:54.310 I Getting list of fonts using FontConfig 2019-01-31 21:13:54.470 I FontConfig: 1160 font files registered in 160ms 2019-01-31 21:13:54.470 D initResourceManagers() 2019-01-31 21:13:54.474 I Creating ImageCache 2019-01-31 21:13:54.474 I Creating DrawableCache 2019-01-31 21:13:54.474 D Calling initSharedResourceManagers() 2019-01-31 21:13:54.474 D Calling initStandardEditorActions() 2019-01-31 21:13:54.474 D Calling registerStandardWidgets() 2019-01-31 21:13:54.474 D Registering standard widgets for DML 2019-01-31 21:13:54.474 D initResourceManagers() -- finished 2019-01-31 21:13:55.389 D Creating default theme

2019-01-31 21:13:55.390 I sdlUpdateScreenDpi: systemScreenDPI=304 2019-01-31 21:13:55.390 I sdlUpdateScreenDpi: systemScreenDPI is changed from 96 to 304

2019-01-31 21:13:55.390 V uiTheme setting new theme theme_default 2019-01-31 21:13:55.438 I Applying loaded theme theme_default 2019-01-31 21:13:55.438 D DrawableCache.clear() 2019-01-31 21:13:55.438 V uiTheme setting new theme ide_theme_default

leh103 commented 5 years ago

This issue has been solved. I found were to set it in the ~/.dlangide/settings.json file.