Skip to content

Commit

Permalink
修复显示异常
Browse files Browse the repository at this point in the history
  • Loading branch information
fawdlstty committed May 22, 2019
1 parent 8e622c5 commit 4bddc25
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions DuiLib/Core/UIRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1399,17 +1399,17 @@ namespace DuiLib {
}

void CRenderEngine::DrawRoundRect (HDC hDC, const RECT& rc, int nSize, int width, int height, DWORD dwPenColor, int nStyle /*= PS_SOLID*/) {
#ifdef USE_GDI_RENDER
//#ifdef USE_GDI_RENDER
ASSERT (::GetObjectType (hDC) == OBJ_DC || ::GetObjectType (hDC) == OBJ_MEMDC);
HPEN hPen = ::CreatePen (nStyle, nSize, RGB (GetBValue (dwPenColor), GetGValue (dwPenColor), GetRValue (dwPenColor)));
HPEN hOldPen = (HPEN)::SelectObject (hDC, hPen);
::SelectObject (hDC, ::GetStockObject (HOLLOW_BRUSH));
::RoundRect (hDC, rc.left, rc.top, rc.right, rc.bottom, width, height);
::SelectObject (hDC, hOldPen);
::DeleteObject (hPen);
#else
DrawRoundRectange (hDC, rc.left, rc.top, rc.right - rc.left - 1, rc.bottom - rc.top - 1, width, Gdiplus::Color (dwPenColor), nSize, false, Gdiplus::Color (dwPenColor));
#endif
//#else
// DrawRoundRectange (hDC, rc.left, rc.top, rc.right - rc.left - 1, rc.bottom - rc.top - 1, width, Gdiplus::Color (dwPenColor), nSize, false, Gdiplus::Color (dwPenColor));
//#endif
}

void CRenderEngine::DrawText (HDC hDC, CPaintManagerUI* pManager, RECT& rc, faw::string_view_t pstrText, DWORD dwTextColor, int iFont, UINT uStyle) {
Expand Down Expand Up @@ -1647,7 +1647,7 @@ namespace DuiLib {
switch (pstrText[0]) {
case _T ('a'): // Link
{
pstrText = pstrText.substr (1);
pstrText = pstrText.substr (2);
if (iLinkIndex < nLinkRects && !bLineDraw) {
faw::String *pStr = (faw::String*) (sLinks + iLinkIndex);
pStr->clear ();
Expand Down Expand Up @@ -1705,15 +1705,15 @@ namespace DuiLib {
break;
case _T ('c'): // Color
{
pstrText = pstrText.substr (1);
pstrText = pstrText.substr (2);
DWORD clrColor = (DWORD) (FawTools::parse_hex (pstrText));
aColorArray.Add ((LPVOID) clrColor);
::SetTextColor (hDC, RGB (GetBValue (clrColor), GetGValue (clrColor), GetRValue (clrColor)));
}
break;
case _T ('f'): // Font
{
pstrText = pstrText.substr (1);
pstrText = pstrText.substr (2);
faw::string_view_t pstrTemp = pstrText;
int _iFont = _ttoi (pstrText.data ());
if (pstrTemp != pstrText) {
Expand Down Expand Up @@ -1762,7 +1762,7 @@ namespace DuiLib {
case _T ('i'): // Italic or Image
{
pstrNextStart = &pstrText.data ()[-1];
pstrText = pstrText.substr (1);
pstrText = pstrText.substr (2);
faw::String sImageString = pstrText;
int iWidth = 0;
int iHeight = 0;
Expand Down Expand Up @@ -1920,15 +1920,15 @@ namespace DuiLib {
break;
case _T ('x'): // X Indent
{
pstrText = pstrText.substr (1);
pstrText = pstrText.substr (2);
int iWidth = (int) FawTools::parse_dec (pstrText);
pt.x += iWidth;
cxMaxWidth = MAX (cxMaxWidth, pt.x);
}
break;
case _T ('y'): // Y Indent
{
pstrText = pstrText.substr (1);
pstrText = pstrText.substr (2);
int iWidth = (int) FawTools::parse_dec (pstrText);
}
break;
Expand Down
Binary file modified NetToolbox/Resource.aps
Binary file not shown.
Binary file modified NetToolbox/Resource.rc
Binary file not shown.
Binary file modified NetToolbox/res/res.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion res/main_cn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<Option style="x_item2" name="tab4_2" text="转码解码" />
</VerticalLayout>
<Option name="group5" text="单机工具" style="x_item1" bkimage="file='qb5.png' dest='10,4,26,20'" />
<VerticalLayout name="group_item5" height="200" visible="false">
<VerticalLayout name="group_item5" height="160" visible="false">
<Option style="x_item2" name="tab5_0" text="GIF录制" />
<Option style="x_item2" name="tab5_1" text="串口调试工具" />
<Option style="x_item2" name="tab5_2" text="窗口工具" />
Expand Down

0 comments on commit 4bddc25

Please sign in to comment.