Nux

Merge lp:~nicovdw/nux/fix-for-753083-2 into lp:nux

Proposed by Nico van der Walt
Status: Merged
Merged at revision: 333
Proposed branch: lp:~nicovdw/nux/fix-for-753083-2
Merge into: lp:nux
Diff against target: 12 lines (+1/-1)
1 file modified
Nux/StaticText.cpp (+1/-1)
To merge this branch: bzr merge lp:~nicovdw/nux/fix-for-753083-2
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+58259@code.launchpad.net

Description of the change

Changed GetTextSize to consider the correct font size when calculating text dimensions. Previously a default font size was assumed that prevented text to display correctly for font sizes larger than 12.

To post a comment you must log in.
Revision history for this message
Nico van der Walt (nicovdw) wrote :

Hi Didier,

This is an additional patch for bug 753083. I did not test for font sizes larger than 12 previously.

There is still another problem with big fonts where the text is vertically cut off (try font size of 18 to demonstrate). I have submitted another patch for unity that fixes that: lp:~nicovdw/unity/fix-combobox-height

Thanks
Nico

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Approved, nice catch!

(still font issues in the dash for a big font size, but not a regression from this one ;))
Thanks Nico :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/StaticText.cpp'
2--- Nux/StaticText.cpp 2011-04-15 09:58:05 +0000
3+++ Nux/StaticText.cpp 2011-04-19 10:04:29 +0000
4@@ -193,7 +193,7 @@
5
6 void StaticText::GetTextSize (int &width, int &height, int clipping)
7 {
8- GetTextSize (TEXT("Ubuntu"), _text.GetTCharPtr (), width, height, clipping);
9+ GetTextSize (_font_string, _text.GetTCharPtr (), width, height, clipping);
10 }
11
12 void StaticText::GetTextSize (const TCHAR* font, const TCHAR *char_str, int& width, int& height, int clipping)

Subscribers

People subscribed via source and target branches