All pastes #47386 Raw Edit

fooking label

public text v1 · immutable
#47386 ·published 2006-03-29 02:57 UTC
rendered paste body
group{
   name: "modules/mbar/icon";
   data {
      item: "raise_on_hilight" "0"; // 1 or 0 if u want an icon holder to raise$
      //     item: "item_list" "item item2 item3";
   }
   script {
      public orient;
   }
	parts{
part {
	name: "item_clip";
	type: RECT;
	mouse_events:  1;
	description {
		state: "default" 0.0;
		color: 255 255 255 255;
	}
	description {
		state: "faded" 0.0;
		color: 255 255 255 64;
	}
}
part {
	name: "item";
	type: SWALLOW;
	mouse_events:  0;
	clip_to: "item_clip";
	description {
		state: "default" 0.0;
		rel1 {
			relative: 0.0  0.0;
			offset: 4 4;
		}
		rel2 {
			relative: 1.0 1.0;
			offset: -5 -5;
		}
		color: TRANSPARENT;
	}
}
part {
	name: "text_clip";
	type: RECT;
	mouse_events: 0;
	description {
		state: "default" 0.0;
		visible: 0;
		rel1 {
			relative: 0.0  0.0;
			offset: -300 -300;
		}
		rel2 {
			relative: 1.0  1.0;
			offset: 300 300;
		}
		color: TRANSPARENT;
	}
	description {
		state: "visible" 0.0;
		visible: 1;
		rel1 {
			relative: 0.0  0.0;
			offset: -300 -300;
		}
		rel2 {
			relative: 1.0  1.0;
			offset: 300 300;
		}
		color: 255 255 255 255;
	}
}
part {
	name: "label";
	type: TEXT;
	mouse_events: 0;
	clip_to: "text_clip";
	effect: SOFT_SHADOW;
	description {
		state: "default" 0.0;
		fixed: 1 1;
		rel1 {
			relative: 0.5  0.0;
			offset: -200 -3;
			to: "item_clip";
		}
		rel2 {
			relative: 0.5 0.0;
			offset:   200 -3;
			to: "item_clip";
		}
		color_class: "module_text";
		color: AFONT 192;
		color3: AFONT 64;
		text {
			text: "Text";
			font: "04b08";
			size: 12;
			min: 1 1;
			align: 0.5 0.5;
		}
	}
	description {
		state: "top" 0.0;
		fixed: 1 1;
		rel1 {
			relative: 0.5  1.0;
			offset: -200 6;
			to: "item_clip";
		}
		rel2 {
			relative: 0.5 1.0;
			offset: 200 6;
			to: "item_clip";
		}
		color_class: "module_text";
		color: AFONT 192;
		color3: AFONT 64;
		text {
			text: "Text";
			font: "04b08";
			size: 12;
			min: 1 1;
			align: 0.5 0.5;
		}
	}
	description {
		state: "left" 0.0;
		fixed: 1 1;
		rel1 {
			relative: 1.0  0.5;
			offset: -1 0;
			to: "item_clip";
		}
		rel2 {
			relative: 1.0 0.5;
			offset: 299 0;
			to: "item_clip";
		}
		color_class: "module_text";
		color: AFONT 192;
		color3: AFONT 64;
		text {
			text: "Text";
			font: "04b08";
			size: 12;
			min: 1 1;
			align: 0.0 0.5;
		}
	}
	description {
		state: "right" 0.0;
		fixed: 1 1;
		rel1 {
			relative: 1.0  0.5;
			offset: -300 0;
			to: "item_clip";
		}
		rel2 {
			relative: 0.0 0.5;
			offset: 0 0;
			to_x: "item_clip";
		}
		color_class: "module_text";
		color: AFONT 192;
		color3: AFONT 64;
		text {
			text: "Text";
			font: "04b08";
			size: 12;
			min: 1 1;
			align: 0.5 0.5;
		}
	}
}
	}
	programs{
program {
	name:    "orient";
	signal:  "set_orientation";
	source:  "*";
	script {
		// sig, src
		if (!strcmp(src, "left")) {
			set_int(orient, 0);
			set_state(PART:"label", "left", 0.0);
		}
		else if (!strcmp(src, "right")) {
			set_int(orient, 1);
			set_state(PART:"label", "right", 0.0);
		}
		else if (!strcmp(src, "top")) {
			set_int(orient, 2);
			set_state(PART:"label", "top", 0.0);
		}
		else if (!strcmp(src, "bottom")) {
			set_int(orient, 3);
			set_state(PART:"label", "default", 0.0);
		}
	}
}
program {
	name: "exec_start";
	signal: "start";
	source: "";
	action: STATE_SET "faded" 0.0;
	transition: LINEAR 0.5;
	target: "item_clip";
}
program {
	name: "exec_exec";
	signal: "exec";
	source: "";
	action: STATE_SET "faded" 0.0;
	transition: LINEAR 0.5;
	target: "item_clip";
	after: "exec_stop";
}
program {
	name: "exec_stop";
	signal: "stop";
	source: "";
	action: STATE_SET "default" 0.0;
	target: "item_clip";
}
program{
	name: "text_show";
	signal: "active";
	source: "*";
	action: STATE_SET "active" 0.0;
	transition: LINEAR 0.1;
	target: "text_clip";
}
program{
	name: "text_hide";
	signal: "passive";
	source: "*";
	action: STATE_SET "default" 0.0;
	transition: LINEAR 0.1;
	target: "text_clip";
}
	}
}