Skip to content

Commit

Permalink
fix: opponent deck card tooltip alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
beheh committed Jul 29, 2024
1 parent b90a487 commit e4ec4bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Hearthstone Deck Tracker/Windows/OverlayWindow.Tooltips.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private void UpdateCardTooltip()
var centeredListOffset = Config.Instance.OverlayCenterOpponentStackPanel ? (BorderStackPanelOpponent.ActualHeight - StackPanelOpponent.ActualHeight) / 2 : 0;
//offset is affected by scaling
var topOffset = Canvas.GetTop(BorderStackPanelOpponent) + centeredListOffset
+ GetListViewOffset(StackPanelOpponent, ListViewOpponent) + cardIndex * cardSize * Config.Instance.OverlayOpponentScaling / 100 - ToolTipCardBlock.ActualHeight / 2;
+ GetListViewOffset(StackPanelOpponent, ViewBoxOpponent) + cardIndex * cardSize * Config.Instance.OverlayOpponentScaling / 100 - ToolTipCardBlock.ActualHeight / 2;
var card = ListViewOpponent.Items.Cast<AnimatedCard>().ElementAt(cardIndex).Card;
ToolTipCardBlock.SetCardIdFromCard(card);
//prevent tooltip from going outside of the overlay
Expand Down

0 comments on commit e4ec4bb

Please sign in to comment.