← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1341112 into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1341112 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1341112 in widelands: "Editor line abruption in Noise height tool"
  https://bugs.launchpad.net/widelands/+bug/1341112

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1341112/+merge/226586

More space for strings in editor - a small redesign on the noise height tool, and made some other tools + the main menu wider. If Gaelic fits, everything should fit :P
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1341112/+merge/226586
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1341112 into lp:widelands.
=== modified file 'src/editor/ui_menus/editor_main_menu.cc'
--- src/editor/ui_menus/editor_main_menu.cc	2014-06-08 21:47:45 +0000
+++ src/editor/ui_menus/editor_main_menu.cc	2014-07-12 16:30:30 +0000
@@ -29,7 +29,7 @@
 #include "ui_fsmenu/fileview.h"
 
 //TODO: these should be defined globally for the whole UI
-#define width 150
+#define width 200
 #define height 20
 #define margin 15
 #define hmargin margin

=== modified file 'src/editor/ui_menus/editor_main_menu_map_options.cc'
--- src/editor/ui_menus/editor_main_menu_map_options.cc	2014-06-18 13:20:33 +0000
+++ src/editor/ui_menus/editor_main_menu_map_options.cc	2014-07-12 16:30:30 +0000
@@ -44,7 +44,7 @@
 	:
 	UI::Window
 		(&parent, "map_options",
-		 (parent.get_w() - 200) / 2, (parent.get_h() - 300) / 2, 200, 305,
+		 250, (parent.get_h() - 300) / 2, 200, 305,
 		 _("Map Options"))
 {
 

=== modified file 'src/editor/ui_menus/editor_tool_change_height_options_menu.cc'
--- src/editor/ui_menus/editor_tool_change_height_options_menu.cc	2014-06-08 21:47:45 +0000
+++ src/editor/ui_menus/editor_tool_change_height_options_menu.cc	2014-07-12 16:30:30 +0000
@@ -36,7 +36,7 @@
 	 UI::UniqueWindow::Registry  & registry)
 	:
 	Editor_Tool_Options_Menu
-		(parent, registry, 135, 135, _("Height Tools Options")),
+		(parent, registry, 250, 135, _("Height Tools Options")),
 	m_increase_tool(increase_tool),
 	m_change_by_label
 		(this,

=== modified file 'src/editor/ui_menus/editor_tool_change_resources_options_menu.cc'
--- src/editor/ui_menus/editor_tool_change_resources_options_menu.cc	2014-06-18 13:20:33 +0000
+++ src/editor/ui_menus/editor_tool_change_resources_options_menu.cc	2014-07-12 16:30:30 +0000
@@ -43,7 +43,7 @@
 		 UI::UniqueWindow::Registry     & registry)
 	:
 	Editor_Tool_Options_Menu
-		(parent, registry, 164, 120, _("Resources")),
+		(parent, registry, 250, 120, _("Resources")),
 	m_change_by_label
 		(this,
 		 hmargin(), vmargin(), get_inner_w() - 2 * hmargin(), BUTTON_HEIGHT,

=== modified file 'src/editor/ui_menus/editor_tool_noise_height_options_menu.cc'
--- src/editor/ui_menus/editor_tool_noise_height_options_menu.cc	2014-06-08 21:47:45 +0000
+++ src/editor/ui_menus/editor_tool_noise_height_options_menu.cc	2014-07-12 16:30:30 +0000
@@ -39,23 +39,24 @@
 	 UI::UniqueWindow::Registry & registry)
 	:
 	Editor_Tool_Options_Menu
