Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Info layout #83

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

fstiewitz
Copy link

Fixes #60
Based on ideas from #77
I moved the lyrics panel to the right side of the window, next to album cover and song info.
Cover art, lyrics and song info size change based on the following rules:

  • Lyrics width must not exceed 50% of window width
  • Song info width must show one line per attribute, except the file path, because the path is usually much longer than title, album or artist
  • Cover width must not exceed 50% of window width
  • Cover height must not exceed window height
  • Cover size must not be larger than the actual size of the cover image

window

@multani
Copy link
Owner

multani commented Jun 17, 2015

Hi Fabian,

this really looks awesome, thanks for working on this!

I tried your branch and it seems to work mostly OK, although there are still some weird behaviors when resizing the window. If you resize the window incrementally by dragging one of the corner, everything seems to be OK. But I'm currently using Gnome and they have shortcuts (Meta + arrows) to set predefined sizes/positions (like middle of the screen, or tiled on a side of the screen, etc.) and in this case, it doesn't really work. I guess the same would happen if you have a maximize/un-maximize window icon. Here are some screenshots which show the problem:

  • On this one, my window size/position was half the screen, and I then used Meta + Up to maximize the size. As you can guess, the viewport of the picture stays the same as when the window was smaller, but the image size has been recomputer and the bottom right corner disappears behind the viewport:
    screenshot from 2015-06-17 22 40 43
  • On this one, I went from maximized back to half size/screen position using Meta + Down. The image size is OK this time, but the song informations are completely misaligned.
    screenshot from 2015-06-17 22 40 58
  • This screenshot is mostly harmless, but i think we can remove the horizontal scrollbar, which actually doesn't do anything (there nothing to scroll on). The boxes' frames are a bit weird (the yellow line), I'm not sure how to improve this though.
    screenshot from 2015-06-17 22 41 23
  • On this last screenshot, I used Meta + Right which tiles the window on a side of the screen and resize it so it takes all the height of the screen but only half of the width (so you can tile to windows on the screen). Frames and boxes get a bit funky then :)
    screenshot from 2015-06-17 22 41 48

Could you have a look at these bugs? There's probably a resize event which doesn't work quite well.
I'm going to look at the code and make some comment directly there.

Thanks again for your work, it looks very promising!

Add constants
@fstiewitz
Copy link
Author

I renamed pixbuf to _pixbuf and added constants.
The little gap between the boxes' frames in your 3rd screenshot is on purpose. The problem is that the boxes' borders do not "connect", instead you get one thick border between them and I think it looks at least weirder than the gap:
window3
I haven't found a solution to your resize problem yet. I attached the resize callback to size-allocate of main_notebook and just assumed that it covered resizing with keybindings, partly because I have no problems with that in openbox and i3wm. I'll set-up a virtual machine with gnome later this day and see whats the problem there. There is propably a signal that covers these resize operations.

Remove horizontal scroll bar if view is large enough
@fstiewitz
Copy link
Author

Attaching the callback to size-allocate of the window seems to work ( at least on my Debian VM ). I also removed the horizontal scroll bar.

@multani
Copy link
Owner

multani commented Jun 18, 2015

OK, it works much better now!

2 more small things that you can fix up, and I'll probably merge your branch in master:

  • there was a little bit of padding on the left side of the Info tab which is not anymore, and it's not really nice to have the picture stuck on the left like this. Can you add it back? Something about the same size as the other padding/margins in the tab would be great.
  • also, I'm still a bit concerned with all the empty blocks we have now (I'm talking about the one under the song informations (but it was there before), the one on the right side of the lyrics on large screen, and all the white space on the right of the Album Info (inside the frame and outside as well)). Without moving everything around one more time:
    • could you just have a look to set the size of the lyrics frame so it takes all the size on the right side (or maybe giving more room to the Song Info block?)
    • and could you change the Album Info so that it takes all the width of the tab as it did before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants