TH - tooltips

This commit is contained in:
Carsten Haitzler 2019-11-08 09:42:37 +00:00
parent 12000206c1
commit 5495ab8753
10 changed files with 127 additions and 65 deletions

View File

@ -3,10 +3,10 @@ group { name: "elm/label/base/tooltip/default";
alias: "elm/label/base/tooltip/transparent";
styles {
style { name: "tooltip_style";
base: "font="FN" font_size=10 color=#ffffff style=shadow,bottom shadow_color=#00000080 text_class=bubble";
base: "font="FNBD" font_size=10 color=#ffffff text_class=bubble align=0.5";
tag: "br" "\n";
tag: "hilight" "+ font="FN" text_class=bubble";
tag: "b" "+ font="FN" text_class=bubble";
tag: "hilight" "+ font="FNBD" text_class=bubble color=#ff9933";
tag: "b" "+ font="FNBD" text_class=bubble color=#3399ff";
tag: "tab" "\t";
}
}
@ -35,7 +35,6 @@ group { name: "elm/tooltip/base/default";
data.item: "hide_timeout" "0.35";
// if in a window... it's transparent!
data.item: "transparent" "enabled";
images.image: "tooltip-base.png" COMP;
images.image: "tooltip-corner-top-left-tip.png" COMP;
images.image: "tooltip-corner-top-right-tip.png" COMP;
images.image: "tooltip-corner-bottom-left-tip.png" COMP;
@ -145,40 +144,39 @@ group { name: "elm/tooltip/base/default";
}
parts {
part { name: "clipper"; type: RECT;
scale: 1;
description { state: "default" 0.0;
color: 255 255 255 0;
rel1 { to: "pop"; offset: -5 -5; }
rel2 { to: "pop"; offset: 5 5; }
rel1 { to: "pop"; offset: -500 -500; }
rel2 { to: "pop"; offset: 499 499; }
offscale;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
}
}
part { name: "pop"; mouse_events: 0;
part { name: "shadow"; mouse_events: 0;
clip_to: "clipper";
scale: 1;
description { state: "default" 0.0;
min: 30 30;
rel1 {
to: "elm.swallow.content";
offset: -5 -4;
}
rel2 {
to: "elm.swallow.content";
offset: 4 5;
}
image {
normal: "tooltip-base.png";
border: 7 7 6 8;
}
image.middle: SOLID;
rel.to: "pop";
WIN_SHADOW;
}
}
part { name: "pop"; type: RECT; mouse_events: 0;
scale: 1;
clip_to: "clipper";
description { state: "default" 0.0;
rel.to: "elm.swallow.content";
rel1.offset: -10 -10;
rel2.offset: 9 9;
color: 0 0 0 192;
offscale;
}
}
#define TT_CORNER(name_, rx, ry, ax, ay, ox, oy) \
part { name: "corner-"name_; mouse_events: 0; \
clip_to: "clipper"; \
scale: 1; \
description { state: "default" 0.0; \
visible: 0; \
align: ax ay; \
@ -194,16 +192,17 @@ group { name: "elm/tooltip/base/default";
to: "pop"; \
} \
image.normal: "tooltip-corner-"name_"-tip.png"; \
color: 0 0 0 192; \
} \
description { state: "visible" 0.0; \
inherit: "default" 0.0; \
visible: 1; \
} \
}
TT_CORNER("top-left", 0, 0, 0, 0, -4, -5);
TT_CORNER("top-right", 1, 0, 1, 0, 3, -5);
TT_CORNER("bottom-left", 0, 1, 0, 1, -4, 2);
TT_CORNER("bottom-right", 1, 1, 1, 1, 3, 2);
TT_CORNER("top-left", 0, 0, 0, 0, -6, -6);
TT_CORNER("top-right", 1, 0, 1, 0, 5, -6);
TT_CORNER("bottom-left", 0, 1, 0, 1, -6, 5);
TT_CORNER("bottom-right", 1, 1, 1, 1, 5, 5);
#undef TT_CORNER
#define TT_EDGE_VERT(name_, rx, ax, ox) \
@ -211,18 +210,18 @@ group { name: "elm/tooltip/base/default";
clip_to: "clipper"; \
description { state: "default" 0.0; \
visible: 0; \
min: 9 13; \
min: 12 11; \
align: ax 0.5; \
fixed: 1 1; \
rel1 { \
relative: rx 0.0; \
offset: ox 0; \
to: "elm.swallow.content"; \
to: "pop"; \
} \
rel2 { \
relative: rx 1.0; \
offset: ox 0; \
to: "elm.swallow.content"; \
to: "pop"; \
} \
} \
description { state: "visible" 0.0; \
@ -232,27 +231,25 @@ group { name: "elm/tooltip/base/default";
} \
part { name: "edge-area-"name_; type: RECT; mouse_events: 0; \
clip_to: "clipper-edge-"name_; \
scale: 1; \
description { state: "default" 0.0; \
color: 0 0 0 0; \
min: 9 13; \
min: 12 11; \
align: ax 0.5; \
fixed: 1 1; \
rel1 { \
relative: rx 0.0; \
offset: ox 0; \
to: "elm.swallow.content"; \
to: "pop"; \
} \
rel2 { \
relative: rx 1.0; \
offset: ox 0; \
to: "elm.swallow.content"; \
to: "pop"; \
} \
} \
} \
part { name: "edge-drag-"name_; type: RECT; mouse_events: 0; \
clip_to: "clipper-edge-"name_; \
scale: 1; \
dragable { \
x: 0 0 0; \
y: 1 1 0; \
@ -260,43 +257,41 @@ group { name: "elm/tooltip/base/default";
} \
description { state: "default" 0.0; \
color: 0 0 0 0; \
min: 9 13; \
rel1.to: "edge-area-"name_; \
rel2.to: "edge-area-"name_; \
min: 12 11; \
rel.to: "edge-area-"name_; \
} \
} \
part { name: "edge-img-"name_; mouse_events: 0; \
clip_to: "clipper-edge-"name_; \
description { state: "default" 0.0; \
FIXED_SIZE(9, 13) \
FIXED_SIZE(12, 11) \
align: ax 0.5; \
rel1.to: "edge-drag-"name_; \
rel2.to: "edge-drag-"name_; \
rel.to: "edge-drag-"name_; \
image.normal: "tooltip-edge-"name_"-tip.png"; \
color: 0 0 0 192; \
} \
}
TT_EDGE_VERT("left", 0, 1, -3);
TT_EDGE_VERT("right", 1, 0, 2);
TT_EDGE_VERT("left", 0, 0, -6);
TT_EDGE_VERT("right", 1, 1, 5);
#undef TT_EDGE_VERT
#define TT_EDGE_HORIZ(name_, ry, ay, oy) \
part { name: "clipper-edge-"name_; type: RECT; \
clip_to: "clipper"; \
scale: 1; \
description { state: "default" 0.0; \
visible: 0; \
min: 11 9; \
min: 11 12; \
align: 0.5 ay; \
fixed: 1 1; \
rel1 { \
relative: 0.0 ry; \
offset: 0 oy; \
to: "elm.swallow.content"; \
to: "pop"; \
} \
rel2 { \
relative: 1.0 ry; \
offset: 0 oy; \
to: "elm.swallow.content"; \
to: "pop"; \
} \
} \
description { state: "visible" 0.0; \
@ -306,19 +301,16 @@ group { name: "elm/tooltip/base/default";
} \
part { name: "edge-area-"name_; type: RECT; mouse_events: 0; \
clip_to: "clipper-edge-"name_; \
scale: 1; \
description { state: "default" 0.0; \
color: 0 0 0 0; \
min: 11 9; \
min: 11 12; \
align: 0.5 ay; \
fixed: 1 1; \
rel1.to: "clipper-edge-"name_; \
rel2.to: "clipper-edge-"name_; \
rel.to: "clipper-edge-"name_; \
} \
} \
part { name: "edge-drag-"name_; type: RECT; mouse_events: 0; \
clip_to: "clipper-edge-"name_; \
scale: 1; \
dragable { \
x: 1 1 0; \
y: 0 0 0; \
@ -326,30 +318,28 @@ group { name: "elm/tooltip/base/default";
} \
description { state: "default" 0.0; \
color: 0 0 0 0; \
min: 11 9; \
rel1.to: "edge-area-"name_; \
rel2.to: "edge-area-"name_; \
min: 11 12; \
rel.to: "edge-area-"name_; \
} \
} \
part { name: "edge-img-"name_; mouse_events: 0; \
clip_to: "clipper-edge-"name_; \
scale: 1; \
description { state: "default" 0.0; \
FIXED_SIZE(11, 9) \
FIXED_SIZE(11, 12) \
align: 0.5 ay; \
rel1.to: "edge-drag-"name_; \
rel2.to: "edge-drag-"name_; \
rel.to: "edge-drag-"name_; \
image.normal: "tooltip-edge-"name_"-tip.png"; \
color: 0 0 0 192; \
} \
}
TT_EDGE_HORIZ("top", 0, 1, -1);
TT_EDGE_HORIZ("bottom", 1, 0, 1);
TT_EDGE_HORIZ("top", 0, 0, -6);
TT_EDGE_HORIZ("bottom", 1, 1, 5);
#undef TT_EDGE_HORIZ
part { name: "clipper_content"; type: RECT;
description { state: "default" 0.0;
color: 255 255 255 0;
rel1.to: "elm.swallow.content";
rel2.to: "elm.swallow.content";
rel.to: "elm.swallow.content";
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
@ -358,9 +348,12 @@ group { name: "elm/tooltip/base/default";
}
part { name: "elm.swallow.content"; type: SWALLOW;
clip_to: "clipper_content";
scale: 1;
description { state: "default" 0.0;
rel1.offset: 10 10;
rel2.offset: -11 -11;
min: 48 24;
rel1.offset: 20 20;
rel2.offset: -21 -21;
offscale;
}
}
programs {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 B

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="12"
height="12"
viewBox="0 0 3.175 3.175"
version="1.1"
id="svg8"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="tooltip_corner.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="102.25"
inkscape:cx="6"
inkscape:cy="6"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
width="12px"
inkscape:showpageshadow="false"
inkscape:window-width="2560"
inkscape:window-height="1377"
inkscape:window-x="2560"
inkscape:window-y="0"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid815" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-293.825)">
<path
style="fill:#ffffff;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
d="M 3.175,295.4125 0,293.825 1.5875,297 v -1.5875 z"
id="path819"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB