📄 ggballenv.cpp
字号:
// GGBallEnv.cpp: implementation of the CGGBallEnv class.
//
//////////////////////////////////////////////////////////////////////
#include "GGBallEnv.h"
#include <eikenv.h>
CFont* CGGBallEnv::iFont=NULL;
TSize CGGBallEnv::iSCreenSize(0,0);
TInt CGGBallEnv::iPaneHeight=22;
TInt CGGBallEnv::iMenuItemHeigt=22;
//CEikonEnv::Static()->ReleaseScreenFont( iFont );
void CGGBallEnv::InitFont()
{
iSCreenSize = CEikonEnv::Static()->ScreenDevice()->SizeInPixels();
TInt fontHeightInPixel = 0;
if ( ( iSCreenSize.iWidth == 176 && 208 == iSCreenSize.iHeight) ||
( iSCreenSize.iWidth == 208 && 208 == iSCreenSize.iHeight) )
{
fontHeightInPixel = 3;
}
else if ( 240 == iSCreenSize.iWidth && 320 == iSCreenSize.iHeight )
{
fontHeightInPixel = 4;
}
else if ( 320 == iSCreenSize.iWidth && 240 == iSCreenSize.iHeight )
{
fontHeightInPixel = 4;
}
else if ( 352 == iSCreenSize.iWidth && 416 == iSCreenSize.iHeight )
{
fontHeightInPixel = 5;
}
else if ( 800 == iSCreenSize.iWidth && 352 == iSCreenSize.iHeight )
{
fontHeightInPixel = 10;
}
TFontSpec fs= TFontSpec(_L("CombinedChinesePlain12"), 12);
CCoeEnv::Static()->ScreenDevice()->GetNearestFontInPixels(iFont, fs); // 根据fs得到字体
}
const CFont* CGGBallEnv::Font()
{
return iFont;
}
void CGGBallEnv::Init()
{
InitFont();
}
TSize CGGBallEnv::ScreenSize()
{
return iSCreenSize;
}
TInt CGGBallEnv::PaneHeigth()
{
return iPaneHeight;
}
TInt CGGBallEnv::MenuItemHeight()
{
return iMenuItemHeigt;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -