← Back to team overview

widelands-dev team mailing list archive

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

 

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

Commit message:
Increased label height in spinboxes to avoid autogeneration of scrollbar button by the MultilineTextarea.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1532279 in widelands: "Spin box not displayed correct in options menu"
  https://bugs.launchpad.net/widelands/+bug/1532279

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

The extra button belonged to the scrollbar generated by the label, which is a Multilinetextarea. So, I gave the label a bit more height.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1532279 into lp:widelands.
=== modified file 'i18n/fonts.lua'
--- i18n/fonts.lua	2015-10-31 12:11:44 +0000
+++ i18n/fonts.lua	2016-01-23 14:51:39 +0000
@@ -46,7 +46,8 @@
 
    devanagari = {
       serif = "Nakula/nakula.ttf",
-      direction = "rtl"
+      direction = "rtl",
+      size_offset = 2
    },
 
    hebrew = {
@@ -56,11 +57,13 @@
       sans = "Culmus/TaameyFrankCLM-Medium.ttf",
       sans_bold = "TaameyFrankCLM-Bold.ttf",
       sans_italic = "Culmus/TaameyFrankCLM-MediumOblique.ttf",
-      direction = "rtl"
+      direction = "rtl",
+      size_offset = 4
    },
 
    myanmar = {
       serif = "mmrCensus/mmrCensus.ttf",
+      size_offset = 2
    },
 
    sinhala = {

=== modified file 'src/ui_basic/spinbox.cc'
--- src/ui_basic/spinbox.cc	2016-01-01 18:41:20 +0000
+++ src/ui_basic/spinbox.cc	2016-01-23 14:51:39 +0000
@@ -108,7 +108,7 @@
 	uint32_t padding = 2;
 	uint32_t actual_w = std::max(w, unit_w);
 	uint32_t no_padding = (is_big ? 6 : 4);
-	uint32_t texth = UI::g_fh1->render(as_uifont("."))->height();
+	uint32_t texth = UI::g_fh1->render(as_uifont("."))->height() + 2;
 	uint32_t buttonh = 20;
 
 	// 40 is an ad hoc width estimate for the MultilineTextarea scrollbar + a bit of text.

=== modified file 'src/ui_fsmenu/options.cc'
--- src/ui_fsmenu/options.cc	2016-01-05 09:54:44 +0000
+++ src/ui_fsmenu/options.cc	2016-01-23 14:51:39 +0000
@@ -189,7 +189,7 @@
 
 	// Saving options
 	sb_autosave_
-		(&box_saving_, 0, 0, column_width_, 240,
+		(&box_saving_, 0, 0, column_width_, 250,
 		 opt.autosave / 60, 0, 100, _("Save game automatically every"),
 		 /** TRANSLATORS: Options: Save game automatically every: */
 		 /** TRANSLATORS: This will have a number added in front of it */
@@ -197,13 +197,13 @@
 		 g_gr->images().get("pics/but3.png"), UI::SpinBox::Type::kBig),
 
 	sb_rolling_autosave_
-		(&box_saving_, 0, 0, column_width_, 240,
+		(&box_saving_, 0, 0, column_width_, 250,
 		 opt.rolling_autosave, 1, 20, _("Maximum number of autosave files"),
 		 "",
 		 g_gr->images().get("pics/but3.png"), UI::SpinBox::Type::kBig),
 
 	sb_remove_replays_
-		(&box_saving_, 0, 0, column_width_, 240,
+		(&box_saving_, 0, 0, column_width_, 250,
 		 opt.remove_replays, 0, 365, _("Remove replays older than:"),
 		 /** TRANSLATORS: Options: Remove Replays older than: */
 		 /** TRANSLATORS: This will have a number added in front of it */


Follow ups