|
From: <zou...@us...> - 2008-03-18 21:35:32
|
Revision: 1046
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1046&view=rev
Author: zouzou123gen
Date: 2008-03-18 14:34:44 -0700 (Tue, 18 Mar 2008)
Log Message:
-----------
fix menu rectangles + focus problem with the tray icon
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/smartwin/source/widgets/WidgetMenu.cpp
dcplusplus/trunk/win32/MainWindow.cpp
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-03-18 20:03:39 UTC (rev 1045)
+++ dcplusplus/trunk/changelog.txt 2008-03-18 21:34:44 UTC (rev 1046)
@@ -2,6 +2,7 @@
* [L#202563] Fixed some missing translations
* Fixed help links (thanks poy)
* Use setenv on unix (thanks yakov suraev)
+* Fixed out of focus window when restoring from icon (poy)
-- 0.705 2008-03-14 --
* Several patches for better *nix compatibility of the core (thanks steven sheehy et al)
Modified: dcplusplus/trunk/smartwin/source/widgets/WidgetMenu.cpp
===================================================================
--- dcplusplus/trunk/smartwin/source/widgets/WidgetMenu.cpp 2008-03-18 20:03:39 UTC (rev 1045)
+++ dcplusplus/trunk/smartwin/source/widgets/WidgetMenu.cpp 2008-03-18 21:34:44 UTC (rev 1046)
@@ -585,14 +585,14 @@
// center in the item rectangle
rectangle.pos.x += stripWidth + textIconGap;
- rectangle.pos.y += rectangle.width() / 2 - 1;
+ rectangle.pos.y += rectangle.height() / 2 - 1;
// select color
Canvas::Selector select(canvas, *PenPtr(new Pen(::GetSysColor( COLOR_GRAYTEXT ))));
// draw separator
canvas.moveTo( rectangle.left(), rectangle.top() );
- canvas.lineTo( rectangle.right(), rectangle.bottom() );
+ canvas.lineTo( rectangle.width(), rectangle.top() );
} // end if
else // not a seperator, then draw item text and icon
{
@@ -665,7 +665,7 @@
// adjust icon rectangle
imageRectangle.pos.x += ( stripWidth - imageSize.x ) / 2;
- imageRectangle.pos.y += ( itemRectangle.width() - imageSize.y ) / 2;
+ imageRectangle.pos.y += ( itemRectangle.height() - imageSize.y ) / 2;
if ( image == NULL ) // drawing item without icon
{
@@ -687,7 +687,7 @@
const int adjustment = 2; // adjustment for mark to be in the center
// bit - blast into out canvas
- ::BitBlt( canvas.handle(), imageRectangle.x() + adjustment, imageRectangle.y(), imageSize.x, imageSize.y, memoryDC, 0, 0, SRCAND );
+ ::BitBlt( canvas.handle(), imageRectangle.left() + adjustment, imageRectangle.top(), imageSize.x, imageSize.y, memoryDC, 0, 0, SRCAND );
// delete memory dc
::DeleteObject( ::SelectObject( memoryDC, old ) );
Modified: dcplusplus/trunk/win32/MainWindow.cpp
===================================================================
--- dcplusplus/trunk/win32/MainWindow.cpp 2008-03-18 20:03:39 UTC (rev 1045)
+++ dcplusplus/trunk/win32/MainWindow.cpp 2008-03-18 21:34:44 UTC (rev 1046)
@@ -972,6 +972,7 @@
}
void MainWindow::handleRestore() {
+ setVisible(true);
if(maximized) {
maximize();
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|