Now I'm using Br3tt's foo_Razor Skin after some modification.
There is a toggle script which changes the panel size according "Toggle" state.
I figured out that the panel color can be changed by 'var COLOR_BTNFACE'.
I want to make the color of this panel change between two colors according to the panel size.
For example, for the width=390 : Black, for the width=1 : White.
I'd like to know if this is possible and where I have to change.
Thank you for reading and helping.
var COLOR_BTNFACE = 15;
var toggle = window.GetProperty("toggle", false);
var ww = 0, wh = 0;
//var COLOR_BTNFACE = 15;
var g_syscolor = 0;
function get_colors() {
g_syscolor = utils.GetSysColor(COLOR_BTNFACE);
}
get_colors();
// START
function on_size() {
ww = window.Width;
wh = window.Height;
if(toggle) {
window.MinWidth = 390;
window.MaxWidth = 390;
} else {
window.MinWidth = 1;
window.MaxWidth = 1;
};
window.MinHeight = 4;
window.MaxHeight = 4;
}
function on_paint(gr) {
gr.FillSolidRect(0, 0, ww, wh, g_syscolor);
}
function on_mouse_lbtn_up(x, y) {
toggle = !toggle;
window.SetProperty("toggle", toggle);
if(toggle) {
window.MinWidth = 390;
window.MaxWidth = 390;
} else {
window.MinWidth = 1;
window.MaxWidth = 1;
};
}
function on_colors_changed() {
get_colors();
window.Repaint();
}
function on_notify_data(name, info) {
switch(name) {
case "left_pane":
toggle = !toggle;
window.SetProperty("toggle", toggle);
if(toggle) {
window.MinWidth = 390;
window.MaxWidth = 390;
} else {
window.MinWidth = 1;
window.MaxWidth = 1;
};
break;
}
}
function on_mouse_rbtn_up(x, y) {
return true;
}