mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +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,
|
||||
int & w, int & ascent, int & descent) const
|
||||
{
|
||||
w = width(str) + 2 * Inset::TEXT_TO_INSET_OFFSET;
|
||||
ascent = metrics_.ascent() + d;
|
||||
descent = metrics_.descent() + d;
|
||||
rectText(str, w, ascent, descent);
|
||||
w += Inset::TEXT_TO_INSET_OFFSET;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user