[Widelands-dev] [Merge] lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands

2016-11-14 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/scrollbar_beautification into 
lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/scrollbar_beautification/+merge/309635
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scrollbar_beautification.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands

2016-11-14 Thread GunChleoc
Yes, that's on purpose. We need new art.

https://wl.widelands.org/forum/topic/2648/

Thanks for the review

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/scrollbar_beautification/+merge/309635
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scrollbar_beautification.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands

2016-11-14 Thread SirVer
Review: Approve

lgtm.

Unrelated: have you started the game at 800x600 lately? The 'Widelands' logo is 
partly covered by the edge images.

Diff comments:

> 
> === modified file 'src/ui_basic/table.cc'
> --- src/ui_basic/table.cc 2016-10-24 14:04:00 +
> +++ src/ui_basic/table.cc 2016-11-03 07:34:45 +
> @@ -523,6 +543,34 @@
>   return columns_[sort_column_].compare(a, b);
>  }
>  
> +void Table::layout() {
> + // If we have a flexible column, adjust the column sizes.
> + if (flexible_column_ != std::numeric_limits::max()) {

Instead of if (){} use if (!()) {return}; to avoid right drift.

> + int all_columns_width = scrollbar_->is_enabled() ? 
> scrollbar_->get_w() : 0;
> + for (const auto& column : columns_) {
> + all_columns_width += column.width;
> + }
> + if (all_columns_width != get_w()) {
> + Column& column = columns_.at(flexible_column_);
> + column.width = column.width + get_w() - 
> all_columns_width;
> + column.btn->set_size(column.width, column.btn->get_h());
> + int offset = 0;
> + for (const auto& col : columns_) {
> + col.btn->set_pos(Vector2i(offset, 
> col.btn->get_y()));
> + offset = col.btn->get_x() + col.btn->get_w();
> + }
> + if (scrollbar_->is_enabled()) {
> + const UI::Button* last_column_btn = 
> columns_.back().btn;
> + scrollbar_filler_button_->set_pos(
> +Vector2i(last_column_btn->get_x() + 
> last_column_btn->get_w(), 0));
> + scrollbar_filler_button_->set_visible(true);
> + } else {
> + scrollbar_filler_button_->set_visible(false);
> + }
> + }
> + }
> +}
> +
>  /**
>   * Sort the table alphabetically. Make sure that the current selection stays
>   * valid (though it might scroll out of visibility).


-- 
https://code.launchpad.net/~widelands-dev/widelands/scrollbar_beautification/+merge/309635
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scrollbar_beautification.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands

2016-11-09 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1569. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/172860675.
Appveyor build 1408. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_scrollbar_beautification-1408.
-- 
https://code.launchpad.net/~widelands-dev/widelands/scrollbar_beautification/+merge/309635
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scrollbar_beautification.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands

2016-11-09 Thread bunnybot
Bunnybot encountered an error while working on this merge proposal:

('The read operation timed out',)
-- 
https://code.launchpad.net/~widelands-dev/widelands/scrollbar_beautification/+merge/309635
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scrollbar_beautification.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands

2016-10-31 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1541. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/171903635.
Appveyor build 1382. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_scrollbar_beautification-1382.
-- 
https://code.launchpad.net/~widelands-dev/widelands/scrollbar_beautification/+merge/309635
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scrollbar_beautification.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands

2016-10-30 Thread Tino
Review: Approve

Everything's ok on my end.
-- 
https://code.launchpad.net/~widelands-dev/widelands/scrollbar_beautification/+merge/309635
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scrollbar_beautification.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands

2016-10-30 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1536. State: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/171740171.
Appveyor build 1378. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_scrollbar_beautification-1378.
-- 
https://code.launchpad.net/~widelands-dev/widelands/scrollbar_beautification/+merge/309635
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scrollbar_beautification.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands

2016-10-30 Thread Klaus Halfmann
Review: Needs Fixing compile

Mhh, this does not compile for me:

In file included from 
...widelands-repo/scrollbar_beautification/src/wui/encyclopedia_window.h:32:
...widelands-repo/scrollbar_beautification/src/ui_basic/table.h:352:7: error: 
no matching constructor for
  initialization of 'Table'
   : Base(parent, x, y, w, h, descending) {


-- 
https://code.launchpad.net/~widelands-dev/widelands/scrollbar_beautification/+merge/309635
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scrollbar_beautification.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands

2016-10-30 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands.

Commit message:
Improved scrollbar and table header layout and fixed croopping issues with 
scrolling dropdowns.

- Scrollbars now use brighten_rect for their layout and have a beveled edge. 
Removed background picture.
- Button background for scrollbars and table headers is now configurable.
- Tables can now assign a column that will adjust its width according to 
overall table size. Stop painting into the scrollbar.
- Fixed text cropping for scrolling dropdowns.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/scrollbar_beautification/+merge/309635
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/scrollbar_beautification into lp:widelands.
=== removed file 'data/images/ui_basic/scrollbar_background.png'
Binary files data/images/ui_basic/scrollbar_background.png	2014-12-03 10:10:14 + and data/images/ui_basic/scrollbar_background.png	1970-01-01 00:00:00 + differ
=== modified file 'src/editor/ui_menus/categorized_item_selection_menu.h'
--- src/editor/ui_menus/categorized_item_selection_menu.h	2016-08-04 15:49:05 +
+++ src/editor/ui_menus/categorized_item_selection_menu.h	2016-10-30 09:05:12 +
@@ -90,6 +90,7 @@
   20,
   "",
   UI::Align::kCenter,
+  g_gr->images().get("images/ui_basic/but1.png"),
   UI::MultilineTextarea::ScrollMode::kNoScrolling),
  tool_(tool) {
 	add(_panel_, UI::Align::kCenter);

=== modified file 'src/editor/ui_menus/main_menu_map_options.cc'
--- src/editor/ui_menus/main_menu_map_options.cc	2016-10-25 08:11:31 +
+++ src/editor/ui_menus/main_menu_map_options.cc	2016-10-30 09:05:12 +
@@ -79,7 +79,13 @@
  author_(_box_, 0, 0, max_w_, 0, 2, g_gr->images().get("images/ui_basic/but1.png")),
  size_(_box_, 0, 0, max_w_ - indent_, labelh_, ""),
 
- teams_list_(_box_, 0, 0, max_w_, 60, UI::ListselectLayout::kShowCheck),
+ teams_list_(_box_,
+ 0,
+ 0,
+ max_w_,
+ 60,
+ g_gr->images().get("images/ui_basic/but1.png"),
+ UI::ListselectLayout::kShowCheck),
 
  modal_(modal) {
 
@@ -96,8 +102,10 @@
 	// height.
 	hint_ =
 	   new UI::MultilineEditbox(_box_, 0, 0, max_w_, std::max(labelh_, remaining_space * 1 / 3),
-	"", g_gr->images().get("images/ui_basic/but1.png"));
+	"", g_gr->images().get("images/ui_basic/but1.png"),
+	g_gr->images().get("images/ui_basic/but1.png"));
 	descr_ = new UI::MultilineEditbox(_box_, 0, 0, max_w_, remaining_space - hint_->get_h(), "",
+	  g_gr->images().get("images/ui_basic/but1.png"),
 	  g_gr->images().get("images/ui_basic/but1.png"));
 
 	main_box_.add(

=== modified file 'src/ui_basic/box.cc'
--- src/ui_basic/box.cc	2016-10-16 09:31:42 +
+++ src/ui_basic/box.cc	2016-10-30 09:05:12 +
@@ -166,7 +166,9 @@
 			pagesize = get_inner_h() - Scrollbar::kSize;
 		}
 		if (scrollbar_ == nullptr) {
-			scrollbar_.reset(new Scrollbar(this, sb_x, sb_y, sb_w, sb_h, orientation_ == Horizontal));
+			scrollbar_.reset(new Scrollbar(this, sb_x, sb_y, sb_w, sb_h,
+			   g_gr->images().get("images/ui_basic/but3.png"),
+			   orientation_ == Horizontal));
 			scrollbar_->moved.connect(boost::bind(::scrollbar_moved, this, _1));
 		} else {
 			scrollbar_->set_pos(Vector2i(sb_x, sb_y));

=== modified file 'src/ui_basic/dropdown.cc'
--- src/ui_basic/dropdown.cc	2016-10-28 10:05:18 +
+++ src/ui_basic/dropdown.cc	2016-10-30 09:05:12 +
@@ -26,15 +26,19 @@
 #include "base/i18n.h"
 #include "graphic/align.h"
 #include "graphic/font_handler1.h"
-#include "graphic/graphic.h"
-#include "graphic/image.h"
 #include "graphic/rendertarget.h"
 #include "ui_basic/mouse_constants.h"
 
 namespace UI {
 
-BaseDropdown::BaseDropdown(
-   UI::Panel* parent, int32_t x, int32_t y, uint32_t w, uint32_t h, const std::string& label)
+BaseDropdown::BaseDropdown(UI::Panel* parent,
+   int32_t x,
+   int32_t y,
+   uint32_t w,
+   uint32_t h,
+   const std::string& label,
+   const Image* background,
+   const Image* button_background)
: UI::Panel(
 p