jpochyla / psst

Fast and multi-platform Spotify client with native GUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overlapping album hover selection on min window width

jacksongoode opened this issue · comments

Describe the bug
Overlapping album hover selection on min window width.

To Reproduce
Reduce window to min and hover

Expected behavior
The heart/save should be included within the hoverable component.

Screenshots
Screen Shot 2023-05-10 at 12 31 53 PM

Environment

  • OS: macOS
  • Version: latest nightly

This also occurs with the track row, but the button can't be part of the flex because the click event gets propagated to the widget under it. If anyone has an idea of how to solve that, PRs are welcome!

I think I figured out what's going on here. The playing_item_widget (the hoverable thing)'s width is going to be what's leftover from the playback panel's width once the player_widget's (the controls) width is accounted for. The player_widget's width is constant, so what the playing_item_widget gets is wide enough to fit the left edge of the heart icon (triggering the heart to be rendered) but not wide enough to fit the entire heart.

Here's a screenshot of the panel with borders around the widgets. The blue's width is constant, the red's width is (total width - blue width). The padding on the sides of the controls is included in blue's width, which further eats into red's width that could cover the heart icon. There's also a gap between the album art and the heart that could be reduced.
image

With that in mind, I can think of 3 ways to fix the issue if the heart should stay visible.

  1. Reduce the spacing between the heart and the album art to fit the heart at the minimum width.
    image

  2. Reduce the padding of the controls so that the playing_item_widget has more room at the minimum window width

  3. Increase the minimum width of the window

Here is a PR that reduces the width of the playing_item_widget by making the spacer between the album art and info collapsible. Option 3 is probably the most elegant solution (1 line) but perhaps that's more of a bandaid than a fix.

Closed by #432.

@SeaSpr Thank you!