-		(parent, registry, 200, 115, _("Noise Height Options")),
+		(parent, registry, 250, 3 * height + 4 * vspacing() + 2 * vmargin(), _("Noise Height Options")),
 	m_noise_tool(noise_tool),
 	m_lower_label
 		(this,
 		 hmargin(),
-		 vmargin(), (get_inner_w() - 2 * hmargin() - spacing()) / 2, height,
-		 UI::Align_BottomLeft),
+		 vmargin(),
+		 width, height,
+		 UI::Align_Left),
 	m_upper_label
 		(this,
-		 get_inner_w() / 2,
-		 vmargin(), m_lower_label.get_w(), height,
-		 UI::Align_BottomLeft),
+		 hmargin(),
+		 m_lower_label.get_y() + m_lower_label.get_h() + 2 * vspacing(),
+		 width, height,
+		 UI::Align_Left),
 	m_lower_decrease
 		(this, "decr_lower",
-		 hmargin() +
-		 (get_inner_w() - 2 * hmargin() - hspacing() - 4 * width) / 4,
-		 m_lower_label.get_y() + m_lower_label.get_h() + vspacing(),
+		 get_inner_w() - 2 * width - hspacing(),
+		 m_lower_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_down.png"),
@@ -63,8 +64,8 @@
 		 0 < noise_tool.get_interval().min),
 	m_lower_increase
 		(this, "incr_lower",
-		 m_lower_decrease.get_x() + m_lower_decrease.get_w(),
-		 m_lower_decrease.get_y(),
+		 get_inner_w() - width - hspacing(),
+		 m_lower_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_up.png"),
@@ -72,11 +73,8 @@
 		 noise_tool.get_interval().min < MAX_FIELD_HEIGHT),
 	m_upper_decrease
 		(this, "decr_upper",
-		 m_lower_decrease.get_x() + width
-		 +
-		 (get_inner_w() - 2 * hmargin() - hspacing() - 4 * width) / 2 +
-		 hspacing(),
-		 m_lower_decrease.get_y(),
+		 get_inner_w() - 2 * width - hspacing(),
+		 m_upper_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_down.png"),
@@ -84,8 +82,8 @@
 		 0 < noise_tool.get_interval().max),
 	m_upper_increase
 		(this, "incr_upper",
-		 m_upper_decrease.get_x() + m_upper_decrease.get_w(),
-		 m_upper_decrease.get_y(),
+		 get_inner_w() - width - hspacing(),
+		 m_upper_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_up.png"),
@@ -93,14 +91,14 @@
 		 noise_tool.get_interval().max < MAX_FIELD_HEIGHT),
 	m_set_label
 		(this,
-		 hspacing(),
-		 m_upper_decrease.get_y() + m_upper_decrease.get_h() + vspacing(),
-		 get_inner_w() - 2 * hspacing(), height,
-		 UI::Align_BottomCenter),
+		 hmargin(),
+		 m_upper_label.get_y() + m_upper_label.get_h() + 2 * vspacing(),
+		 width, height,
+		 UI::Align_Left),
 	m_setto_decrease
 		(this, "decr_set_to",
-		 get_inner_w() / 2 - width,
-		 m_set_label.get_y() + m_set_label.get_h() + vspacing(),
+		 get_inner_w() - 2 * width - hspacing(),
+		 m_set_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but1.png"),
 		 g_gr->images().get("pics/scrollbar_down.png"),
@@ -108,8 +106,8 @@
 		 0 < noise_tool.set_tool().get_interval().min),
 	m_setto_increase
 		(this, "incr_set_to",
-		 get_inner_w() / 2,
-		 m_setto_decrease.get_y(),
+		 get_inner_w() - width - hspacing(),
+		 m_set_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but1.png"),
 		 g_gr->images().get("pics/scrollbar_up.png"),

=== modified file 'src/editor/ui_menus/editor_toolsize_menu.cc'
--- src/editor/ui_menus/editor_toolsize_menu.cc	2014-06-08 21:47:45 +0000
+++ src/editor/ui_menus/editor_toolsize_menu.cc	2014-07-12 16:30:30 +0000
@@ -38,18 +38,18 @@
 	(Editor_Interactive & parent, UI::UniqueWindow::Registry & registry)
 	:
 	UI::UniqueWindow
-		(&parent, "toolsize_menu", &registry, 160, 50, _("Tool Size")),
-	m_textarea(this, 5, 5, 150, 10, std::string(), UI::Align_HCenter),
+		(&parent, "toolsize_menu", &registry, 250, 50, _("Tool Size")),
+	m_textarea(this, 5, 10, 240, 10, std::string(), UI::Align_BottomCenter),
 	m_increase
 		(this, "incr",
-		 80, 25, 20, 20,
+		 get_inner_w() / 2 - 10, 25, 20, 20,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_up.png"),
 		 std::string(),
 		 parent.get_sel_radius() < MAX_TOOL_AREA),
 	m_decrease
 		(this, "decr",
-		 60, 25, 20, 20,
+		 get_inner_w() / 2 + 10, 25, 20, 20,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_down.png"),
 		 std::string(),


Follow ups