[Xfce4-commits] <midori:master> Properly position speed dial close and show on hover
Christian Dywan
noreply at xfce.org
Tue Oct 11 01:58:01 CEST 2011
Updating branch refs/heads/master
to a5ea7607d422974bca8f4948386be17311758e80 (commit)
from 8a8e59b598e86ce97747f5fe4c8f25f4a2d20381 (commit)
commit a5ea7607d422974bca8f4948386be17311758e80
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Tue Oct 11 01:52:39 2011 +0200
Properly position speed dial close and show on hover
data/speeddial-head.html | 18 +++++++++++++++++-
midori/midori-view.c | 15 ++++++---------
2 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/data/speeddial-head.html b/data/speeddial-head.html
index 58cea24..94918f6 100644
--- a/data/speeddial-head.html
+++ b/data/speeddial-head.html
@@ -47,6 +47,13 @@
from(#f6f6f6), to(#e3e3e3));
border: 1px solid #bebebe;
border-bottom-color: #a0a0a0;
+ position: relative;
+ }
+
+ div.shortcut .preview img {
+ width: 100%;
+ height: 98%;
+ cursor: pointer;
}
div.shortcut .preview.new .add {
@@ -73,8 +80,17 @@
top: -14px;
left: -14px;
background: url(res://close.png);
- position: relative;
+ position: absolute;
cursor: pointer;
+ visibility: hidden;
+ opacity: 0;
+ -webkit-transition: opacity 0.15s;
+ }
+
+ div.shortcut:hover .cross {
+ visibility: visible;
+ opacity: 1;
+ -webkit-transition-delay: 0.5s;
}
.box.added {
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 45bc11b..cb107ba 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -3771,12 +3771,10 @@ prepare_speed_dial_html (MidoriView* view)
g_string_append_printf (markup,
"<div class=\"shortcut\" id=\"s%d\"><div class=\"preview\">"
- "<a href=\"%s\"><img style=\"width: 100%%;\" "
- "src=\"data:image/png;base64,%s\"></a><a class=\"cross\" "
- "href=\"#\" onclick='javascript:clearShortcut(\"s%d\");' ></a>"
- "</div><div class=\"title\" "
- "onclick='javascript:renameShortcut(\"s%d\");'>%s</div></div>\n",
- slot, uri, encoded, slot, slot, title);
+ "<a class=\"cross\" href=\"#\" onclick='clearShortcut(\"s%d\");'></a>"
+ "<a href=\"%s\"><img src=\"data:image/png;base64,%s\"></a>"
+ "</div><div class=\"title\" onclick='renameShortcut(\"s%d\");'>%s</div></div>\n",
+ slot, slot, uri, encoded, slot, title);
g_free (title);
g_free (encoded);
@@ -3785,9 +3783,8 @@ prepare_speed_dial_html (MidoriView* view)
{
g_string_append_printf (markup,
"<div class=\"shortcut\" id=\"s%d\"><div class=\"preview new\">"
- "<a class=\"add\" href=\"#\" onclick='javascript:return "
- " getAction(\"s%d\");'></a></div>"
- "<div class=\"title\">%s</div></div>\n",
+ "<a class=\"add\" href=\"#\" onclick='return getAction(\"s%d\");'></a>"
+ "</div><div class=\"title\">%s</div></div>\n",
slot, slot, _("Click to add a shortcut"));
}
More information about the Xfce4-commits
mailing list