Author Topic: Embeded TheatreMode panel  (Read 29358 times)

Alexis

  • Sr. Member
  • ****
  • Posts: 712
I would like a little hand from anyone regarding the string to get the album cover to be seen to eh right and bottom of the gallery image, and be anchored and re-sizable to the bottom so as not to overlap the text in that area as the player is re-sized.  I do not want it overlapping the text or ratings as seen in the image.

This is what I am using:  The numbers may look strange because I have been experimenting.  I know I would have to tweak until it is correct, but I am not having luck with the various anchors.

<element type="AlbumCover" xAnchor="Gallery.Right" x="30" y="100" widthDock="Panel.Height" width="-10" heightDock="Panel" height="50" min="50" max="300" brightness="1.0" ></element>

Last Edit: December 19, 2012, 01:56:12 PM by Alexis
They are not lazy... just more efficient.

redwing

  • Guest
As far as I know, album cover can be aligned left and top only, not right and bottom. Hence you're trying to achieve something currently impossible. If you compromise a bit so that album cover tops track info, there won't be any problem.


Last Edit: December 19, 2012, 07:05:31 AM by redwing

lnminente

  • Sr. Member
  • ****
  • Posts: 1049
For not overlapping text or ratings increase the y value so the top of the image will never touch them.
For adjusting the size of the image maintain keep widthDock="Panel.Height" heightDock="Panel" and use same values for height and width adjustments as it changes the aspect ratio of the images and i think keep aspect ratio is not possible here by now.

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3830
  • MB Version: 3.6.8830 P
@ Alexis
assuming you have set the Gallery heightDock to Panel, than you can put an invisible scaling line in:

<element type="Line" name="#scale1" xAnchor="Gallery.Right" x="0" yAnchor="Panel.Top" y="0" width="1" heightDock="Y:Panel.Bottom" height="0" bg="0,0,0,0"></element>

you can then use your original line modified to:

<element type="AlbumCover" xAnchor="#scale1.Right" x="30" yAnchor="#scale1.Center" y="0" widthDock="Panel.Height" width="-10" heightDock="Panel" height="50" min="50" max="300" brightness="1.0" ></element>

the top of the artwork will always be at exactly halfway down the Gallery space
MusicBee and my library - Making bee-utiful music together

redwing

  • Guest
@ Alexis
assuming you have set the Gallery heightDock to Panel, than you can put an invisible scaling line in:

<element type="Line" name="#scale1" xAnchor="Gallery.Right" x="0" yAnchor="Panel.Top" y="0" width="1" heightDock="Y:Panel.Bottom" height="0" bg="0,0,0,0"></element>

you can then use your original line modified to:

<element type="AlbumCover" xAnchor="#scale1.Right" x="30" yAnchor="#scale1.Center" y="0" widthDock="Panel.Height" width="-10" heightDock="Panel" height="50" min="50" max="300" brightness="1.0" ></element>

the top of the artwork will always be at exactly halfway down the Gallery space

If you really want that half-cut cover view, simply use for album cover without the scaling line
 
Code
yAnchor="Gallery.Center" y="0"

Alexis

  • Sr. Member
  • ****
  • Posts: 712
Thank you all very much for the feedback.  I was able to come up with something while keeping the simplicity of the default Plugin style.  For now, I came to the conclusion that having an album cover there just makes it a bit to busy.  However, I now know how I could achieve  what I was requesting, thanks to the suggestions here.
Last Edit: December 20, 2012, 02:22:18 AM by Alexis
They are not lazy... just more efficient.

lnminente

  • Sr. Member
  • ****
  • Posts: 1049
(I suggest spliting this post, and moving since the ask from Alexis to plugins\theater mode\developers, it could be helpful for people starting with it)

Alexis

  • Sr. Member
  • ****
  • Posts: 712
yes please.  I regretted posting it here after seeing the helpful responses this morning.
They are not lazy... just more efficient.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
for right aligning an element, i have added support for basic expressions (+/-) in the x and y offset values eg. to right align a variable size picture:
Code
<element type="AlbumCover" xAnchor="Panel.Right" x="11-Panel.Height" y="9" widthDock="Panel.Height" width="-20" heightDock="Panel" height="-20" min="100" max="300" brightness="1.0" ></element>

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
this has the support for right aligning variable size elements using expressions as described above:
http://musicbee.niblseed.com/V2_1/MusicBee_Exe_Patched.zip

redwing

  • Guest
for right aligning an element, i have added support for basic expressions (+/-) in the x and y offset values eg. to right align a variable size picture:
Code
<element type="AlbumCover" xAnchor="Panel.Right" x="11-Panel.Height" y="9" widthDock="Panel.Height" width="-20" heightDock="Panel" height="-20" min="100" max="300" brightness="1.0" ></element>

Tried this and found it worked well as long as the artwork size is smaller than its maximum size.




But once it reaches its maximum size, it keeps moving to the left as panel enlarges even though it's set aligned right.




Is there a way to keep it to the right end?
Last Edit: January 05, 2013, 05:54:04 AM by redwing

redwing

  • Guest
I am wondering whether "align" attribute could be supported for rectangular elements such as gallery and album artwork. What I mean by that is x and y values of those elements are, by default, of top-left corner point. But align="Bottom.Right" could change the base point of the rectangular element to bottom-right corner point. So except for the default top-left, three values (Top.Right, Bottom.Left, Bottom.Right) are possible for the attribute. If this can be supported, we can place variable sizes of gallery and artwork to virtually any places of screen by controlling its aligning point.

With regard to the case above, xAnchor="Panel.Right" x="0" align="Top.Right" will easily solve the problem. Then we will no longer need +/- values.
Last Edit: January 05, 2013, 05:52:18 PM by redwing

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
an align="xxx" attribute has now been added and can be one of: "Top.Left", "Top.Right", "Bottom.Left", "Bottom.Right"
its in the next 2.1 update
also note that the max="" attribute wasnt being set for artist pictures and now is, so that might have an impact on any existing embedded skins