Skip to content

Commit

Permalink
Calculate position of dropdown arrow glyph based on image width
Browse files Browse the repository at this point in the history
  • Loading branch information
dragunoff authored and reaperrr committed Feb 9, 2020
1 parent aeacc86 commit 62af58c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Widgets/DropDownButtonWidget.cs
Expand Up @@ -48,7 +48,7 @@ public override void Draw()
var image = ChromeProvider.GetImage("scrollbar", IsDisabled() ? "down_pressed" : "down_arrow");
var rb = RenderBounds;

WidgetUtils.DrawRGBA(image, stateOffset + new float2(rb.Right - rb.Height + 5, rb.Top + (rb.Height - image.Bounds.Height) / 2));
WidgetUtils.DrawRGBA(image, stateOffset + new float2((rb.Right - (rb.Height + image.Bounds.Width) / 2), rb.Top + (rb.Height - image.Bounds.Height) / 2));

var separator = ChromeProvider.GetImage(SeparatorCollection, SeparatorImage);
WidgetUtils.DrawRGBA(separator, new float2(-3, 0) + new float2(rb.Right - rb.Height + 4, rb.Top + (rb.Height - separator.Bounds.Height) / 2));
Expand Down

0 comments on commit 62af58c

Please sign in to comment.