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

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

[Wesnoth-cvs-commits] wesnoth/src dialogs.cpp show_dialog.cpp


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/src dialogs.cpp show_dialog.cpp
Date: Mon, 04 Apr 2005 16:05:58 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    05/04/04 20:05:58

Modified files:
        src            : dialogs.cpp show_dialog.cpp 

Log message:
        downscaling of campaign-selection dialog in tinygui mode - now usable 
at 320x240

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/dialogs.cpp.diff?tr1=1.95&tr2=1.96&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/show_dialog.cpp.diff?tr1=1.123&tr2=1.124&r1=text&r2=text

Patches:
Index: wesnoth/src/dialogs.cpp
diff -u wesnoth/src/dialogs.cpp:1.95 wesnoth/src/dialogs.cpp:1.96
--- wesnoth/src/dialogs.cpp:1.95        Sun Mar 27 23:06:16 2005
+++ wesnoth/src/dialogs.cpp     Mon Apr  4 20:05:58 2005
@@ -1,4 +1,4 @@
-/* $Id: dialogs.cpp,v 1.95 2005/03/27 23:06:16 gruikya Exp $ */
+/* $Id: dialogs.cpp,v 1.96 2005/04/04 20:05:58 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -736,12 +736,12 @@
 
 
 namespace {
-       static const int campaign_preview_border = 10;
+       static const int campaign_preview_border = font::relative_size(10);
 }
 
 campaign_preview_pane::campaign_preview_pane(CVideo 
&video,std::vector<std::pair<std::string,std::string> >* desc) : 
gui::preview_pane(video),descriptions_(desc),index_(0)
 {
-       set_measurements(350, 400);
+       set_measurements(font::relative_size(350), font::relative_size(400));
 }
 
 bool campaign_preview_pane::show_above() const { return false; }
Index: wesnoth/src/show_dialog.cpp
diff -u wesnoth/src/show_dialog.cpp:1.123 wesnoth/src/show_dialog.cpp:1.124
--- wesnoth/src/show_dialog.cpp:1.123   Sat Apr  2 14:59:58 2005
+++ wesnoth/src/show_dialog.cpp Mon Apr  4 20:05:58 2005
@@ -1,4 +1,4 @@
-/* $Id: show_dialog.cpp,v 1.123 2005/04/02 14:59:58 gruikya Exp $ */
+/* $Id: show_dialog.cpp,v 1.124 2005/04/04 20:05:58 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -354,7 +354,7 @@
        const bool use_textbox = text_widget_text != NULL;
        const bool editable_textbox = use_textbox && 
std::find(text_widget_text->begin(),text_widget_text->end(),'\n') == 
text_widget_text->end();
        static const std::string default_text_string = "";
-       const unsigned int text_box_width = 350;
+       const unsigned int text_box_width = font::relative_size(350);
        textbox text_widget(screen,text_box_width,
                            use_textbox ? *text_widget_text : 
default_text_string, editable_textbox, text_widget_max_chars);
 
@@ -376,11 +376,11 @@
 
        menu_.set_numeric_keypress_selection(use_textbox == false);
 
-       const size_t left_padding = 10;
-       const size_t right_padding = 10;
-       const size_t image_h_padding = image != NULL ? 10 : 0;
-       const size_t top_padding = 10;
-       const size_t bottom_padding = 10;
+       const size_t left_padding = font::relative_size(10);
+       const size_t right_padding = font::relative_size(10);
+       const size_t image_h_padding = font::relative_size(image != NULL ? 10 : 
0);
+       const size_t top_padding = font::relative_size(10);
+       const size_t bottom_padding = font::relative_size(10);
 
        const std::string message = font::word_wrap_text(msg, message_font_size,
                        screen.getx() / 2,
@@ -413,14 +413,14 @@
 
                case YES_NO: {
                        static const char* thebuttons[] = { N_("Yes"),
-                                                                 N_("No"), ""};
+                                                           N_("No"), ""};
                        button_list = thebuttons;
                        break;
                }
 
                case OK_CANCEL: {
                        static const char* thebuttons[] = { N_("Ok"),
-                                                                 
N_("Cancel"),""};
+                                                           N_("Cancel"),""};
                        button_list = thebuttons;
                        break;
                }
@@ -500,7 +500,7 @@
                }
        }
 
-       const int menu_hpadding = text_size.h > 0 && menu_.height() > 0 ? 10 : 
0;
+       const int menu_hpadding = font::relative_size(text_size.h > 0 && 
menu_.height() > 0 ? 10 : 0);
        const size_t padding_width = left_padding + right_padding + 
image_h_padding;
        const size_t padding_height = top_padding + bottom_padding + 
menu_hpadding;
        const size_t caption_width = caption_size.w;




reply via email to

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