Author: mordante
Date: Thu May 21 21:12:28 2009
New Revision: 35805

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35805&view=rev
Log:
Remove the unused function twidget::layout_shrink_width.

Modified:
    trunk/src/gui/widgets/control.cpp
    trunk/src/gui/widgets/control.hpp
    trunk/src/gui/widgets/widget.hpp

Modified: trunk/src/gui/widgets/control.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/control.cpp?rev=35805&r1=35804&r2=35805&view=diff
==============================================================================
--- trunk/src/gui/widgets/control.cpp (original)
+++ trunk/src/gui/widgets/control.cpp Thu May 21 21:12:28 2009
@@ -185,20 +185,6 @@
                                << ".\n";
 
        }
-}
-
-void tcontrol::layout_shrink_width(const unsigned maximum_width)
-{
-       DBG_GUI_L << "tcontrol(" + get_control_type() + ") " + __func__ + ":"
-                       << " maximum_width " << maximum_width
-                       << ".\n";
-
-       /** @todo handle the tooltip properly. */
-
-       shrunken_ = true;
-       set_layout_size(tpoint(maximum_width, get_best_size().y));
-
-       assert(static_cast<unsigned>(get_best_size().x) == maximum_width);
 }
 
 tpoint tcontrol::calculate_best_size() const

Modified: trunk/src/gui/widgets/control.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/control.hpp?rev=35805&r1=35804&r2=35805&view=diff
==============================================================================
--- trunk/src/gui/widgets/control.hpp (original)
+++ trunk/src/gui/widgets/control.hpp Thu May 21 21:12:28 2009
@@ -158,9 +158,6 @@
        /** Inherited from twidget. */
        void layout_wrap(const unsigned maximum_width);
 
-       /** Inherited from twidget. */
-       void layout_shrink_width(const unsigned maximum_width);
-
 protected:
        /** Inherited from twidget. */
        tpoint calculate_best_size() const;

Modified: trunk/src/gui/widgets/widget.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/widget.hpp?rev=35805&r1=35804&r2=35805&view=diff
==============================================================================
--- trunk/src/gui/widgets/widget.hpp (original)
+++ trunk/src/gui/widgets/widget.hpp Thu May 21 21:12:28 2009
@@ -284,20 +284,6 @@
        virtual bool can_shrink_width() const { return false; }
 
        /**
-        * Shrinks the contents of the widget so it can fit the wanted width
-        *
-        * @todo implement this function properly at the moment it kind of works
-        * for a label but should also work for a button and maybe some other
-        * classes.
-        *
-        * @param maximum_width       The wanted maximum width of the widget.
-        *
-        * @pre                       can_shrink_width() == true.
-        */
-       virtual void layout_shrink_width(const unsigned /*maximum_width*/)
-               { assert(can_shrink_width()); }
-
-       /**
         * Does the widget have a vertical scrollbar.
         *
         * We want to use the best size for a widget, when the best size for all


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

Reply via email to