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 value used to be hardcoded to 10, which is 0.1in at 100dpi
+ int const default_margin = Length(0.1, Length::IN).inPixels(0);
// The additional test for the case the outliner is opened.
if (!full_screen_ || !lyxrc.full_screen_limit
|| width_ < lyxrc.full_screen_width + 2 * default_margin)
}
+int BufferView::inPixels(Length const & len) const
+{
+ Font const font = buffer().params().getFont();
+ return len.inPixels(workWidth(), theFontMetrics(font).em());
+}
+
+
bool BufferView::isTopScreen() const
{
return 0 == d->scrollbarParameters_.min;
if (buffer_.isReadonly()
&& !lyxaction.funcHasFlag(act, LyXAction::ReadOnly)
&& !lyxaction.funcHasFlag(act, LyXAction::NoBuffer)) {
- flag.message(from_utf8(N_("Document is read-only")));
+ if (buffer_.hasReadonlyFlag())
+ flag.message(from_utf8(N_("Document is read-only")));
+ else
+ flag.message(from_utf8(N_("Document has been modified externally")));
flag.setEnabled(false);
return true;
}