Merge lp:~widelands-dev/widelands/bug-1818013-new-logo into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 9113
Proposed branch: lp:~widelands-dev/widelands/bug-1818013-new-logo
Merge into: lp:widelands
Diff against target: 98 lines (+18/-6)
4 files modified
src/ui_basic/icon.cc (+6/-0)
src/ui_basic/icon.h (+4/-0)
src/ui_fsmenu/main.cc (+6/-6)
src/ui_fsmenu/main.h (+2/-0)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1818013-new-logo
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+366502@code.launchpad.net

Commit message

New Widelands logo by Nytren. Add it as an icon rather than an overlay for more fine-grained positioning.

To post a comment you must log in.
Revision history for this message
Benedikt Straub (nordfriese) wrote :

Do the splash screen and the editor loading screen also get the new font and style?

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4799. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/524373614.
Appveyor build 4580. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1818013_new_logo-4580.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Impossible for them at the moment without replacing the images as well, because the "Widelands" text is baked into the images, and we have no layered versions.

Revision history for this message
Toni Förster (stonerl) wrote :

Shouldn't we consider replacing the pictures entirely? They are only available in 800x600.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I'd certainly be in favor of that.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 5008. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/533694061.
Appveyor build 4789. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1818013_new_logo-4789.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Any objections to merging this?

Revision history for this message
kaputtnik (franku) wrote :

From my side: no.

Not tested though.

