forked from enlightenment/enlightenment
parent
2b8d5e924b
commit
470ce088d0
|
@ -1,443 +0,0 @@
|
||||||
#define SCROLLBAR_BUTTON_SIZE 18
|
|
||||||
|
|
||||||
#define SCROLLBAR_DRAG(part_name, rx1, ry1, ox1, oy1, rx2, ry2, ox2, oy2, image_thumb) \
|
|
||||||
part { \
|
|
||||||
name: part_name"_shadow2"; \
|
|
||||||
mouse_events: 0; \
|
|
||||||
description { \
|
|
||||||
state: "default" 0.0; \
|
|
||||||
rel1 { \
|
|
||||||
relative: 0.0 0.0; \
|
|
||||||
offset: 0 0; \
|
|
||||||
to: part_name; \
|
|
||||||
} \
|
|
||||||
rel2 { \
|
|
||||||
relative: 1.0 1.0; \
|
|
||||||
offset: -1 -1; \
|
|
||||||
to: part_name; \
|
|
||||||
} \
|
|
||||||
image { \
|
|
||||||
normal: "e17_scrollbar_button_shadow2.png"; \
|
|
||||||
border: 8 8 8 8; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
part { \
|
|
||||||
name: part_name"_shadow1"; \
|
|
||||||
mouse_events: 0; \
|
|
||||||
description { \
|
|
||||||
state: "default" 0.0; \
|
|
||||||
rel1 { \
|
|
||||||
relative: 0.0 0.0; \
|
|
||||||
offset: 0 0; \
|
|
||||||
to: part_name; \
|
|
||||||
} \
|
|
||||||
rel2 { \
|
|
||||||
relative: 1.0 1.0; \
|
|
||||||
offset: -1 -1; \
|
|
||||||
to: part_name; \
|
|
||||||
} \
|
|
||||||
image { \
|
|
||||||
normal: "e17_scrollbar_button_shadow1.png"; \
|
|
||||||
border: 8 8 8 8; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
part { \
|
|
||||||
name: part_name; \
|
|
||||||
description { \
|
|
||||||
state: "default" 0.0; \
|
|
||||||
rel1 { \
|
|
||||||
relative: rx1 ry1; \
|
|
||||||
offset: ox1 oy1; \
|
|
||||||
} \
|
|
||||||
rel2 { \
|
|
||||||
relative: rx2 ry2; \
|
|
||||||
offset: ox2 oy2; \
|
|
||||||
} \
|
|
||||||
image { \
|
|
||||||
normal: "e17_scrollbar_button.png"; \
|
|
||||||
border: 8 8 8 8; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
part { \
|
|
||||||
name: part_name"_thumb"; \
|
|
||||||
mouse_events: 0; \
|
|
||||||
description { \
|
|
||||||
state: "default" 0.0; \
|
|
||||||
rel1 { \
|
|
||||||
relative: 0.5 0.5; \
|
|
||||||
offset: -4 -4; \
|
|
||||||
to: part_name; \
|
|
||||||
} \
|
|
||||||
rel2 { \
|
|
||||||
relative: 0.5 0.5; \
|
|
||||||
offset: 3 3; \
|
|
||||||
to: part_name; \
|
|
||||||
} \
|
|
||||||
image { \
|
|
||||||
normal: image_thumb; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SCROLLBAR_BUTTON(button_name, rx1, ry1, ox1, oy1, arrow_image) \
|
|
||||||
part { \
|
|
||||||
name: button_name"_shadow2"; \
|
|
||||||
mouse_events: 0; \
|
|
||||||
description { \
|
|
||||||
state: "default" 0.0; \
|
|
||||||
rel1 { \
|
|
||||||
relative: 0.0 0.0; \
|
|
||||||
offset: 0 0; \
|
|
||||||
to: button_name; \
|
|
||||||
} \
|
|
||||||
rel2 { \
|
|
||||||
relative: 1.0 1.0; \
|
|
||||||
offset: -1 -1; \
|
|
||||||
to: button_name; \
|
|
||||||
} \
|
|
||||||
image { \
|
|
||||||
normal: "e17_scrollbar_button_shadow2.png"; \
|
|
||||||
border: 8 8 8 8; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
description { \
|
|
||||||
state: "active" 0.0; \
|
|
||||||
inherit: "default" 0.0; \
|
|
||||||
visible: 0; \
|
|
||||||
color: 255 255 255 0; \
|
|
||||||
} \
|
|
||||||
description { \
|
|
||||||
state: "hidden" 0.0; \
|
|
||||||
inherit: "default" 0.0; \
|
|
||||||
visible: 0; \
|
|
||||||
color: 255 255 255 0; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
part { \
|
|
||||||
name: button_name"_shadow1"; \
|
|
||||||
mouse_events: 0; \
|
|
||||||
description { \
|
|
||||||
state: "default" 0.0; \
|
|
||||||
rel1 { \
|
|
||||||
relative: 0.0 0.0; \
|
|
||||||
offset: 0 0; \
|
|
||||||
to: button_name; \
|
|
||||||
} \
|
|
||||||
rel2 { \
|
|
||||||
relative: 1.0 1.0; \
|
|
||||||
offset: -1 -1; \
|
|
||||||
to: button_name; \
|
|
||||||
} \
|
|
||||||
image { \
|
|
||||||
normal: "e17_scrollbar_button_shadow1.png"; \
|
|
||||||
border: 8 8 8 8; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
description { \
|
|
||||||
state: "active" 0.0; \
|
|
||||||
inherit: "default" 0.0; \
|
|
||||||
visible: 0; \
|
|
||||||
color: 255 255 255 0; \
|
|
||||||
} \
|
|
||||||
description { \
|
|
||||||
state: "active" 0.0; \
|
|
||||||
inherit: "default" 0.0; \
|
|
||||||
visible: 0; \
|
|
||||||
color: 255 255 255 0; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
part { \
|
|
||||||
name: button_name; \
|
|
||||||
description { \
|
|
||||||
state: "default" 0.0; \
|
|
||||||
rel1 { \
|
|
||||||
relative: rx1 ry1; \
|
|
||||||
offset: ox1 oy1; \
|
|
||||||
} \
|
|
||||||
rel2 { \
|
|
||||||
relative: rx1 ry1; \
|
|
||||||
offset: (ox1 + SCROLLBAR_BUTTON_SIZE) (oy1 + SCROLLBAR_BUTTON_SIZE); \
|
|
||||||
} \
|
|
||||||
image { \
|
|
||||||
normal: "e17_scrollbar_button.png"; \
|
|
||||||
border: 8 8 8 8; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
description { \
|
|
||||||
state: "active" 0.0; \
|
|
||||||
inherit: "default" 0.0; \
|
|
||||||
rel1 { \
|
|
||||||
offset: (ox1 + 1) (oy1 + 1); \
|
|
||||||
} \
|
|
||||||
rel2 { \
|
|
||||||
offset: (ox1 + SCROLLBAR_BUTTON_SIZE + 1) (oy1 + SCROLLBAR_BUTTON_SIZE + 1); \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
description { \
|
|
||||||
state: "hidden" 0.0; \
|
|
||||||
inherit: "default" 0.0; \
|
|
||||||
visible: 0; \
|
|
||||||
color: 255 255 255 0; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
part { \
|
|
||||||
name: button_name"_arrow"; \
|
|
||||||
mouse_events: 0; \
|
|
||||||
description { \
|
|
||||||
state: "default" 0.0; \
|
|
||||||
max: 16 16; \
|
|
||||||
rel1 { \
|
|
||||||
relative: 0.0 0.0; \
|
|
||||||
offset: 4 4; \
|
|
||||||
to: button_name; \
|
|
||||||
} \
|
|
||||||
rel2 { \
|
|
||||||
relative: 1.0 1.0; \
|
|
||||||
offset: -5 -5; \
|
|
||||||
to: button_name; \
|
|
||||||
} \
|
|
||||||
image { \
|
|
||||||
normal: arrow_image; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
description { \
|
|
||||||
state: "hidden" 0.0; \
|
|
||||||
inherit: "default" 0.0; \
|
|
||||||
visible: 0; \
|
|
||||||
color: 255 255 255 0; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SCROLLBAR_BUTTON_PROG(button_name, dir) \
|
|
||||||
program { \
|
|
||||||
name: button_name"_active_pre"; \
|
|
||||||
signal: "mouse,down,1"; \
|
|
||||||
source: button_name; \
|
|
||||||
action: STATE_SET "default" 0.0; \
|
|
||||||
target: button_name"_shadow1"; \
|
|
||||||
target: button_name"_shadow2"; \
|
|
||||||
target: button_name; \
|
|
||||||
target: button_name"_arrow"; \
|
|
||||||
after: button_name"_active"; \
|
|
||||||
after: button_name"_active_p"; \
|
|
||||||
} \
|
|
||||||
program { \
|
|
||||||
name: button_name"_active"; \
|
|
||||||
action: STATE_SET "active" 0.0; \
|
|
||||||
target: button_name"_shadow2"; \
|
|
||||||
transition: LINEAR 0.05; \
|
|
||||||
after: button_name"_active2"; \
|
|
||||||
} \
|
|
||||||
program { \
|
|
||||||
name: button_name"_active2"; \
|
|
||||||
action: STATE_SET "active" 0.0; \
|
|
||||||
target: button_name"_shadow1"; \
|
|
||||||
transition: LINEAR 0.05; \
|
|
||||||
} \
|
|
||||||
program { \
|
|
||||||
name: button_name"_active_p"; \
|
|
||||||
action: STATE_SET "active" 0.0; \
|
|
||||||
target: button_name; \
|
|
||||||
target: button_name"_arrow"; \
|
|
||||||
transition: LINEAR 0.1; \
|
|
||||||
} \
|
|
||||||
program { \
|
|
||||||
name: button_name"_passive_pre"; \
|
|
||||||
signal: "mouse,up,1"; \
|
|
||||||
source: button_name; \
|
|
||||||
action: STATE_SET "active" 0.0; \
|
|
||||||
target: button_name"_shadow1"; \
|
|
||||||
target: button_name"_shadow2"; \
|
|
||||||
target: button_name; \
|
|
||||||
target: button_name"_arrow"; \
|
|
||||||
after: button_name"_passive"; \
|
|
||||||
after: button_name"_passive_p"; \
|
|
||||||
} \
|
|
||||||
program { \
|
|
||||||
name: button_name"_passive"; \
|
|
||||||
action: STATE_SET "default" 0.0; \
|
|
||||||
target: button_name"_shadow2"; \
|
|
||||||
transition: LINEAR 0.1; \
|
|
||||||
after: button_name"_passive2"; \
|
|
||||||
} \
|
|
||||||
program { \
|
|
||||||
name: button_name"_passive2"; \
|
|
||||||
action: STATE_SET "default" 0.0; \
|
|
||||||
target: button_name"_shadow1"; \
|
|
||||||
transition: LINEAR 0.1; \
|
|
||||||
} \
|
|
||||||
program { \
|
|
||||||
name: button_name"_passive_p"; \
|
|
||||||
action: STATE_SET "default" 0.0; \
|
|
||||||
target: button_name; \
|
|
||||||
target: button_name"_arrow"; \
|
|
||||||
transition: LINEAR 0.2; \
|
|
||||||
} \
|
|
||||||
program { \
|
|
||||||
name: button_name"_button_pressed"; \
|
|
||||||
source: button_name; \
|
|
||||||
signal: "mouse,down,1"; \
|
|
||||||
action: SIGNAL_EMIT "scroll_"dir"_start" ""; \
|
|
||||||
} \
|
|
||||||
program { \
|
|
||||||
name: button_name"_button_released"; \
|
|
||||||
source: button_name; \
|
|
||||||
signal: "mouse,up,1"; \
|
|
||||||
action: SIGNAL_EMIT "scroll_stop" ""; \
|
|
||||||
}
|
|
||||||
|
|
||||||
images {
|
|
||||||
image: "e17_hscrollbar_trough.png" COMP;
|
|
||||||
image: "e17_vscrollbar_trough.png" COMP;
|
|
||||||
image: "e17_scrollbar_button_shadow1.png" COMP;
|
|
||||||
image: "e17_scrollbar_button_shadow2.png" COMP;
|
|
||||||
image: "e17_scrollbar_button.png" COMP;
|
|
||||||
image: "e17_scrollbar_arrow_left.png" COMP;
|
|
||||||
image: "e17_scrollbar_arrow_right.png" COMP;
|
|
||||||
image: "e17_scrollbar_arrow_up.png" COMP;
|
|
||||||
image: "e17_scrollbar_arrow_down.png" COMP;
|
|
||||||
image: "e17_scrollbar_hdrag_thumb.png" COMP;
|
|
||||||
image: "e17_scrollbar_vdrag_thumb.png" COMP;
|
|
||||||
|
|
||||||
/*
|
|
||||||
image: "e17_scrollbar_left_arrow.png" COMP;
|
|
||||||
image: "e17_scrollbar_left_arrow_down.png" COMP;
|
|
||||||
image: "e17_scrollbar_right_arrow.png" COMP;
|
|
||||||
image: "e17_scrollbar_right_arrow_down.png" COMP;
|
|
||||||
image: "e17_scrollbar_left_arrow.png" COMP;
|
|
||||||
image: "e17_scrollbar_left_arrow_down.png" COMP;
|
|
||||||
image: "e17_hhandle.png" COMP;
|
|
||||||
image: "e17_hhandle_down.png" COMP;
|
|
||||||
image: "e17_hhandle_thumb.png" COMP;
|
|
||||||
image: "e17_vscrollbar_trough.png" COMP;
|
|
||||||
image: "e17_scrollbar_top_arrow.png" COMP;
|
|
||||||
image: "e17_scrollbar_top_arrow_down.png" COMP;
|
|
||||||
image: "e17_scrollbar_bottom_arrow.png" COMP;
|
|
||||||
image: "e17_scrollbar_bottom_arrow_down.png" COMP;
|
|
||||||
image: "e17_scrollbar_top_arrow.png" COMP;
|
|
||||||
image: "e17_scrollbar_top_arrow_down.png" COMP;
|
|
||||||
image: "e17_vhandle.png" COMP;
|
|
||||||
image: "e17_vhandle_down.png" COMP;
|
|
||||||
image: "e17_vhandle_thumb.png" COMP;
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
group {
|
|
||||||
name: "widgets/hscrollbar";
|
|
||||||
min: 68 18;
|
|
||||||
parts {
|
|
||||||
part {
|
|
||||||
name: "trough";
|
|
||||||
description {
|
|
||||||
state: "default" 0.0;
|
|
||||||
rel1 {
|
|
||||||
relative: 0.0 0.5;
|
|
||||||
offset: 0 -8;
|
|
||||||
}
|
|
||||||
rel2 {
|
|
||||||
relative: 1.0 0.5;
|
|
||||||
offset: -1 9;
|
|
||||||
}
|
|
||||||
image {
|
|
||||||
normal: "e17_hscrollbar_trough.png";
|
|
||||||
border: 8 8 8 8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part {
|
|
||||||
name: "confine";
|
|
||||||
type: RECT;
|
|
||||||
description {
|
|
||||||
state: "default" 0.0;
|
|
||||||
visible: 0;
|
|
||||||
rel1 {
|
|
||||||
relative: 0.0 0.5;
|
|
||||||
offset: 18 -6;
|
|
||||||
}
|
|
||||||
rel2 {
|
|
||||||
relative: 1.0 0.5;
|
|
||||||
offset: -35 7;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SCROLLBAR_BUTTON("left_left_arrow", 0.0, 0.5, -1, -8, "e17_scrollbar_arrow_left.png")
|
|
||||||
SCROLLBAR_BUTTON("right_left_arrow", 1.0, 0.5, -34, -8, "e17_scrollbar_arrow_left.png")
|
|
||||||
SCROLLBAR_BUTTON("right_right_arrow", 1.0, 0.5, -18, -8, "e17_scrollbar_arrow_right.png")
|
|
||||||
}
|
|
||||||
programs {
|
|
||||||
SCROLLBAR_BUTTON_PROG("left_left_arrow","left")
|
|
||||||
SCROLLBAR_BUTTON_PROG("right_left_arrow","left")
|
|
||||||
SCROLLBAR_BUTTON_PROG("right_right_arrow","right")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
group {
|
|
||||||
name: "widgets/hscrollbar_drag";
|
|
||||||
min: 14 0;
|
|
||||||
parts {
|
|
||||||
SCROLLBAR_DRAG("drag", 0.0, 0.0, -5, -2, 1.0, 1.0, 4, 1, "e17_scrollbar_hdrag_thumb.png")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
group {
|
|
||||||
name: "widgets/vscrollbar";
|
|
||||||
min: 18 68;
|
|
||||||
parts {
|
|
||||||
part {
|
|
||||||
name: "trough";
|
|
||||||
description {
|
|
||||||
state: "default" 0.0;
|
|
||||||
rel1 {
|
|
||||||
relative: 0.5 0.0;
|
|
||||||
offset: -8 0;
|
|
||||||
}
|
|
||||||
rel2 {
|
|
||||||
relative: 0.5 1.0;
|
|
||||||
offset: 9 -1;
|
|
||||||
}
|
|
||||||
image {
|
|
||||||
normal: "e17_vscrollbar_trough.png";
|
|
||||||
border: 8 8 8 8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
description {
|
|
||||||
state: "hidden" 0.0;
|
|
||||||
inherit: "default" 0.0;
|
|
||||||
visible: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
part {
|
|
||||||
name: "confine";
|
|
||||||
type: RECT;
|
|
||||||
description {
|
|
||||||
state: "default" 0.0;
|
|
||||||
visible: 0;
|
|
||||||
rel1 {
|
|
||||||
relative: 0.5 0.0;
|
|
||||||
offset: -6 18;
|
|
||||||
}
|
|
||||||
rel2 {
|
|
||||||
relative: 0.5 1.0;
|
|
||||||
offset: 7 -35;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SCROLLBAR_BUTTON("up_up_arrow", 0.5, 0.0, -8, -1, "e17_scrollbar_arrow_up.png")
|
|
||||||
SCROLLBAR_BUTTON("down_up_arrow", 0.5, 1.0, -8, -34, "e17_scrollbar_arrow_down.png")
|
|
||||||
SCROLLBAR_BUTTON("down_down_arrow", 0.5, 1.0, -8, -18, "e17_scrollbar_arrow_down.png")
|
|
||||||
}
|
|
||||||
programs {
|
|
||||||
SCROLLBAR_BUTTON_PROG("up_up_arrow","up")
|
|
||||||
SCROLLBAR_BUTTON_PROG("down_up_arrow","up")
|
|
||||||
SCROLLBAR_BUTTON_PROG("down_down_arrow","down")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
group {
|
|
||||||
name: "widgets/vscrollbar_drag";
|
|
||||||
min: 0 14;
|
|
||||||
parts {
|
|
||||||
SCROLLBAR_DRAG("drag", 0.0, 0.0, -2, -5, 1.0, 1.0, 1, 4, "e17_scrollbar_vdrag_thumb.png")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue