linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #01665
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2188: VS can't guess the lambda return type; sanity check for tab width
------------------------------------------------------------
revno: 2188
committer: poy <poy@xxxxxxxxxx>
branch nick: repo
timestamp: Fri 2010-08-06 23:26:01 +0200
message:
VS can't guess the lambda return type; sanity check for tab width
modified:
dwt/include/dwt/widgets/TabView.h
dwt/src/widgets/TabView.cpp
win32/TabsPage.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/include/dwt/widgets/TabView.h'
--- dwt/include/dwt/widgets/TabView.h 2010-08-06 21:02:04 +0000
+++ dwt/include/dwt/widgets/TabView.h 2010-08-06 21:26:01 +0000
@@ -77,7 +77,8 @@
FontPtr font;
/** for owner-drawn tabs (that have the TCS_OWNERDRAWFIXED style), defines the width of
- each tab. otherwise, sets the max chars per tab (any value <= 3 means infinite). */
+ each tab (min 100 pixels). otherwise, sets the maximum number of characters per tab (in
+ that case, any value <= 3 means infinite). */
unsigned widthConfig;
bool toggleActive; /// switch the active tab when clicking on the current active tab
=== modified file 'dwt/src/widgets/TabView.cpp'
--- dwt/src/widgets/TabView.cpp 2010-08-06 21:02:04 +0000
+++ dwt/src/widgets/TabView.cpp 2010-08-06 21:26:01 +0000
@@ -86,6 +86,8 @@
font = new Font(DefaultGuiFont);
if(cs.style & TCS_OWNERDRAWFIXED) {
+ if(widthConfig < 100)
+ widthConfig = 100;
TabCtrl_SetMinTabWidth(handle(), widthConfig);
LOGFONT lf;
@@ -666,6 +668,9 @@
rect.size.x -= size.x;
}
+ //if(isSelected)
+ // rect.size.x -= margin.x + 16; // keep some space for the 'X' button
+
const tstring text = ti->w->getText();
const unsigned dtFormat = DT_CENTER | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX | DT_WORD_ELLIPSIS;
Canvas::Selector select(canvas, *((isSelected || ti->marked) ? boldFont : font));
@@ -675,6 +680,12 @@
canvas.setTextColor(::GetSysColor(isSelected ? COLOR_WINDOWTEXT : isHighlighted ? COLOR_HIGHLIGHTTEXT : COLOR_BTNTEXT));
canvas.drawText(text, rect, dtFormat);
}
+
+ //if(isSelected) {
+ // rect.pos.x = rect.right() + margin.x;
+ // rect.size.x = 16;
+ // drawThemeBackground(canvas, WP_SMALLCLOSEBUTTON, 0, rect);
+ //}
}
void TabView::helpImpl(unsigned& id) {
=== modified file 'win32/TabsPage.cpp'
--- win32/TabsPage.cpp 2010-08-06 21:02:04 +0000
+++ win32/TabsPage.cpp 2010-08-06 21:26:01 +0000
@@ -152,7 +152,7 @@
seed.style |= TCS_BUTTONS;
TabViewPtr tabs = cur->addChild(seed);
- auto makeTab = [&tabs](const tstring& text) {
+ auto makeTab = [&tabs](const tstring& text) -> ContainerPtr {
Container::Seed cs;
cs.caption = text;
ContainerPtr ret = dwt::WidgetCreator<Container>::create(tabs, cs);