mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
factorize code between GuiFontMetrics::rectText() and buttonText().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23000 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9e4780ffd8
commit
15ff669dd0
@ -192,9 +192,8 @@ void GuiFontMetrics::rectText(docstring const & str,
|
|||||||
void GuiFontMetrics::buttonText(docstring const & str,
|
void GuiFontMetrics::buttonText(docstring const & str,
|
||||||
int & w, int & ascent, int & descent) const
|
int & w, int & ascent, int & descent) const
|
||||||
{
|
{
|
||||||
w = width(str) + 2 * Inset::TEXT_TO_INSET_OFFSET;
|
rectText(str, w, ascent, descent);
|
||||||
ascent = metrics_.ascent() + d;
|
w += Inset::TEXT_TO_INSET_OFFSET;
|
||||||
descent = metrics_.descent() + d;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user