paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-users] patch pgscrollarea.cpp.deff no work.


From: Алексей
Subject: [paragui-users] patch pgscrollarea.cpp.deff no work.
Date: Tue, 27 Dec 2005 17:09:45 +0200 (EET)

<<On Fri, Dec 23, 2005 at 05:22:53PM +0200, ??????? wrote:
<<> yes, i really need the patch for 1.1.8 version. send it to <<address@hidden 
please!
<<Ok. I have just tried, it should be possible to just patch the <<1.1.8
<<files. If not, I hope you can read patch files and apply the <<changes 
manually. ^o^

<<The .diff files are patch files, with the listbox.cpp file just
<<overwrite the file in the test directory and see how it works.


<<Ulf

 



--- orig/src/widgets/pgscrollarea.cpp   2005-12-20 22:06:20.000000000 +0100
+++ paragui/src/widgets/pgscrollarea.cpp        2005-12-20 23:02:00.000000000 
+0100
@@ -92,7 +92,7 @@
        }
 }
 
-void PG_ScrollArea::ScrollToWidget(PG_Widget* widget, bool bVertical) {
+void PG_ScrollArea::ScrollToWidget(PG_Widget* widget, bool bVertical, bool 
invert) {
        if(GetWidgetCount() == 0) {
                return;
        }
@@ -105,8 +105,14 @@
                if(widget->y >= my_ypos && widget->y+widget->h <= 
my_ypos+my_height) {
                        return;
                }
-               ypos = widget->y - my_ypos + my_area.y;
-               xpos = my_area.x;
+        if (invert) {
+            ypos = widget->y + widget->h - my_ypos - my_height + my_area.y;
+            xpos = my_area.x;
+        }
+        else {    
+                   ypos = widget->y - my_ypos + my_area.y;
+                   xpos = my_area.x;
+        }
                if(my_area.h > my_height && ypos > my_area.h - my_height) {
                        ypos = my_area.h - my_height;
                }
@@ -116,8 +122,15 @@
                if(widget->x >= my_xpos && widget->x+widget->w <= 
my_xpos+my_width) {
                        return;
                }
-               xpos = widget->x - my_xpos + my_area.x;
-               ypos = my_area.y;
+
+        if (invert) {
+            xpos = widget->x + widget->h - my_xpos - my_height + my_area.x;
+            ypos = my_area.y;
+        }
+        else {
+            xpos = widget->x - my_xpos + my_area.x;
+            ypos = my_area.y;
+        }
                if(my_area.w > my_width && xpos > my_area.w - my_width) {
                        xpos = my_area.w - my_width;
                }


this is code in my file pgscrollarea.cpp.


void PG_ScrollArea::ScrollToWidget(PG_Widget* widget, bool bVertical) {
        if(GetWidgetCount() == 0) {
                return;
        }

        Uint16 ypos = 0;
        Uint16 xpos = 0;
        
        if(bVertical) {
                ypos = widget->y - my_ypos + my_area.y;
                xpos = my_area.x;
        }
        else {
                xpos = widget->x - my_xpos + my_area.x;
                ypos = my_area.y;
        }

        ScrollTo(xpos, ypos);
}

This patch does not work. The initial code pgscrollarea.cpp does not coincide 
with a patch. Probably at you newer version of a file pgscrollarea.cpp. I use 
version 1.1.8. Send, if it is not difficult, a ready file pgscrollarea.cpp, 
that is with add a patch. 

___________________________________
Новый тариф компании EXPRESS, Интернет 64k всего за 95 гривен 
http://express.net.ua







reply via email to

[Prev in Thread] Current Thread [Next in Thread]