From: terencehill Date: Thu, 22 Dec 2022 23:20:34 +0000 (+0100) Subject: Fix server icons of the first entries of each group being smaller than others if... X-Git-Tag: xonotic-v0.8.6~248 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=116bf82aa4d6192f3b3a18307646427cc1384bdb;p=xonotic%2Fxonotic-data.pk3dir.git Fix server icons of the first entries of each group being smaller than others if categories aren't enabled --- diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index ec183dad4..47cc36791 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -814,8 +814,8 @@ void XonoticServerList_drawListBoxItem(entity me, int i, vector absSize, bool is if(catent) { SET_YRANGE( - (me.categoriesHeight - 1) / (me.categoriesHeight + 1), - me.categoriesHeight / (me.categoriesHeight + 1) + (me.categoriesHeight - me.realFontSize.y) / (me.categoriesHeight + me.serversHeight), + me.categoriesHeight / (me.categoriesHeight + me.serversHeight) ); draw_Text( eY * me.realUpperMargin @@ -832,7 +832,7 @@ void XonoticServerList_drawListBoxItem(entity me, int i, vector absSize, bool is SKINALPHA_SERVERLIST_CATEGORY, 0 ); - SET_YRANGE(me.categoriesHeight / (me.categoriesHeight + 1), 1); + SET_YRANGE(me.categoriesHeight / (me.categoriesHeight + me.serversHeight), 1); } } @@ -1193,7 +1193,6 @@ float XonoticServerList_getItemHeight(entity me, int item) { for (int i = 0; i < category_draw_count; ++i) { // Matches exactly the headings with increased height. - // FIXME server row next to the heading is slightly smaller than others if (autocvar_menu_slist_categories <= 0) if (item == category_item[i]) return me.itemHeight * (me.categoriesHeight + me.serversHeight); }