wesnoth-cvs-commits
[Top][All Lists]
Advanced

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

[Wesnoth-cvs-commits] wesnoth/src preferences.cpp


From: Jon Daniel
Subject: [Wesnoth-cvs-commits] wesnoth/src preferences.cpp
Date: Mon, 01 Aug 2005 13:07:06 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Jon Daniel <address@hidden>     05/08/01 17:07:06

Modified files:
        src            : preferences.cpp 

Log message:
        only use slider_label_width_ if there are multiple sliders at the same 
tab otherwise just use the label width

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/preferences.cpp.diff?tr1=1.168&tr2=1.169&r1=text&r2=text

Patches:
Index: wesnoth/src/preferences.cpp
diff -u wesnoth/src/preferences.cpp:1.168 wesnoth/src/preferences.cpp:1.169
--- wesnoth/src/preferences.cpp:1.168   Mon Aug  1 07:47:07 2005
+++ wesnoth/src/preferences.cpp Mon Aug  1 17:07:06 2005
@@ -1,4 +1,4 @@
-/* $Id: preferences.cpp,v 1.168 2005/08/01 07:47:07 j_daniel Exp $ */
+/* $Id: preferences.cpp,v 1.169 2005/08/01 17:07:06 j_daniel Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -913,10 +913,6 @@
        set_measurements(400, 400);
 #endif
 
-       slider_label_width_ = maximum<unsigned>(music_label_.width(),
-                             maximum<unsigned>(sound_label_.width(),
-                             maximum<unsigned>(scroll_label_.width(),
-                                               gamma_label_.width())));
 
        sound_button_.set_check(sound_on());
        sound_button_.set_help_string(_("Sound effects on/off"));
@@ -1000,8 +996,8 @@
        // General tab
        int ypos = rect.y;
        scroll_label_.set_location(rect.x, ypos);
-       SDL_Rect scroll_rect = { rect.x + slider_label_width_, ypos,
-                                rect.w - slider_label_width_ - border, 0 };
+       SDL_Rect scroll_rect = { rect.x + scroll_label_.width(), ypos,
+                                rect.w - scroll_label_.width() - border, 0 };
        scroll_slider_.set_location(scroll_rect);
        ypos += item_interline; turbo_button_.set_location(rect.x, ypos);
        ypos += item_interline; show_ai_moves_button_.set_location(rect.x, 
ypos);
@@ -1016,8 +1012,8 @@
        gamma_button_.set_location(rect.x, ypos);
        ypos += item_interline;
        gamma_label_.set_location(rect.x, ypos);
-       SDL_Rect gamma_rect = { rect.x + slider_label_width_, ypos,
-                               rect.w - slider_label_width_ - border, 0 };
+       SDL_Rect gamma_rect = { rect.x + gamma_label_.width(), ypos,
+                               rect.w - gamma_label_.width() - border, 0 };
        gamma_slider_.set_location(gamma_rect);
        ypos += item_interline; flip_time_button_.set_location(rect.x,ypos);
        ypos += item_interline; 
show_floating_labels_button_.set_location(rect.x, ypos);
@@ -1027,14 +1023,14 @@
        ypos += item_interline; video_mode_button_.set_location(rect.x, ypos);
 
        // Sound tab
+       slider_label_width_ = maximum<unsigned>(music_label_.width(), 
sound_label_.width());
        ypos = rect.y;
        sound_button_.set_location(rect.x, ypos);
 
-       const unsigned slider_label_width = 
maximum<unsigned>(sound_label_.width(), music_label_.width());
        ypos += item_interline;
        sound_label_.set_location(rect.x, ypos);
-       const SDL_Rect sound_rect = { rect.x + slider_label_width, ypos,
-                               rect.w - slider_label_width - border, 0 };
+       const SDL_Rect sound_rect = { rect.x + slider_label_width_, ypos,
+                               rect.w - slider_label_width_ - border, 0 };
        sound_slider_.set_location(sound_rect);
 
        ypos += item_interline;
@@ -1042,8 +1038,8 @@
 
        ypos += item_interline;
        music_label_.set_location(rect.x, ypos);
-       const SDL_Rect music_rect = { rect.x + slider_label_width, ypos,
-                               rect.w - slider_label_width - border, 0 };
+       const SDL_Rect music_rect = { rect.x + slider_label_width_, ypos,
+                               rect.w - slider_label_width_ - border, 0 };
        music_slider_.set_location(music_rect);
 
        //Advanced tab




reply via email to

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