Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: CaTRoX (QWR Edition): fb2k theme (Read 36536 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #151
Are you joking? What are you on about? Changing colours is amazingly cheap. Not a single bit of text is changing so what are you blithering on about regarding row/playlist item init? The mind boggles. :/

Haha, I should be more precise, this is not regarding the original CatRox theme, but my theme =).
I have implemented an additional mouse row hover effect plus checking if background is bright/dark:

Code: [Select]
		// Playlist row hover
this.title_color = g_pl_colors.title_normal;

/** @enum {number} */
var rowState = {
normal:  0,
hovered: 1,
pressed: 2
};

//private:
var that = this;

/**
* @param {rowState} item
*/
this.changeRowState = function(item) {
switch (item) {
case rowState.normal: {
that.title_color = g_pl_colors.title_normal;
break;
}
case rowState.hovered: {
that.title_color = g_pl_colors.title_hovered;
break;
}
case rowState.pressed: {
that.title_color = g_pl_colors.title_selected;
break;
}
}
window.RepaintRect(playlist.x - 1, playlist.y, playlist.w + 1, playlist.h);
}

this.trace = function (x, y) {
return x >= this.x && x < this.x + this.w && y >= this.y && y < this.y + this.h;
};

this.on_mouse_move = function (x, y, m) {
this.changeRowState(this.trace(x, y) ? rowState.hovered : rowState.normal);
};

then I have on_mouse_move() calling changeRowState
Code: [Select]
                var item = this.get_item_under_mouse(x, y);
if (item instanceof Row) {
if (pref.show_tt || pref.show_truncatedText_tt) {
item.title_truncatedText_tt(x, y);
}
if (pref.playlistRowHover) {
try { // Prevent crash when playlist rows are not fully initialized
item.on_mouse_move(x, y, m);
} catch (e) {};
}
}

and on draw(gr):

Code: [Select]
	draw(gr) {
if (pref.playlistRowHover) {
if (needs_rows_repaint) {
repaintPlaylistRows();
needs_rows_repaint = false;
}
} else {
this.title_color = g_pl_colors.title_normal;
}
       gr.DrawString(this.title_text, title_font, this.title_color, cur_x, this.y, title_w, this.h, title_text_format);

this.title_color = g_pl_colors.title_normal;

The title_color also changes like mentioned when bg is bright/dark, it's all working on current visible window.Height but I still have ugly title_color repaints when scrolling ( at top/bottom ), because the title_color is one repaint behind ( the not yet visible ( hidden ) rows ).  :(

When calling initialize_rows(playlist_items) I can change title_color in all hidden item rows, but this is not the way.

Well it's not that bad, but sometimes white or black title_color repaints will be visible on different background colors...


Re: CaTRoX (QWR Edition): fb2k theme

Reply #153
I can't understand what's going on from those code snippets but if each item/row is an object and each one has its own colour properties, I'd say that's a poor design choice and needs to be reworked. "Hidden" rows having their own colours is just wrong.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #154
TheQwertiest didn't have that in mind from the beginning what I've additional added and wanted to achieve. For Mordred's theme it's working, because he just repaints only the one nowPlaying row which is not a problem,
but I need to repaint all existing rows plus I've added a mouse hover func which makes these problems. Well, I need to figure out a workaround...

-TT 

Re: CaTRoX (QWR Edition): fb2k theme

Reply #155
Hi, any way to fix this error?



Re: CaTRoX (QWR Edition): fb2k theme

Reply #158
If you can work out where this script file lives in your foobar profile folder based on the URL...

https://github.com/TheQwertiest/CaTRoX_QWR/blob/33e9c0e91341f5c5ac43cb464de181b14c5d1dac/packages/Top/%7BF53D252E-3F0F-4EEA-AB97-569F9C001FE5%7D/main.js#L438

You can edit the highlighted line to

Code: [Select]
 var is_youtube_video_displayed = false;

Re: CaTRoX (QWR Edition): fb2k theme

Reply #159
If you can work out where this script file lives in your foobar profile folder based on the URL...

https://github.com/TheQwertiest/CaTRoX_QWR/blob/33e9c0e91341f5c5ac43cb464de181b14c5d1dac/packages/Top/%7BF53D252E-3F0F-4EEA-AB97-569F9C001FE5%7D/main.js#L438

You can edit the highlighted line to

Code: [Select]
 var is_youtube_video_displayed = false;
Replacing this line helps, thanks.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #160
If you can work out where this script file lives in your foobar profile folder based on the URL...

https://github.com/TheQwertiest/CaTRoX_QWR/blob/33e9c0e91341f5c5ac43cb464de181b14c5d1dac/packages/Top/%7BF53D252E-3F0F-4EEA-AB97-569F9C001FE5%7D/main.js#L438

You can edit the highlighted line to

Code: [Select]
 var is_youtube_video_displayed = false;
Also I can remove foo_youtube completely now?
Any way to remove inactive icons like this search icon from youtube?

Re: CaTRoX (QWR Edition): fb2k theme

Reply #161
Not tested but I'd trying making this entire function empty...

https://github.com/TheQwertiest/CaTRoX_QWR/blob/33e9c0e91341f5c5ac43cb464de181b14c5d1dac/packages/Top/%7BF53D252E-3F0F-4EEA-AB97-569F9C001FE5%7D/main.js#L264L316

Code: [Select]
function create_buttons(ww, wh) {}

Re: CaTRoX (QWR Edition): fb2k theme

Reply #162
Thanks for this amazing foobar skin! I've been using it for last two weeks now and encountered one issue with thumbs not loading up automatically, although the checkmark is there. They can be manually loaded via RMB->Download. Is there a fix to download them automatically?  I opened the issue on your github https://github.com/TheQwertiest/CaTRoX_QWR/issues/22


Re: CaTRoX (QWR Edition): fb2k theme

Reply #164
Not tested the theme but right click the panel>Configure. Replace the contents with this...

https://raw.githubusercontent.com/TheQwertiest/smp_2003/master/thumbs.js
Configure opens up spider monkey configuration https://i.imgur.com/jx7DBIk.png , so instead I just replaced in foobar2000\profile\foo_spider_monkey_panel\packages\{1583C4B7-53AD-403F-8F7E-CB20490AAA26}\scripts\js_marc2003\js , but unfortunately it resulted in a crash https://i.imgur.com/CJ5bNpq.png

Re: CaTRoX (QWR Edition): fb2k theme

Reply #165
You're never supposed to put files from the js folder in the panel.

Either open the editor and copy/paste the contents from the github link or use the samples drop down combo box.

I can show it working for me.



There are 2 conditions: automatic downloads only happen a second or 2 after playback begins and there must be no pre-existing images.

Re: CaTRoX (QWR Edition): fb2k theme

Reply #166
I'm struggling to find this editor, when RMB->Configure it opens monkey panel configuration, where do I go from there?


Re: CaTRoX (QWR Edition): fb2k theme

Reply #168
It works now, thank you very much. Displaying is a bit weird, but it will do https://i.imgur.com/PRyzdwI.png