Skip to main content
Topic: CaTRoX (QWR Edition): fb2k theme (Read 8137 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #100
I've changed the font to a different one, but the rendering engine hasn't. Well, I guess the problem may be elsewhere. Thanks anyway. :)
JScriptPanel uses GDI to render fonts. Maybe you're using something else in windows, but unless it replaces GDI the engine somehow, it won't change how fonts render in JScript.

I'm assuming that when you change fonts in the script, they actually do update to the new font. If they aren't you might not be entering the font name correctly (this can be a pain in the ass to figure out), or maybe you don't have the fonts you think you do installed. You can use utils.CheckFont(fontName) to make sure the fonts are actually being loaded correctly.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #101
Found a crash in QueueHandler. If I enqueue something from a filter, and then change filters, the PlaylistItemIndex of the first item is -1 (not found) and cur_queued_row is undefined, and we crash trying to reference it's queue_idx.

Inside queue_contents.forEach first lines should be:
Code: [Select]
            if (queued_item.PlaylistIndex !== cur_playlist_idx || queued_item.PlaylistItemIndex === -1) {
                return;
            }
QueueHandler crashed for me again today: "Unable to set property 'queue_idx' of undefined or null reference". Not sure how it got past those two checks though, and I haven't been able to reproduce since.

I did however run into another issue once where I'm in one playlist, I change playlists using foo_http_control, and then enqueue a song foo_http_control, and it ends up enqueuing songs from the first playlist. I think somewhere cur_playlist_idx may not be being set properly. This is also something I can't reliably reproduce, but I know I've seen it at least once before. (might also be a problem with foo_http_control?)

Re: CaTRoX (QWR Edition): fb2k theme

Reply #102
QueueHandler crashed for me again today: "Unable to set property 'queue_idx' of undefined or null reference". Not sure how it got past those two checks though, and I haven't been able to reproduce since.

I did however run into another issue once where I'm in one playlist, I change playlists using foo_http_control, and then enqueue a song foo_http_control, and it ends up enqueuing songs from the first playlist. I think somewhere cur_playlist_idx may not be being set properly. This is also something I can't reliably reproduce, but I know I've seen it at least once before. (might also be a problem with foo_http_control?)
Hm... Most likely, both of these issues are caused by playlist not being changed (i.e. initialize_list method was not called). Dunno how that happens though. You may try making several playlists of different sizes - e.g. one with a single track, the other with more tracks - and switch between them while selecting the last item in the playlist. Ideally it should trigger the error much more often. If you manage to cause it more or less consistently, then we can move with investigating the logs (which can be turned on by trace_call variable).

Re: CaTRoX (QWR Edition): fb2k theme

Reply #103
I've changed the font to a different one, but the rendering engine hasn't. Well, I guess the problem may be elsewhere. Thanks anyway. :)
JScriptPanel uses GDI to render fonts. Maybe you're using something else in windows, but unless it replaces GDI the engine somehow, it won't change how fonts render in JScript.

I'm assuming that when you change fonts in the script, they actually do update to the new font. If they aren't you might not be entering the font name correctly (this can be a pain in the ass to figure out), or maybe you don't have the fonts you think you do installed. You can use utils.CheckFont(fontName) to make sure the fonts are actually being loaded correctly.

The font itself changed for sure. The thing is that any other program that I use doesn't have this problem. Yeah, it changes the rendering of GDI. What I noticed is that if using elplaylist and the text is displayed using $drawstring the rendering doesn't change. However, if changed to $drawtext it's okay. I don't know whether that has any meaning in that case, though.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #104
What I noticed is that if using elplaylist and the text is displayed using $drawstring the rendering doesn't change. However, if changed to $drawtext it's okay. I don't know whether that has any meaning in that case, though.
It probably has: DrawString uses GDI+ rendering engine, while DrawText uses GDI. So, if your "engine substitution" only affects GDI, it won't affect DrawString.
My theme uses DrawString exclusively (for better ClearType hinting), while Library Tree script uses DrawText, which may explain the discrepancy you are experiencing.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #105
That's exactly it. I've just changed drawstring to gdidrawtext and it renders properly. Unfortunately the text is misaligned now.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #106
That's exactly it. I've just changed drawstring to gdidrawtext and it renders properly. Unfortunately the text is misaligned now.
Yea, since the text width in the theme is measured with MeasureString (GDI+). You'll have to replace it with CalcTextWidth (GDI). Additionaly, you'll have to replace all StringFormat flags with corresponding GDI flags.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #107
Well, since I'm not that knowledgeable and the skin is out of order after changing MeasureString, I'll call it a day and use it day that probably.

 

Re: CaTRoX (QWR Edition): fb2k theme

Reply #108
Version: 4.3.0
Link: https://github.com/TheQwertiest/CaTRoX_QWR/releases/tag/v4.3.0
Changelog:
    Added
    • Playlist Panel:
      • Added disc sub-headers: see example.
      • Art images are now cached: no more needless image reloading after every little action.
      • Added foo_enhanced_playcount support: `$max(%play_count%, %lastfm_play_count%)` query is used to get track play count.
    Changed
    • Playlist Panel:
      • Increased playlist initialization speed by 30% (thanks to marc2k3)!
      • Swapped rating and duration positions in rows.
      • Corrected query for album sub-title: standard `%subtitle%` instead of non-standard `%albumsubtitle%`.
    • Updated theme.fcl:
      • Added new script files.
      • Changed default Playlist panel properties.
    • Compiled latest foo_jscript_panel with extensions (v2.1.4).
    Fixed
    • Playlist Panel:
      • Fixed bug: art images were loaded even with headers disabled.
      • Fixed bug: changing grouping preset in one player mode was not always affecting grouping preset in other mode.
      • Fixed various display glitches with multiline tags.
    • Art Mode:
      • Fixed right-click menu handling.

Special thanks to @MordredKLB for disc sub-headers and art image cache ideas!

Re: CaTRoX (QWR Edition): fb2k theme

Reply #109
New feature suggestions or suggestions about modifying the existing ones are fine here, I think.

Can I suggest new feature?  ;D  Maybe there is someone else besides me who wants to have a button to fast switch playback output device. It would be very handy for portable version using on multiple machines with different sound hardware. Thanks.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #110
Can I suggest new feature?  ;D  Maybe there is someone else besides me who wants to have a button to fast switch playback output device. It would be very handy for portable version using on multiple machines with different sound hardware. Thanks.
Could you elaborate it a bit, like should it just cycle between all available output devices?

 
SimplePortal 1.0.0 RC1 © 2008-2018