diff --git a/xvaga/xvt_menu.h b/xvaga/xvt_menu.h index e5aa0063c..ceb4fa4f1 100755 --- a/xvaga/xvt_menu.h +++ b/xvaga/xvt_menu.h @@ -5,7 +5,7 @@ * Agreement with XVT Software. * * $RCSfile: xvt_menu.h,v $ - * $Revision: 1.2 $ + * $Revision: 1.2.6.1 $ * * Purpose: XVT menu subsystem definitions. * @@ -30,11 +30,11 @@ #define M_FILE_PREVIEW (M_FILE+11) #define M_EDIT 32025 -#define M_EDIT_UNDO (M_EDIT+1) -#define M_EDIT_CUT (M_EDIT+2) -#define M_EDIT_COPY (M_EDIT+3) -#define M_EDIT_PASTE (M_EDIT+4) -#define M_EDIT_CLEAR (M_EDIT+5) +#define M_EDIT_UNDO (M_EDIT+1) +#define M_EDIT_CUT (M_EDIT+2) +#define M_EDIT_COPY (M_EDIT+3) +#define M_EDIT_PASTE (M_EDIT+4) +#define M_EDIT_CLEAR (M_EDIT+5) #define M_EDIT_SEL_ALL (M_EDIT+6) #define M_EDIT_CLIPBOARD (M_EDIT+7) diff --git a/xvaga/xvtctl.cpp b/xvaga/xvtctl.cpp index 94f4993f9..8d8b23031 100755 --- a/xvaga/xvtctl.cpp +++ b/xvaga/xvtctl.cpp @@ -2100,19 +2100,35 @@ void TwxToolBar::OnEraseBackground(wxEraseEvent& evt) } else { - if (xvt_sys_get_oem_int("OEM", -1) == 0) + const wxColour b0 = GetBackgroundColour(); + const wxColour b1 = ModulateColour(b0, -10); + const wxColour b2 = ModulateColour(b0, +70); + wxCoord cw, ch; dc.GetSize(&cw, &ch); + switch (xvt_sys_get_oem_int("OEM", -1)) { - wxCoord cw, ch; dc.GetSize(&cw, &ch); - const wxColour b0 = GetBackgroundColour(); - const wxColour b1 = ModulateColour(b0, -10); - const wxColour b2 = ModulateColour(b0, +70); - dc.GradientFillLinear(wxRect(0,0,cw,ch),b1,b2,wxSOUTH); - } - else - { - wxBrush brush(GetBackgroundColour()); - dc.SetBackground(brush); - dc.Clear(); + 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.Clear(); + } + break; } } } diff --git a/xvaga/xvtdm.cpp b/xvaga/xvtdm.cpp index 1268d7349..2192a9c68 100755 --- a/xvaga/xvtdm.cpp +++ b/xvaga/xvtdm.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -117,22 +118,31 @@ TMessageBox::TMessageBox(wxWindow* pParent, const wxString& msg, int nStyle, int sz1->Add(new wxStaticBitmap(this, wxID_ANY, img), 0, wxALL|wxALIGN_CENTER, nBorder); - wxStaticText* ss = NULL; - if (bTerminalino) + if (msg.StartsWith("") && msg.EndsWith("")) { - int nLines = 0; - wxStringTokenizer tok(msg, wxT("\n")); - for (nLines = 0; tok.HasMoreTokens(); nLines++) - nLines += tok.GetNextToken().Len()/32; - ss = new wxStaticText(this, wxID_ANY, wxEmptyString, wxDefaultPosition, - wxSize(nWrap, 16*nLines), wxST_NO_AUTORESIZE); + 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 - ss = new wxStaticText(this, wxID_ANY, wxEmptyString); + { + wxStaticText* ss = NULL; + if (bTerminalino) + { + int nLines = 0; + wxStringTokenizer tok(msg, wxT("\n")); + for (nLines = 0; tok.HasMoreTokens(); nLines++) + nLines += tok.GetNextToken().Len()/32; + ss = new wxStaticText(this, wxID_ANY, wxEmptyString, wxDefaultPosition, + wxSize(nWrap, 16*nLines), wxST_NO_AUTORESIZE); + } + else + ss = new wxStaticText(this, wxID_ANY, wxEmptyString); - ss->Wrap(nWrap); - ss->SetLabel(msg); - sz1->Add(ss, 0, wxALL|wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL, nBorder); + ss->Wrap(nWrap); + ss->SetLabel(msg); + sz1->Add(ss, 0, wxALL|wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL, nBorder); + } sizer->Add(new wxStaticLine(this), 0, wxALL|wxEXPAND, nBorder);