Author: mordante
Date: Sat Dec  6 22:42:40 2008
New Revision: 31321

URL: http://svn.gna.org/viewcvs/wesnoth?rev=31321&view=rev
Log:
Fix several bugs in the horizontal scrollbar.

It seems there were some copy paste issues left, after testing all seems
to work properly now.

Modified:
    trunk/src/gui/widgets/horizontal_scrollbar.cpp
    trunk/src/gui/widgets/horizontal_scrollbar.hpp

Modified: trunk/src/gui/widgets/horizontal_scrollbar.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/horizontal_scrollbar.cpp?rev=31321&r1=31320&r2=31321&view=diff
==============================================================================
--- trunk/src/gui/widgets/horizontal_scrollbar.cpp (original)
+++ trunk/src/gui/widgets/horizontal_scrollbar.cpp Sat Dec  6 22:42:40 2008
@@ -79,9 +79,9 @@
        }
 
        // we also assume the bar is over the entire width of the widget.
-       if(static_cast<size_t>(coordinate.y) < get_positioner_offset()) {
+       if(static_cast<size_t>(coordinate.x) < get_positioner_offset()) {
                return -1;
-       } else if(static_cast<size_t>(coordinate.y) > 
+       } else if(static_cast<size_t>(coordinate.x) > 
                        get_positioner_offset() + get_positioner_length()) {
 
                return 1;
@@ -92,4 +92,3 @@
 
 } // namespace gui2
 
-

Modified: trunk/src/gui/widgets/horizontal_scrollbar.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/horizontal_scrollbar.hpp?rev=31321&r1=31320&r2=31321&view=diff
==============================================================================
--- trunk/src/gui/widgets/horizontal_scrollbar.hpp (original)
+++ trunk/src/gui/widgets/horizontal_scrollbar.hpp Sat Dec  6 22:42:40 2008
@@ -32,7 +32,7 @@
 private:
 
        /** Inherited from tscrollbar. */
-       unsigned get_length() const { return get_height(); }
+       unsigned get_length() const { return get_width(); }
 
        /** Inherited from tscrollbar. */
        unsigned minimum_positioner_length() const;
@@ -54,7 +54,7 @@
 
        /** Inherited from tscrollbar. */
        int get_length_difference(const tpoint& original, const tpoint& 
current) const
-               { return current.y - original.y; }
+               { return current.x - original.x; }
 
        /** Inherited from tcontrol. */
        const std::string& get_control_type() const 


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to