remove unused variables, minor cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#if wxUSE_GRAPHICS_CONTEXT
|
#if wxUSE_GRAPHICS_CONTEXT
|
||||||
|
|
||||||
#include "wx/private/graphics.h"
|
#include "wx/graphics.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/icon.h"
|
#include "wx/icon.h"
|
||||||
@@ -28,11 +28,7 @@
|
|||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
#include "wx/private/graphics.h"
|
||||||
// constants
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
static const double RAD2DEG = 180.0 / M_PI;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Local functions
|
// Local functions
|
||||||
@@ -480,7 +476,6 @@ void wxGraphicsPathData::AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2,
|
|||||||
wxDouble dist = r / sin(alpha/2) * cos(alpha/2);
|
wxDouble dist = r / sin(alpha/2) * cos(alpha/2);
|
||||||
// calculate tangential points
|
// calculate tangential points
|
||||||
wxPoint2DDouble t1 = dist*v1 + p1;
|
wxPoint2DDouble t1 = dist*v1 + p1;
|
||||||
wxPoint2DDouble t2 = dist*v2 + p1;
|
|
||||||
|
|
||||||
wxPoint2DDouble nv1 = v1;
|
wxPoint2DDouble nv1 = v1;
|
||||||
nv1.SetVectorAngle(v1.GetVectorAngle()-90);
|
nv1.SetVectorAngle(v1.GetVectorAngle()-90);
|
||||||
@@ -565,7 +560,7 @@ void wxGraphicsContext::SetPen( const wxGraphicsPen& pen )
|
|||||||
|
|
||||||
void wxGraphicsContext::SetPen( const wxPen& pen )
|
void wxGraphicsContext::SetPen( const wxPen& pen )
|
||||||
{
|
{
|
||||||
if ( !pen.Ok() || pen.GetStyle() == wxTRANSPARENT )
|
if ( !pen.Ok() || pen.GetStyle() == wxPENSTYLE_TRANSPARENT )
|
||||||
SetPen( wxNullGraphicsPen );
|
SetPen( wxNullGraphicsPen );
|
||||||
else
|
else
|
||||||
SetPen( CreatePen( pen ) );
|
SetPen( CreatePen( pen ) );
|
||||||
@@ -579,7 +574,7 @@ void wxGraphicsContext::SetBrush( const wxGraphicsBrush& brush )
|
|||||||
|
|
||||||
void wxGraphicsContext::SetBrush( const wxBrush& brush )
|
void wxGraphicsContext::SetBrush( const wxBrush& brush )
|
||||||
{
|
{
|
||||||
if ( !brush.Ok() || brush.GetStyle() == wxTRANSPARENT )
|
if ( !brush.Ok() || brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT )
|
||||||
SetBrush( wxNullGraphicsBrush );
|
SetBrush( wxNullGraphicsBrush );
|
||||||
else
|
else
|
||||||
SetBrush( CreateBrush( brush ) );
|
SetBrush( CreateBrush( brush ) );
|
||||||
|
@@ -1932,10 +1932,9 @@ void wxRibbonMSWArtProvider::DrawPartialPageBackground(
|
|||||||
wxPoint offset(wnd->GetPosition());
|
wxPoint offset(wnd->GetPosition());
|
||||||
wxRibbonPage* page = NULL;
|
wxRibbonPage* page = NULL;
|
||||||
wxWindow* parent = wnd->GetParent();
|
wxWindow* parent = wnd->GetParent();
|
||||||
wxRibbonPanel* panel = NULL;
|
wxRibbonPanel* panel = wxDynamicCast(wnd, wxRibbonPanel);
|
||||||
bool hovered = false;
|
bool hovered = false;
|
||||||
|
|
||||||
panel = wxDynamicCast(wnd, wxRibbonPanel);
|
|
||||||
if(panel != NULL)
|
if(panel != NULL)
|
||||||
{
|
{
|
||||||
hovered = allow_hovered && panel->IsHovered();
|
hovered = allow_hovered && panel->IsHovered();
|
||||||
@@ -2638,12 +2637,10 @@ bool wxRibbonMSWArtProvider::GetButtonBarButtonSize(
|
|||||||
wxCoord label_height;
|
wxCoord label_height;
|
||||||
wxCoord best_width;
|
wxCoord best_width;
|
||||||
dc.GetTextExtent(label, &best_width, &label_height);
|
dc.GetTextExtent(label, &best_width, &label_height);
|
||||||
int best_num_lines = 1;
|
|
||||||
int last_line_extra_width = 0;
|
int last_line_extra_width = 0;
|
||||||
if(kind != wxRIBBON_BUTTON_NORMAL)
|
if(kind != wxRIBBON_BUTTON_NORMAL)
|
||||||
{
|
{
|
||||||
last_line_extra_width += 8;
|
last_line_extra_width += 8;
|
||||||
best_num_lines = 2; // label on top line, button below
|
|
||||||
}
|
}
|
||||||
size_t i;
|
size_t i;
|
||||||
for(i = 0; i < label.Len(); ++i)
|
for(i = 0; i < label.Len(); ++i)
|
||||||
@@ -2656,7 +2653,6 @@ bool wxRibbonMSWArtProvider::GetButtonBarButtonSize(
|
|||||||
if(width < best_width)
|
if(width < best_width)
|
||||||
{
|
{
|
||||||
best_width = width;
|
best_width = width;
|
||||||
best_num_lines = 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -458,9 +458,6 @@ void wxRibbonGallery::OnPaint(wxPaintEvent& WXUNUSED(evt))
|
|||||||
if(m_art == NULL)
|
if(m_art == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxSize cur_size = GetSize();
|
|
||||||
wxSize min_size = GetMinSize();
|
|
||||||
|
|
||||||
m_art->DrawGalleryBackground(dc, this, GetSize());
|
m_art->DrawGalleryBackground(dc, this, GetSize());
|
||||||
|
|
||||||
int padding_top = m_art->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE);
|
int padding_top = m_art->GetMetric(wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE);
|
||||||
|
Reference in New Issue
Block a user