linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #03776
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2472: Sizing fixes
------------------------------------------------------------
revno: 2472
committer: Jacek Sieka <arnetheduck@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Sun 2011-03-27 12:50:56 +0200
message:
Sizing fixes
modified:
dwt/src/widgets/GroupBox.cpp
win32/AdvancedPage.cpp
win32/DirectoryListingFrame.cpp
win32/FavoriteDirsPage.cpp
win32/GeneralPage.cpp
win32/HistoryPage.cpp
win32/LogPage.cpp
win32/NetworkPage.cpp
win32/PropPage.cpp
win32/ProxyPage.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/GroupBox.cpp'
--- dwt/src/widgets/GroupBox.cpp 2011-03-15 19:52:17 +0000
+++ dwt/src/widgets/GroupBox.cpp 2011-03-27 10:50:56 +0000
@@ -56,6 +56,7 @@
padding.y = ::GetSystemMetrics(SM_CYEDGE) + cs.padding.y * 2; // ignore the top border
onEnabled([this](bool b) { handleEnabled(b); });
+ onWindowPosChanged([this](const Rectangle &) { layout(); });
}
Point GroupBox::getPreferredSize() {
@@ -73,7 +74,7 @@
Widget* child = getChild();
if(child) {
auto size = getClientSize();
- auto rc = shrink(Rectangle(getClientSize()));
+ auto rc = shrink(Rectangle(size));
::MoveWindow(child->handle(), rc.left(), rc.top(), rc.width(), rc.height(), TRUE);
}
=== modified file 'win32/AdvancedPage.cpp'
--- win32/AdvancedPage.cpp 2011-03-15 19:52:17 +0000
+++ win32/AdvancedPage.cpp 2011-03-27 10:50:56 +0000
@@ -53,6 +53,10 @@
AdvancedPage::AdvancedPage(dwt::Widget* parent) : PropPage(parent, 1, 1) {
setHelpId(IDH_ADVANCEDPAGE);
+ grid->column(0).mode = GridInfo::FILL;
+ grid->row(0).mode = GridInfo::FILL;
+ grid->row(0).align = GridInfo::STRETCH;
+
options = grid->addChild(WinUtil::Seeds::Dialog::optionsTable);
PropPage::read(listItems, options);
}
=== modified file 'win32/DirectoryListingFrame.cpp'
--- win32/DirectoryListingFrame.cpp 2011-03-19 15:32:48 +0000
+++ win32/DirectoryListingFrame.cpp 2011-03-27 10:50:56 +0000
@@ -220,7 +220,6 @@
Button::Seed cs = WinUtil::Seeds::button;
searchGrid = grid->addChild(Grid::Seed(1, 3));
- grid->setWidget(searchGrid, 1, 0);
searchGrid->column(0).mode = GridInfo::FILL;
searchBox = searchGrid->addChild(WinUtil::Seeds::comboBoxEdit);
=== modified file 'win32/FavoriteDirsPage.cpp'
--- win32/FavoriteDirsPage.cpp 2011-03-15 19:52:17 +0000
+++ win32/FavoriteDirsPage.cpp 2011-03-27 10:50:56 +0000
@@ -43,6 +43,10 @@
{
setHelpId(IDH_FAVORITE_DIRSPAGE);
+ grid->column(0).mode = GridInfo::FILL;
+ grid->row(0).mode = GridInfo::FILL;
+ grid->row(0).align = GridInfo::STRETCH;
+
auto group = grid->addChild(GroupBox::Seed(T_("Favorite download directories")));
group->setHelpId(IDH_SETTINGS_FAVORITE_DIRS_FAVORITE_DIRECTORIES);
GridPtr grid = group->addChild(Grid::Seed(2, 3));
=== modified file 'win32/GeneralPage.cpp'
--- win32/GeneralPage.cpp 2011-03-15 19:52:17 +0000
+++ win32/GeneralPage.cpp 2011-03-27 10:50:56 +0000
@@ -32,6 +32,10 @@
{
setHelpId(IDH_GENERALPAGE);
+ grid->column(0).mode = GridInfo::FILL;
+ grid->row(0).mode = GridInfo::FILL;
+ grid->row(0).align = GridInfo::STRETCH;
+
auto group = grid->addChild(GroupBox::Seed(T_("Personal Information")));
group->setHelpId(IDH_SETTINGS_GENERAL_PERSONAL_INFORMATION);
=== modified file 'win32/HistoryPage.cpp'
--- win32/HistoryPage.cpp 2011-03-15 19:52:17 +0000
+++ win32/HistoryPage.cpp 2011-03-27 10:50:56 +0000
@@ -35,7 +35,7 @@
template<typename T>
GridPtr addSubGrid(T parent, size_t rows) {
GridPtr grid = parent->addChild(Grid::Seed(rows, 2));
- grid->column(0).mode = GridInfo::FILL;
+ grid->column(0).mode = GridInfo::AUTO;
grid->column(0).align = GridInfo::BOTTOM_RIGHT;
grid->column(1).size = 40;
grid->column(1).mode = GridInfo::STATIC;
@@ -66,8 +66,9 @@
{
setHelpId(IDH_HISTORYPAGE);
+ grid->column(0).mode = GridInfo::FILL;
+
GroupBox::Seed gs;
- gs.style |= BS_RIGHT;
{
gs.caption = T_("Chat lines to recall from history when opening a window");
@@ -91,7 +92,7 @@
fl_recents->setText(Text::toT(Util::toString(fl_recents_init)));
}
- gs.caption.clear();
+ gs.caption = T_("Search history");
items.push_back(Item(addBox(addSubGrid(grid->addChild(gs), 1), T_("Search history"), IDH_SETTINGS_HISTORY_SEARCH_HISTORY), SettingsManager::SEARCH_HISTORY, PropPage::T_INT_WITH_SPIN));
PropPage::read(items);
=== modified file 'win32/LogPage.cpp'
--- win32/LogPage.cpp 2011-03-15 19:52:17 +0000
+++ win32/LogPage.cpp 2011-03-27 10:50:56 +0000
@@ -49,6 +49,10 @@
{
setHelpId(IDH_LOGPAGE);
+ grid->column(0).mode = GridInfo::FILL;
+ grid->row(0).mode = GridInfo::FILL;
+ grid->row(0).align = GridInfo::STRETCH;
+
auto group = grid->addChild(GroupBox::Seed(T_("Logging")));
GridPtr grid = group->addChild(Grid::Seed(3, 1));
=== modified file 'win32/NetworkPage.cpp'
--- win32/NetworkPage.cpp 2011-03-15 19:52:17 +0000
+++ win32/NetworkPage.cpp 2011-03-27 10:50:56 +0000
@@ -39,6 +39,8 @@
setHelpId(IDH_NETWORKPAGE);
grid->column(0).mode = GridInfo::FILL;
+ grid->row(0).mode = GridInfo::FILL;
+ grid->row(0).align = GridInfo::STRETCH;
{
GroupBoxPtr autoGroup = grid->addChild(GroupBox::Seed(T_("Automatic connection type detection")));
=== modified file 'win32/PropPage.cpp'
--- win32/PropPage.cpp 2011-03-15 19:52:17 +0000
+++ win32/PropPage.cpp 2011-03-27 10:50:56 +0000
@@ -33,6 +33,8 @@
grid = addChild(Grid::Seed(rows, cols));
grid->setSpacing(10);
+
+ onWindowPosChanged([this](const dwt::Rectangle &) { layout(); });
}
PropPage::~PropPage() {
=== modified file 'win32/ProxyPage.cpp'
--- win32/ProxyPage.cpp 2011-03-15 19:52:17 +0000
+++ win32/ProxyPage.cpp 2011-03-27 10:50:56 +0000
@@ -37,6 +37,8 @@
setHelpId(IDH_PROXYPAGE);
grid->column(0).mode = GridInfo::FILL;
+ grid->row(0).mode = GridInfo::FILL;
+ grid->row(0).align = GridInfo::STRETCH;
{
GridPtr cur = grid->addChild(GroupBox::Seed(T_("Proxy settings for outgoing connections")))->addChild(Grid::Seed(1, 2));