mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
fix dpi
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5036 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1d4154f333
commit
bab154eb92
@ -1,3 +1,7 @@
|
||||
2002-08-20 John Levon <levon@movementarian.org>
|
||||
|
||||
* lyx_gui.C: estimate default DPI
|
||||
|
||||
2002-08-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* Dialogs.C:
|
||||
|
@ -66,6 +66,15 @@ namespace {
|
||||
/// quit lyx
|
||||
bool finished = false;
|
||||
|
||||
/// estimate DPI from X server
|
||||
float getDPI()
|
||||
{
|
||||
Screen * scr = ScreenOfDisplay(fl_get_display(), fl_screen);
|
||||
return ((HeightOfScreen(scr) * 25.4 / HeightMMOfScreen(scr)) +
|
||||
(WidthOfScreen(scr) * 25.4 / WidthMMOfScreen(scr))) / 2;
|
||||
}
|
||||
|
||||
|
||||
/// set default GUI configuration
|
||||
void setDefaults()
|
||||
{
|
||||
@ -167,14 +176,14 @@ void lyx_gui::parse_init(int & argc, char * argv[])
|
||||
Image::newImage = boost::bind(&ImageXPM::newImage);
|
||||
Image::loadableFormats = boost::bind(&ImageXPM::loadableFormats);
|
||||
#endif
|
||||
|
||||
// must do this /before/ lyxrc gets read
|
||||
lyxrc.dpi = getDPI();
|
||||
}
|
||||
|
||||
|
||||
void lyx_gui::parse_lyxrc()
|
||||
{
|
||||
// FIXME !!!!
|
||||
//lyxrc.dpi = 95;
|
||||
|
||||
XformsColor::read(AddName(user_lyxdir, "preferences.xform"));
|
||||
|
||||
if (lyxrc.popup_font_encoding.empty())
|
||||
|
Loading…
Reference in New Issue
Block a user