From 7a5086cbd6b9227a2b93066047b4db662de87db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=28=C2=B4=E3=83=BB=CF=89=E3=83=BB=EF=BD=80=29?= Date: Mon, 5 Jul 2021 19:51:04 +0900 Subject: [PATCH] CHG: Vertically center the image position of the tab --- gui/components/gui_tab_panel.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gui/components/gui_tab_panel.cc b/gui/components/gui_tab_panel.cc index d0043006e1..ff4c4508bf 100644 --- a/gui/components/gui_tab_panel.cc +++ b/gui/components/gui_tab_panel.cc @@ -208,11 +208,11 @@ void gui_tab_panel_t::draw(scr_coord parent_pos) display_vline_wh_clip_rgb(text_x+width+3, ypos+3, required_size.h-4, SYSCOL_SHADOW, true); if(text) { - display_proportional_clip_rgb(text_x, text_y, text, ALIGN_LEFT, SYSCOL_TEXT, true); + display_proportional_clip_rgb(text_x, text_y+2, text, ALIGN_LEFT, SYSCOL_TEXT, true); } else { - scr_coord_val const y = ypos - iter.img->get_pic()->y + 10 - iter.img->get_pic()->h / 2; - scr_coord_val const x = text_x - iter.img->get_pic()->x + IMG_WIDTH / 2 - iter.img->get_pic()->w / 2; + scr_coord_val const y = ypos - iter.img->get_pic()->y + required_size.h / 2 - iter.img->get_pic()->h / 2 + 1; + scr_coord_val const x = text_x - iter.img->get_pic()->x + IMG_WIDTH / 2 - iter.img->get_pic()->w / 2; // display_img_blend(iter.img->get_id(), x, y, TRANSPARENT50_FLAG, false, true); display_base_img(iter.img->get_id(), x, y, world()->get_active_player_nr(), false, true); } @@ -228,8 +228,8 @@ void gui_tab_panel_t::draw(scr_coord parent_pos) display_proportional_clip_rgb(text_x, text_y, text, ALIGN_LEFT, SYSCOL_TEXT_HIGHLIGHT, true); } else { - scr_coord_val const y = ypos - iter.img->get_pic()->y + 10 - iter.img->get_pic()->h / 2; - scr_coord_val const x = text_x - iter.img->get_pic()->x + IMG_WIDTH / 2 - iter.img->get_pic()->w / 2; + scr_coord_val const y = ypos - iter.img->get_pic()->y + required_size.h / 2 - iter.img->get_pic()->h / 2 - 1; + scr_coord_val const x = text_x - iter.img->get_pic()->x + IMG_WIDTH / 2 - iter.img->get_pic()->w / 2; display_color_img(iter.img->get_id(), x, y, 0, false, true); } }