* Key font size now also takes the window width into account.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29207 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
816f925d39
commit
a1056d5fa3
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
const uint8 K_COLOR_OFFSET = 32;
|
const uint8 K_COLOR_OFFSET = 32;
|
||||||
const float K_FONT_YPROP = 0.6f;
|
const float K_FONT_YPROP = 0.6f;
|
||||||
|
const float K_FONT_XPROP = 0.6f;
|
||||||
const float K_DISPLAY_YPROP = 0.2f;
|
const float K_DISPLAY_YPROP = 0.2f;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -374,7 +375,13 @@ CalcView::Draw(BRect updateRect)
|
|||||||
SetHighColor(fButtonTextColor);
|
SetHighColor(fButtonTextColor);
|
||||||
SetLowColor(fBaseColor);
|
SetLowColor(fBaseColor);
|
||||||
SetDrawingMode(B_OP_COPY);
|
SetDrawingMode(B_OP_COPY);
|
||||||
SetFontSize(((fHeight - sizeDisp) / (float)fRows) * K_FONT_YPROP);
|
|
||||||
|
float fontSize =
|
||||||
|
min_c(((fHeight - sizeDisp) / (float)fRows) * K_FONT_YPROP,
|
||||||
|
(fWidth / (float)fColums) * K_FONT_XPROP);
|
||||||
|
|
||||||
|
SetFontSize(fontSize);
|
||||||
|
|
||||||
float baselineOffset = ((fHeight - sizeDisp) / (float)fRows)
|
float baselineOffset = ((fHeight - sizeDisp) / (float)fRows)
|
||||||
* (1.0 - K_FONT_YPROP) * 0.5;
|
* (1.0 - K_FONT_YPROP) * 0.5;
|
||||||
CalcKey *key = fKeypad;
|
CalcKey *key = fKeypad;
|
||||||
|
Loading…
Reference in New Issue
Block a user