#include "frontends/Alert.h"
#include "frontends/Dialogs.h"
#include "frontends/FileDialog.h"
+#include "frontends/font_metrics.h"
#include "frontends/LyXView.h"
#include "frontends/LyXScreenFactory.h"
#include "frontends/screen.h"
#include "graphics/Previews.h"
+#include "support/convert.h"
#include "support/filefilterlist.h"
#include "support/filetools.h"
#include "support/forkedcontr.h"
-#include "support/path_defines.h"
-#include "support/tostr.h"
+#include "support/package.h"
#include "support/types.h"
#include <boost/bind.hpp>
using lyx::support::IsDirWriteable;
using lyx::support::MakeDisplayPath;
using lyx::support::MakeAbsPath;
+using lyx::support::package;
using lyx::support::strToUnsignedInt;
-using lyx::support::system_lyxdir;
using std::endl;
using std::istringstream;
bool BufferView::Pimpl::fitCursor()
{
if (bv_funcs::status(bv_, bv_->cursor()) == bv_funcs::CUR_INSIDE) {
- int asc, des;
- bv_->cursor().getDim(asc, des);
+ LyXFont const font = bv_->cursor().getFont();
+ int const asc = font_metrics::maxAscent(font);
+ int const des = font_metrics::maxDescent(font);
Point p = bv_funcs::getPos(bv_->cursor());
if (p.y_ - asc >= 0 && p.y_ + des < bv_->workHeight())
return false;
make_pair(string(_("Documents|#o#O")),
string(lyxrc.document_path)),
make_pair(string(_("Examples|#E#e")),
- string(AddPath(system_lyxdir(), "examples"))));
+ string(AddPath(package().system_support(), "examples"))));
FileDialog::Result result =
fileDlg.open(initpath,