mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 20:46:50 +03:00
Initialise DPI earlier so that it works for treeviews
This commit is contained in:
parent
3b1992d3f4
commit
d3493b138f
@ -287,6 +287,13 @@ static nserror nsgtk_init(int argc, char** argv, char **respath)
|
||||
/* Initialise completions - cannot fail */
|
||||
nsgtk_completion_init();
|
||||
|
||||
/* The tree view system needs to know the screen's DPI, so we
|
||||
* find that out here, rather than when we create a first browser
|
||||
* window.
|
||||
*/
|
||||
browser_set_dpi(gdk_screen_get_resolution(gdk_screen_get_default()));
|
||||
NSLOG(netsurf, INFO, "Set CSS DPI to %d", browser_get_dpi());
|
||||
|
||||
filepath_sfinddef(respath, buf, "mime.types", "/etc/");
|
||||
gtk_fetch_filetype_init(buf);
|
||||
|
||||
@ -297,13 +304,6 @@ static nserror nsgtk_init(int argc, char** argv, char **respath)
|
||||
hotlist_init(nsoption_charp(hotlist_path),
|
||||
nsoption_charp(hotlist_path));
|
||||
|
||||
/* The tree view system needs to know the screen's DPI, so we
|
||||
* find that out here, rather than when we create a first browser
|
||||
* window.
|
||||
*/
|
||||
browser_set_dpi(gdk_screen_get_resolution(gdk_screen_get_default()));
|
||||
NSLOG(netsurf, INFO, "Set CSS DPI to %d", browser_get_dpi());
|
||||
|
||||
/* Initialise top level UI elements */
|
||||
error = nsgtk_download_init();
|
||||
if (error != NSERROR_OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user