← 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 '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:28:11 +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() + 1;
 	uint32_t buttonh = 20;
 
 	// 40 is an ad hoc width estimate for the MultilineTextarea scrollbar + a bit of text.


Follow ups