Skip to content

Commit

Permalink
Double sided border controls
Browse files Browse the repository at this point in the history
  • Loading branch information
thewaiter committed Apr 12, 2020
1 parent 3d9b1e3 commit 93afb6e
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 0 deletions.
Binary file added MokshaMoonlight/bd_top_over_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
167 changes: 167 additions & 0 deletions MokshaMoonlight/border.edc
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,33 @@ part { \
} \
}

#define E_EVENT_ICON_LEFT(NAME, TO1, TO2) \
part { \
name: NAME; \
type: RECT; \
mouse_events: 1; \
\
description { \
state: "default" 0.0; \
align: 0.0 0.5; \
aspect: 1.0 1.0; \
aspect_preference: VERTICAL; \
color: 255 255 255 0; \
visible: 1; \
\
rel1 { \
to: TO1; \
offset: 5 3; \
relative: 1 0; \
} \
\
rel2 { \
to: TO2; \
relative: 1 1; \
} \
} \
}

#define CLIPS(NAME, MIN, MAX, TO, REL1, OFF1, REL2, OFF2) \
part { \
name: NAME; \
Expand Down Expand Up @@ -835,6 +862,146 @@ group {
}
}

group {
name: "e/widgets/border/left/border";
alias: "e/widgets/border/shaped/border";

data {
item: "shadow" "1";
}

parts {
SHADOW_PART("top-left", -9 -10, "bottom-right", 9 10)
BORDER("top-left", 6 23, 6 23, 0.0 0.0, 3 22, 0.0 0.0, 3 0, "bd_top_left.png", 0.0 0.0, 0.0 0.0, 3 22)
BORDER("top-right", 6 23, 6 23, 1.0 0.0, 0 22, 1.0 0.0, -6 0, "bd_top_right.png", 1.0 0.0, 1.0 0.0, 0 22)
BORDER4("bottom-left", 5 5, 5 5, 0.0 1.0, 3 -6, 0.0 1.0, 3 0, "bd_bottom_left.png", 0.0 1.0, 0.0 1.0, 5 -6, 1 5)
BORDER4("bottom-right", 5 5, 5 5, 1.0 1.0, 0 -6, 1.0 1.0, -6 0, "bd_bottom_right.png", 1.0 1.0, 1.0 1.0, 0 -6, 1 5)
BORDER2("left-border", "top-left", 0.0 1.0, 0 0, "bottom-left", 0.0 0.0, 0 0)
BORDER2("right-border", "top-right", 1.0 1.0, -1 0, "bottom-right", 1.0 0.0, 0 0 )
BORDER3("top-center", 5 23, 9999 23, "top-left", 1.0 0.5, 0 0, "top-right", 0.0 0.5, -1 -2, "bd_top.png", 1.0 0.5, 0.0 0.5, 0 0)
BORDER3("bottom-center", 5 5, 9999 5, "bottom-left", 1.0 1.0, 0 -6, "bottom-right", 0.0 1.0, -1 0, "bd_bottom.png", 1.0 1.0, 0.0 1.0, 0 -6)
E_SWALLOW_CLIENT("e.swallow.client", "top-left", 0.0 1.0, 1 0, "bottom-right", 1.0 1.0, -2 -6)
TITLE_CLIP("title.area.clip", 1 20, "min-clip", 1.0 0.5, 10 0, "top-right", 1.0 0.5, -30 0, 255 255 255 255)
part { name: "e.text.title";
type: TEXT;
effect: SOFT_SHADOW BOTTOM;
mouse_events: 0;
clip_to: "title.area.clip";
scale: 1;

description {
state: "default" 0.0;
color: 255 255 255 255;
color3: 255 255 255 255;
color_class: "border_title";
rel1 {
to: "title.area.clip";
relative: 0.0 0.5;
offset: 0 4;
}

rel2 {
to: "title.area.clip";
relative: 1.0 0.5;
offset: -5 0;
}

text {
text: "";
font: "Sans";
size: 10;
min: 0 1;
align: 0.5 0.5;
text_class: "title_bar";
}
visible: 0;
}

description {
state: "default" 0.1;
inherit: "default" 0.0;
visible: 1;
}
}
BORDER("top-left-over", 6 23, 6 23, 0.0 0.0, 3 22, 0.0 0.0, 3 0, "bd_top_lefts.png", 0.0 0.0, 0.0 0.0, 3 22)
BORDER("top-right-over", 6 23, 6 23, 1.0 0.0, 0 22, 1.0 0.0, -6 0, "bd_top_right_over.png", 1.0 1.0, 1.0 0.0, -5 23)
BORDER3("top-center-over", 5 23, 9999 23, "top-left", 1.0 0.5, 0 0, "top-right", 0.0 0.5, -1 -2, "bd_top_over_left.png", 1.0 1.0, 0.0 1.0, -1 -2)

MOVE_WINDOW("move-window", 1 22, 9999 22, "top-left", 0.0 0.0, 5 2, "top-right", 1.0 1.0, -7 -1, 255 0 0 0)
PART_EVENT_MAP("e.event.resize.t", 0, "resize_t")
PART_EVENT_MAP("e.event.titlebar", 0, "move-window")
PART_EVENT_MAP("e.event.resize.r", 0, "right-border")
PART_EVENT_MAP("e.event.resize.l", 0, "left-border")
PART_EVENT_MAP("e.event.resize.br", 0, "bottom-right")
PART_EVENT_MAP("e.event.resize.bl", 0, "bottom-left")
PART_EVENT_MAP("e.event.resize.b", 0, "bottom-center")
PART_EVENT_MAP("e.event.resize.tr", 0, "top-right")
PART_EVENT_MAP("e.event.resize.tl", 0, "top-left")
CLIPS("close-clip", 20 18, 20 18, "top-left", 0.0 0.0, 0 0, 0.0 1.0, 30 -8)
CLIPS("max-clip", 20 18, 20 18, "close-clip", 1.0 0.0, 0 0, 0.0 1.0, 30 -1)
CLIPS("min-clip", 20 18, 20 18, "max-clip", 1.0 0.0, 0 0, 0.0 1.0, 30 -1)
BUTTONS("button-close", "close-clip", 15 15, "close-clip", "bd_button_close_unfocused.png")
BUTTONS("button-max", "max-clip", 15 15, "max-clip", "bd_button_max_unfocused.png")
BUTTONS("button-min", "min-clip", 15 15, "min-clip", "bd_button_min_unfocused.png")
PART_EVENT_MAP("e.event.close", 1, "button-close")
PART_EVENT_MAP("e.event.maximize", 1, "button-max")
PART_EVENT_MAP("e.event.minimize", 1, "button-min")
RESIZE_TOP("resize_t", 1 2, 9999 2, "top-left", 0.0 0.0, 0 0, "top-right", 0.0 0.0, -1 0, 255 0 0 0)
part { name: "text_alt";
type: TEXT;
effect: SOFT_SHADOW BOTTOM;
mouse_events: 0;
clip_to: "title2_rect";
scale: 1;
description {
state: "default" 0.0;
color: 255 255 255 255;
color3: 255 255 255 255;
color_class: "border_title_active";
rel1 {
to: "e.text.title";
}

rel2 {
to: "e.text.title";
}
text {
text_source: "e.text.title";
font: "Sans";
size: 10;
min: 0 1;
align: 0.5 0.5;
text_class: "title_bar_alt";
}
visible: 1;
}

description {
state: "default" 0.1;
inherit: "default" 0.0;
color: 0 0 0 0;
visible: 0;
}
}
part { name: "title2_rect";
type: RECT;
mouse_events: 0;
description {
state: "default" 0.0;
rel1.to: "top-center-over";
rel2.to: "top-center-over";
}
}
E_SWALLOW_ICON("e.swallow.icon", "e.event.icon")
E_EVENT_ICON_LEFT("e.event.icon", "title.area.clip", "title.area.clip")
}

programs {
BORDER_DEFAULT_PROGRAMS()
}
}


group {
name: "e/widgets/border/squared/border";

Expand Down
1 change: 1 addition & 0 deletions MokshaMoonlight/default.edc
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ image: "bd_button_max_unfocused.png" COMP;
image: "bd_button_min_unfocused.png" COMP;

image: "bd_top_over.png" COMP;
image: "bd_top_over_left.png" COMP;
image: "bd_top_overm.png" COMP;
image: "bd_top_right_over.png" COMP;
image: "bd_top_left_over.png" COMP;
Expand Down

0 comments on commit 93afb6e

Please sign in to comment.