Revision history for this message
GunChleoc (gunchleoc) wrote :

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/images/ui_fsmenu/main_title.png'
0Binary files data/images/ui_fsmenu/main_title.png 2019-03-30 06:46:25 +0000 and data/images/ui_fsmenu/main_title.png 2019-05-17 07:59:12 +0000 differ0Binary files data/images/ui_fsmenu/main_title.png 2019-03-30 06:46:25 +0000 and data/images/ui_fsmenu/main_title.png 2019-05-17 07:59:12 +0000 differ
=== modified file 'src/ui_basic/icon.cc'
--- src/ui_basic/icon.cc 2019-02-23 11:00:49 +0000
+++ src/ui_basic/icon.cc 2019-05-17 07:59:12 +0000
@@ -35,6 +35,12 @@
35 set_thinks(false);35 set_thinks(false);
36}36}
3737
38
39Icon::Icon(Panel* const parent,
40 const Image* picture_id)
41 : Icon(parent, 0, 0, picture_id->width(), picture_id->height(), picture_id) {
42}
43
38void Icon::set_icon(const Image* picture_id) {44void Icon::set_icon(const Image* picture_id) {
39 pic_ = picture_id;45 pic_ = picture_id;
40}46}
4147
=== modified file 'src/ui_basic/icon.h'
--- src/ui_basic/icon.h 2019-02-23 11:00:49 +0000
+++ src/ui_basic/icon.h 2019-05-17 07:59:12 +0000
@@ -30,7 +30,11 @@
30 * bigger than the icon, the image will be scaled to fit.30 * bigger than the icon, the image will be scaled to fit.
31 */31 */
32struct Icon : public Panel {32struct Icon : public Panel {
33 /// Create a new icon with the given dimensions and position offset
33 Icon(Panel* parent, int32_t x, int32_t y, int32_t w, int32_t h, const Image* picture_id);34 Icon(Panel* parent, int32_t x, int32_t y, int32_t w, int32_t h, const Image* picture_id);
35 /// Create a new icon with no offset. Dimentions are taken from 'picture_id'.
36 Icon(Panel* parent, const Image* picture_id);
37
3438
35 void set_icon(const Image* picture_id);39 void set_icon(const Image* picture_id);
36 const Image* icon() const {40 const Image* icon() const {
3741
=== modified file 'src/ui_fsmenu/main.cc'
--- src/ui_fsmenu/main.cc 2019-04-11 05:45:55 +0000
+++ src/ui_fsmenu/main.cc 2019-05-17 07:59:12 +0000
@@ -27,6 +27,8 @@
27FullscreenMenuMain::FullscreenMenuMain()27FullscreenMenuMain::FullscreenMenuMain()
28 : FullscreenMenuMainMenu(),28 : FullscreenMenuMainMenu(),
2929
30 logo_icon_(this, g_gr->images().get("images/ui_fsmenu/main_title.png")),
31
30 // Buttons32 // Buttons
31 playtutorial(&vbox_,33 playtutorial(&vbox_,
32 "play_tutorial",34 "play_tutorial",
@@ -107,9 +109,6 @@
107 vbox_.add_inf_space();109 vbox_.add_inf_space();
108 vbox_.add(&exit, UI::Box::Resizing::kFullSize);110 vbox_.add(&exit, UI::Box::Resizing::kFullSize);
109111
110 add_overlay_image("images/ui_fsmenu/main_title.png",
111 FullscreenWindow::Alignment(UI::Align::kCenter, UI::Align::kTop));
112
113 layout();112 layout();
114}113}
115114
@@ -119,6 +118,9 @@
119118
120void FullscreenMenuMain::layout() {119void FullscreenMenuMain::layout() {
121 FullscreenMenuMainMenu::layout();120 FullscreenMenuMainMenu::layout();
121
122 logo_icon_.set_pos(Vector2i((get_w() - logo_icon_.get_w()) / 2, title_y_ + logo_icon_.get_h() / 4));
123
122 const int text_height = 0.5 * version.get_h() + padding_;124 const int text_height = 0.5 * version.get_h() + padding_;
123 version.set_pos(Vector2i(get_w() - version.get_w(), get_h() - text_height));125 version.set_pos(Vector2i(get_w() - version.get_w(), get_h() - text_height));
124 copyright.set_pos(Vector2i(0, get_h() - 2 * text_height));126 copyright.set_pos(Vector2i(0, get_h() - 2 * text_height));
@@ -133,9 +135,7 @@
133 about.set_desired_size(butw_, buth_);135 about.set_desired_size(butw_, buth_);
134 exit.set_desired_size(butw_, buth_);136 exit.set_desired_size(butw_, buth_);
135137
136 // This box needs to be positioned a bit higher than in the other menus, because we have a lot of138 vbox_.set_pos(Vector2i(box_x_, box_y_));
137 // buttons
138 vbox_.set_pos(Vector2i(box_x_, box_y_ - buth_));
139 vbox_.set_inner_spacing(padding_);139 vbox_.set_inner_spacing(padding_);
140 vbox_.set_size(butw_, get_h() - vbox_.get_y() - 5 * padding_);140 vbox_.set_size(butw_, get_h() - vbox_.get_y() - 5 * padding_);
141}141}
142142
=== modified file 'src/ui_fsmenu/main.h'
--- src/ui_fsmenu/main.h 2019-02-23 11:00:49 +0000
+++ src/ui_fsmenu/main.h 2019-05-17 07:59:12 +0000
@@ -21,6 +21,7 @@
21#define WL_UI_FSMENU_MAIN_H21#define WL_UI_FSMENU_MAIN_H
2222
23#include "ui_basic/button.h"23#include "ui_basic/button.h"
24#include "ui_basic/icon.h"
24#include "ui_basic/textarea.h"25#include "ui_basic/textarea.h"
25#include "ui_fsmenu/main_menu.h"26#include "ui_fsmenu/main_menu.h"
2627
@@ -38,6 +39,7 @@
38private:39private:
39 void layout() override;40 void layout() override;
4041
42 UI::Icon logo_icon_;
41 UI::Button playtutorial;43 UI::Button playtutorial;
42 UI::Button singleplayer;44 UI::Button singleplayer;
43 UI::Button multiplayer;45 UI::Button multiplayer;

Subscribers

People subscribed via source and target branches

to status/vote changes: