FIX: TabCtrl new style of page indicator
Change-Id: I5d6b088a8161e4373ec3dcff3fac17933861b155
This commit is contained in:
parent
e850f83030
commit
90b745c4d5
|
@ -26,7 +26,11 @@ TabCtrl::TabCtrl(wxWindow * parent,
|
||||||
long style)
|
long style)
|
||||||
: StaticBox(parent, id, pos, size, style)
|
: StaticBox(parent, id, pos, size, style)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
radius = 5;
|
radius = 5;
|
||||||
|
#else
|
||||||
|
radius = 1;
|
||||||
|
#endif
|
||||||
SetBorderColor(0xcecece);
|
SetBorderColor(0xcecece);
|
||||||
sizer = new wxBoxSizer(wxHORIZONTAL);
|
sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sizer->AddSpacer(10);
|
sizer->AddSpacer(10);
|
||||||
|
@ -254,9 +258,10 @@ void TabCtrl::doRender(wxDC& dc)
|
||||||
|
|
||||||
auto x1 = btns[sel]->GetPosition().x;
|
auto x1 = btns[sel]->GetPosition().x;
|
||||||
auto x2 = x1 + btns[sel]->GetSize().x;
|
auto x2 = x1 + btns[sel]->GetSize().x;
|
||||||
x1 -= TAB_BUTTON_SPACE; x2 += TAB_BUTTON_SPACE;
|
|
||||||
const int BS = border_width / 2;
|
const int BS = border_width / 2;
|
||||||
const int BS2 = (1 + border_width) / 2;
|
const int BS2 = (1 + border_width) / 2;
|
||||||
|
#if 0
|
||||||
|
x1 -= TAB_BUTTON_SPACE; x2 += TAB_BUTTON_SPACE;
|
||||||
dc.DrawLine(0, size.y - BS2, x1 - radius + BS2, size.y - BS2);
|
dc.DrawLine(0, size.y - BS2, x1 - radius + BS2, size.y - BS2);
|
||||||
dc.DrawArc(x1 - radius, size.y, x1, size.y - radius, x1 - radius, size.y - radius);
|
dc.DrawArc(x1 - radius, size.y, x1, size.y - radius, x1 - radius, size.y - radius);
|
||||||
dc.DrawLine(x1, size.y - radius, x1, radius);
|
dc.DrawLine(x1, size.y - radius, x1, radius);
|
||||||
|
@ -266,6 +271,13 @@ void TabCtrl::doRender(wxDC& dc)
|
||||||
dc.DrawLine(x2, radius, x2, size.y - radius);
|
dc.DrawLine(x2, radius, x2, size.y - radius);
|
||||||
dc.DrawArc(x2, size.y - radius, x2 + radius, size.y, x2 + radius, size.y - radius);
|
dc.DrawArc(x2, size.y - radius, x2 + radius, size.y, x2 + radius, size.y - radius);
|
||||||
dc.DrawLine(x2 + radius - BS2, size.y - BS2, size.x, size.y - BS2);
|
dc.DrawLine(x2 + radius - BS2, size.y - BS2, size.x, size.y - BS2);
|
||||||
|
#else
|
||||||
|
dc.DrawLine(0, size.y - BS2, size.x, size.y - BS2);
|
||||||
|
wxColor c(0x42AE00);
|
||||||
|
dc.SetPen(wxPen(c, 0));
|
||||||
|
dc.SetBrush(c);
|
||||||
|
dc.DrawRoundedRectangle(x1 - radius, size.y - BS2 - border_width * 3, x2 + radius * 2 - x1, border_width * 3, radius);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TabCtrl::sendTabCtrlEvent(bool changing)
|
bool TabCtrl::sendTabCtrlEvent(bool changing)
|
||||||
|
|
Loading…
Reference in New Issue