X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBufferView.cpp;h=b36b8ee5b6a694fc226862fead4a719e370946bb;hb=293b8dbe67dc025d03d0523d0079f71f5ab62ce3;hp=da309d63e532dca298b2ac40339f9a5acb422852;hpb=7391ca961d7985918a8d7b4fb52b01078b83a5c9;p=features.git diff --git a/src/BufferView.cpp b/src/BufferView.cpp index da309d63e5..b36b8ee5b6 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -342,11 +342,14 @@ int BufferView::defaultMargin() const int BufferView::rightMargin() const { - // The additional test for the case the outliner is opened. - if (full_screen_ && lyxrc.full_screen_limit) - return max(defaultMargin(), (width_ - lyxrc.full_screen_width) / 2); + const int screen_width = inPixels(lyxrc.screen_width); - return defaultMargin(); + // The additional test for the case the outliner is opened. + if (!lyxrc.screen_limit || width_ < screen_width + 2 * defaultMargin()) { + return defaultMargin(); + } else { + return (width_ - screen_width) / 2; + } } @@ -1876,16 +1879,14 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) message += _("One word"); message += "\n"; if (chars_blanks != 1) - message += bformat(_("%1$d characters (including blanks)"), - chars_blanks); + message += bformat(_("%1$d characters"), chars_blanks); else - message += _("One character (including blanks)"); + message += _("One character"); message += "\n"; if (chars != 1) - message += bformat(_("%1$d characters (excluding blanks)"), - chars); + message += bformat(_("%1$d characters (no blanks)"), chars); else - message += _("One character (excluding blanks)"); + message += _("One character (no blanks)"); Alert::information(_("Statistics"), message); }