Patch level : 10.0

Files correlati     : xvaga.dll
Ricompilazione Demo : [ ]
Commento            :
Aggiunto supporto per MessageBox con testo HTML


git-svn-id: svn://10.65.10.50/branches/R_10_00@22404 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2011-09-09 11:05:12 +00:00
parent f6de739122
commit 9bf638209b
3 changed files with 56 additions and 30 deletions

View File

@ -5,7 +5,7 @@
* Agreement with XVT Software. * Agreement with XVT Software.
* *
* $RCSfile: xvt_menu.h,v $ * $RCSfile: xvt_menu.h,v $
* $Revision: 1.2 $ * $Revision: 1.2.6.1 $
* *
* Purpose: XVT menu subsystem definitions. * Purpose: XVT menu subsystem definitions.
* *

View File

@ -2100,20 +2100,36 @@ void TwxToolBar::OnEraseBackground(wxEraseEvent& evt)
} }
else else
{ {
if (xvt_sys_get_oem_int("OEM", -1) == 0)
{
wxCoord cw, ch; dc.GetSize(&cw, &ch);
const wxColour b0 = GetBackgroundColour(); const wxColour b0 = GetBackgroundColour();
const wxColour b1 = ModulateColour(b0, -10); const wxColour b1 = ModulateColour(b0, -10);
const wxColour b2 = ModulateColour(b0, +70); const wxColour b2 = ModulateColour(b0, +70);
dc.GradientFillLinear(wxRect(0,0,cw,ch),b1,b2,wxSOUTH); wxCoord cw, ch; dc.GetSize(&cw, &ch);
} switch (xvt_sys_get_oem_int("OEM", -1))
else
{ {
wxBrush brush(GetBackgroundColour()); case 0:
{
// Nuovo modo: effetto acqua in stile TwxOutlookBar
const wxColour b3 = ModulateColour(b1, +20);
const int delta = 2*ch/5;
wxRect r1(0,0,cw,ch), r2(0,0,cw,ch);
r1.height = delta;
r2.y += delta; r2.height -= delta;
dc.GradientFillLinear(r1, b3, b3, wxDOWN);
dc.GradientFillLinear(r2, b1, b2, wxDOWN);
}
break;
case 1:
// Vecchio modo: gradiente classico
dc.GradientFillLinear(wxRect(0,0,cw,ch),b1,b2,wxSOUTH);
break;
default:
{
wxBrush brush(b0);
dc.SetBackground(brush); dc.SetBackground(brush);
dc.Clear(); dc.Clear();
} }
break;
}
} }
} }

View File

@ -7,6 +7,7 @@
#include <wx/calctrl.h> #include <wx/calctrl.h>
#include <wx/colordlg.h> #include <wx/colordlg.h>
#include <wx/fontdlg.h> #include <wx/fontdlg.h>
#include <wx/wxhtml.h>
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/tokenzr.h> #include <wx/tokenzr.h>
@ -117,6 +118,14 @@ TMessageBox::TMessageBox(wxWindow* pParent, const wxString& msg, int nStyle, int
sz1->Add(new wxStaticBitmap(this, wxID_ANY, img), 0, wxALL|wxALIGN_CENTER, nBorder); sz1->Add(new wxStaticBitmap(this, wxID_ANY, img), 0, wxALL|wxALIGN_CENTER, nBorder);
if (msg.StartsWith("<html>") && msg.EndsWith("</html>"))
{
wxHtmlWindow* html = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxSize(nWrap,nWrap/1.6180339887));
html->SetPage(msg);
sz1->Add(html, 0, wxALL|wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL, nBorder);
}
else
{
wxStaticText* ss = NULL; wxStaticText* ss = NULL;
if (bTerminalino) if (bTerminalino)
{ {
@ -133,6 +142,7 @@ TMessageBox::TMessageBox(wxWindow* pParent, const wxString& msg, int nStyle, int
ss->Wrap(nWrap); ss->Wrap(nWrap);
ss->SetLabel(msg); ss->SetLabel(msg);
sz1->Add(ss, 0, wxALL|wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL, nBorder); sz1->Add(ss, 0, wxALL|wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL, nBorder);
}
sizer->Add(new wxStaticLine(this), 0, wxALL|wxEXPAND, nBorder); sizer->Add(new wxStaticLine(this), 0, wxALL|wxEXPAND, nBorder);