]> spindle.queued.net Git - midori/commitdiff
Properly position speed dial close and show on hover
authorPaweł Forysiuk <tuxator@o2.pl>
Mon, 10 Oct 2011 23:52:39 +0000 (01:52 +0200)
committerChristian Dywan <christian@twotoasts.de>
Mon, 10 Oct 2011 23:52:39 +0000 (01:52 +0200)
data/speeddial-head.html
midori/midori-view.c

index 58cea24a5704d0df270c92af87c6dab5230089b8..94918f67325bce51057331faa339c2f1ac15ee82 100644 (file)
             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 {
         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 {
index 45bc11b18abd0c934fe198a9c4208f6a3fe21fa0..cb107baffe167a2309840cc8a65cbb0150d42ff1 100644 (file)
@@ -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"));
         }