Merge lp:~widelands-dev/widelands/tooltips_fixes into lp:widelands
Proposed by
Tino
Status: | Merged |
---|---|
Merged at revision: | 6882 |
Proposed branch: | lp:~widelands-dev/widelands/tooltips_fixes |
Merge into: | lp:widelands |
Diff against target: |
147 lines (+32/-17) 7 files modified
src/ui_basic/table.cc (+3/-2) src/ui_basic/table.h (+4/-2) src/ui_fsmenu/internet_lobby.cc (+15/-3) src/ui_fsmenu/mapselect.cc (+2/-2) src/wui/building_statistics_menu.cc (+4/-4) src/wui/game_message_menu.cc (+2/-2) src/wui/game_summary.cc (+2/-2) |
To merge this branch: | bzr merge lp:~widelands-dev/widelands/tooltips_fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tino | Approve | ||
Review via email: mp+211326@code.launchpad.net |
Description of the change
- Allow setting a tooltip for table column headers
- Implements a tooltip for the internet lobby user status column
To post a comment you must log in.
Lgtm.
> Am 17.03.2014 um 15:25 schrieb Tino <email address hidden>: /code.launchpad .net/~widelands -dev/widelands/ tooltips_ fixes/+ merge/211326 /code.launchpad .net/~widelands -dev/widelands/ tooltips_ fixes/+ merge/211326 basic/table. cc' --- src/ui_ basic/table. cc 2014-02-22 18:04:02 +0000 +++ src/ui_ basic/table. cc 2014-03-17 14:24:48 +0000 @@ -78,7 +78,8 @@ /// Add a new column to this table. void Table::add_column (uint32_t const width, - const std::string & title, + const std::string & title, + const std::string & tooltip, Align const alignment, bool const is_checkbox_column) { @@ -101,7 +102,7 @@ (this, title, complete_width, 0, width, m_headerheight, g_gr->images( ).get(" pics/but3. png"), - title, "", true, false); + title, tooltip, true, false); c.btn-> sigclicked. connect (boost: :bind(& Table:: header_ button_ clicked, boost::ref(*this), m_columns.size())); c.btn-> set_font( Font::get( m_fontname, m_fontsize)); === modified file 'src/ui_ basic/table. h' --- src/ui_ basic/table. h 2014-02-22 18:04:02 +0000 +++ src/ui_ basic/table. h 2014-03-17 14:24:48 +0000 @@ -60,7 +60,8 @@ /// A column that has a title is sortable (by clicking on the title). void add_column (uint32_t width, - const std::string & title = std::string(), + const std::string & title = std::string(), + const std::string & tooltip = std::string(), Align = Align_Left, bool is_checkbox_column = false); @@ -165,7 +166,8 @@ void add_column (uint32_t width, - const std::string & title = std::string(), + const std::string & title = std::string(), + const std::string & tooltip = std::string(), Align = Align_Left, bool is_checkbox_column = false); === modified file 'src/ui_ fsmenu/ internet_ lobby.cc' --- src/ui_ fsmenu/ internet_ lobby.cc 2014-03-03 20:50:30 +0000 +++ src/ui_ fsmenu/ internet_ lobby.cc 2014-03-17 14:24:48 +0000 @@ -19,7 +19,8 @@ #include "ui_fsmenu/ internet_ lobby.h" -#include +#include +#include #include "compile_ diagnostics. h" #include "constants.h" @@ -151,8 +152,19 @@ servername .set_font(m_fn, m_fs, UI_FONT_CLR_FG); // prepare the lists - clientsonline .set_font(m_fn, m_fs); - clientsonline .add_column(22, "°"); + clientsonline .set_font(m_fn, m_fs); + std::string t_tip = (boost: :format( "%s%s%s% s%s%s%s% s%s%s") + % " fsmenu/ mapselect. cc' --- src/ui_ fsmenu/ mapselect. cc 2014...
>
> Tino has proposed merging lp:~widelands-dev/widelands/tooltips_fixes into lp:widelands.
>
> Requested reviews:
> Widelands Developers (widelands-dev)
>
> For more details, see:
> https:/
>
> - Allow setting a tooltip for table column headers
> - Implements a tooltip for the internet lobby user status column
> --
> https:/
> Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/tooltips_fixes into lp:widelands.
> === modified file 'src/ui_
> " + % _("User Status") + % "
> " + % " " + % _("Registered") + % "
> " + % _("Administrator") + % "
> " + % _("Unregistered") + % "
>
> ").str(); + clientsonline .add_column(22, "°", t_tip); clientsonline .add_column((m_lisw - 22) * 3 / 8, _("Name")); clientsonline .add_column((m_lisw - 22) * 2 / 8, _("Points")); clientsonline .add_column((m_lisw - 22) * 3 / 8, _("Game")); === modified file 'src/ui_