Le 30/11/2015 12:02, Scott Kostyshak a écrit :
On Sun, Nov 29, 2015 at 11:18:11PM +0100, Murat Yildizoglu wrote:
Hello,
I would like to know if it would be too difficult for you to implement an
option that permits us to fix the margin between the text's border and
LyX's window border. Currently, there is nearly zero margin, and that is
something that slightly annoyed me for many years.
Can you send a screenshot? For me there is a margin.
Would this spin-off of my earlier zoomed width patch (which is on hold
for now) be useful for margins?
JMarc
>From 3cbe881e32f9e1a63963876b2510fa3ed69fa4b0 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Thu, 3 Dec 2015 10:07:52 +0100
Subject: [PATCH] Make text margin size dependent on zoom and dpi
---
src/BufferView.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 0030f33..dbd485d 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -351,11 +351,13 @@ BufferView::~BufferView()
int BufferView::rightMargin() const
{
+ // The value used to be hardcoded to 10, which is 2.5mm at 100dpi
+ int const default_margin = Length(2.5, Length::MM).inPixels(0);
// The additional test for the case the outliner is opened.
if (!full_screen_ ||
!lyxrc.full_screen_limit ||
- width_ < lyxrc.full_screen_width + 20)
- return 10;
+ width_ < lyxrc.full_screen_width + 2 * default_margin)
+ return default_margin;
return (width_ - lyxrc.full_screen_width) / 2;
}
--
2.5.0