Some amends about sizings.
This commit is contained in:
@@ -494,7 +494,7 @@ public:
|
||||
switch (widget) {
|
||||
case WID_NG_CONN_BTN:
|
||||
*size = maxdim(GetStringBoundingBox(_lan_internet_types_dropdown[0]), GetStringBoundingBox(_lan_internet_types_dropdown[1]));
|
||||
size->width += padding.width;
|
||||
size->width += padding.width + GetMinSizing(NWST_STEP, 11U);
|
||||
size->height += padding.height;
|
||||
break;
|
||||
|
||||
|
||||
@@ -1150,8 +1150,9 @@ uint SettingEntry::Draw(GameSettings *settings_ptr, int left, int right, int bas
|
||||
break;
|
||||
case SEF_SUBTREE_KIND:
|
||||
if (cur_row >= first_row) {
|
||||
DrawSprite((this->d.sub.folded ? SPR_CIRCLE_FOLDED : SPR_CIRCLE_UNFOLDED), PAL_NONE, rtl ? x - 8 : x, y + (SETTING_HEIGHT - 11) / 2);
|
||||
DrawString(rtl ? left : x + 12, rtl ? x - 12 : right, Center(y, SETTING_HEIGHT), this->d.sub.title);
|
||||
Dimension d = GetSpriteSize(SPR_CIRCLE_UNFOLDED);
|
||||
DrawSprite((this->d.sub.folded ? SPR_CIRCLE_FOLDED : SPR_CIRCLE_UNFOLDED), PAL_NONE, rtl ? x - d.width : x, Center(y, SETTING_HEIGHT, d.height));
|
||||
DrawString(rtl ? left : x + d.width + 2, rtl ? x - (d.width + 2) : right, Center(y, SETTING_HEIGHT), this->d.sub.title);
|
||||
}
|
||||
cur_row++;
|
||||
if (!this->d.sub.folded) {
|
||||
|
||||
@@ -2347,7 +2347,7 @@ void NWidgetLeaf::SetupSmallestSize(Window *w, bool init_array)
|
||||
padding = &extra;
|
||||
if (this->index >= 0) w->SetStringParameters(this->index);
|
||||
Dimension d2 = GetStringBoundingBox(this->widget_data);
|
||||
d2.width += extra.width;
|
||||
d2.width += extra.width + GetMinSizing(NWST_STEP, 11U);
|
||||
d2.height += extra.height;
|
||||
size = maxdim(size, d2);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user