Skip to content

Commit

Permalink
fix panel header icon texture check
Browse files Browse the repository at this point in the history
  • Loading branch information
Flyga-M committed Apr 17, 2024
1 parent 8a8b53d commit 1ac679a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Blish HUD/Controls/Panel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public override void RecalculateLayout() {

_layoutHeaderBounds = new Rectangle(this.ContentRegion.Left, 0, this.ContentRegion.Width, HEADER_HEIGHT);

if (_icon?.HasTexture != null) {
if (_icon?.HasTexture == true) {

_layoutHeaderIconBounds = new Rectangle(_layoutHeaderBounds.Left + 3, 3, HEADER_HEIGHT - 6, HEADER_HEIGHT - 6);
_layoutHeaderTextBounds = new Rectangle(_layoutHeaderIconBounds.Right + 5, 0, _layoutHeaderBounds.Width - _layoutHeaderIconBounds.Width, HEADER_HEIGHT);
Expand Down Expand Up @@ -352,7 +352,7 @@ public override void PaintBeforeChildren(SpriteBatch spriteBatch, Rectangle boun
}

// Panel header icon
if (_icon?.HasTexture != null) {
if (_icon?.HasTexture == true) {
spriteBatch.DrawOnCtrl(this, _icon, _layoutHeaderIconBounds, Color.White);
}

Expand Down

0 comments on commit 1ac679a

Please sign in to comment.