------------------------------------------------------------
revno: 2198
committer: poy <[email protected]>
branch nick: repo
timestamp: Sat 2010-08-07 22:36:06 +0200
message:
draw unthemed tabs better
modified:
dwt/src/widgets/TabView.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dwt/src/widgets/TabView.cpp'
--- dwt/src/widgets/TabView.cpp 2010-08-07 16:35:11 +0000
+++ dwt/src/widgets/TabView.cpp 2010-08-07 20:36:06 +0000
@@ -100,10 +100,10 @@
loadTheme(VSCLASS_TAB);
- // in button-style, use classic owner-draw callbacks; in tab style, fully take over painting.
- if(cs.style & TCS_BUTTONS) {
+ if(!theme || (cs.style & TCS_BUTTONS)) {
dwtassert(dynamic_cast<Control*>(getParent()), _T("Owner-drawn tabs must have a parent derived from dwt::Control"));
} else {
+ // we don't want pre-drawn borders to get in the way here, so we fully take over painting.
onPainting(std::bind((void (TabView::*)(PaintCanvas&))(&TabView::handlePainting), this, _1));
}
@@ -665,7 +665,7 @@
canvas.fill(rect, Brush(isSelected ? Brush::Window : isHighlighted ? Brush::HighLight : Brush::BtnFace));
}
- if(isSelected && !hasStyle(TCS_BUTTONS)) {
+ if(isSelected && theme && !hasStyle(TCS_BUTTONS)) {
rect.pos.y += 1;
rect.size.y -= 1;
}
_______________________________________________
Mailing list: https://launchpad.net/~linuxdcpp-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~linuxdcpp-team
More help : https://help.launchpad.net/ListHelp