← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2473: Fix UsersFrame

 

------------------------------------------------------------
revno: 2473
committer: Jacek Sieka <arnetheduck@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Mon 2011-03-28 21:37:33 +0200
message:
  Fix UsersFrame
modified:
  dwt/include/dwt/forward.h
  dwt/include/dwt/widgets/Container.h
  dwt/src/widgets/ScrolledContainer.cpp
  win32/UsersFrame.cpp
  win32/UsersFrame.h


--
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/forward.h'
--- dwt/include/dwt/forward.h	2011-03-08 22:48:55 +0000
+++ dwt/include/dwt/forward.h	2011-03-28 19:37:33 +0000
@@ -134,6 +134,9 @@
 
 class SaveDialog;
 
+class ScrolledContainer;
+typedef ScrolledContainer* ScrolledContainerPtr;
+
 class Slider;
 typedef Slider* SliderPtr;
 

=== modified file 'dwt/include/dwt/widgets/Container.h'
--- dwt/include/dwt/widgets/Container.h	2011-03-15 19:52:17 +0000
+++ dwt/include/dwt/widgets/Container.h	2011-03-28 19:37:33 +0000
@@ -65,7 +65,7 @@
 };
 
 inline Container::Seed::Seed(DWORD style, DWORD exStyle) :
-BaseType::Seed(tstring(), style | WS_CHILD | WS_CLIPSIBLINGS, exStyle) {
+BaseType::Seed(tstring(), style | WS_CHILD, exStyle) {
 }
 
 inline void Container::create(const Seed& cs) {

=== modified file 'dwt/src/widgets/ScrolledContainer.cpp'
--- dwt/src/widgets/ScrolledContainer.cpp	2011-03-16 16:34:26 +0000
+++ dwt/src/widgets/ScrolledContainer.cpp	2011-03-28 19:37:33 +0000
@@ -57,7 +57,7 @@
 		setScrollInfo(SB_HORZ, clientSize.x, childSize.x);
 	}
 
-	if(childSize.y > childSize.y) {
+	if(childSize.y > clientSize.y) {
 		setScrollInfo(SB_VERT, clientSize.y, childSize.y);
 	}
 
@@ -86,8 +86,6 @@
 		return false;
 	}
 
-	auto childSize = child->getWindowSize();
-
 	SCROLLINFO si = { sizeof(SCROLLINFO), SIF_ALL };
 
 	auto type = msg.message == WM_HSCROLL ? SB_HORZ : SB_VERT;

=== modified file 'win32/UsersFrame.cpp'
--- win32/UsersFrame.cpp	2011-03-15 21:16:24 +0000
+++ win32/UsersFrame.cpp	2011-03-28 19:37:33 +0000
@@ -89,6 +89,7 @@
 UsersFrame::UsersFrame(TabViewPtr parent) :
 	BaseType(parent, T_("Users"), IDH_FAVUSERS, IDI_FAVORITE_USERS),
 	users(0),
+	scroll(0),
 	startup(true)
 {
 	filterGrid = addChild(Grid::Seed(1, 5));
@@ -145,7 +146,7 @@
 	}
 
 	{
-		auto scroll = splitter->addChild(dwt::ScrolledContainer::Seed());
+		scroll = splitter->addChild(dwt::ScrolledContainer::Seed());
 		userInfo = scroll->addChild(Grid::Seed(0, 1));
 	}
 
@@ -285,7 +286,7 @@
 }
 
 void UsersFrame::handleSelectionChanged() {
-	ScopedFunctor([&] { layout(); userInfo->redraw(); });
+	ScopedFunctor([&] { scroll->layout(); userInfo->layout(); userInfo->redraw(); });
 
 	HoldRedraw hold(userInfo);
 

=== modified file 'win32/UsersFrame.h'
--- win32/UsersFrame.h	2011-03-08 22:48:55 +0000
+++ win32/UsersFrame.h	2011-03-28 19:37:33 +0000
@@ -133,6 +133,7 @@
 	CheckBoxPtr showOnline;
 	CheckBoxPtr showQueue;
 	CheckBoxPtr showWaiting;
+	dwt::ScrolledContainerPtr scroll;
 
 	static dwt::ImageListPtr userIcons;